💾 Archived View for spam.works › mirrors › textfiles › computers › qf921124.txt captured on 2023-12-28 at 17:21:00.

View Raw

More Information

⬅️ Previous capture (2023-06-14)

-=-=-=-=-=-=-

                     QFACTS (Version 921124)

The central goal of Qfacts is to define a standard for
representing, analyzing and retrieving information, facts, and
knowledge as quickly, easily, efficiently, and tersely as
possible, using simple tools.

Any basic propositions that can be stored in a database,
spreadsheet, or knowledgebase can be stored as one-line
statements in plain text Qfacts files.

A Qfacts fact/record consists of an object or head followed by
any number of descriptive property/value pairs, all on one line:

     obj <prop1> val1 <prop2> val2 <prop3> val3 ...

     France <capital> Paris <GDP> $724.1b <year> 1986

Qfacts statements are written in SGML (Standard Generalized
Markup Language) style, but do not strictly follow SGML rules and
conventions. Qfacts properties are roughly equivalent to SGML
tags.

Qfacts is an effort to define a scheme for representing
well-structured information and knowledge that is maximally
simple and intelligible for non-programmers. The kinds of
knowledge structures that should be represented in Qfacts should
usually be no longer than 1000 characters, and will as a rule be
between 50 and 200 characters. More complicated and lengthy
knowledge structures will burst the bounds of Qfacts' line
limits. But a surprising number of factual propositions about the
world can be comfortably represented within the conventions of
Qfacts.

A Qfacts file consists of a list of facts (or records) in Qfacts
format. A Qfacts file is headed by the tag

     <o>#qfacts

which signals the beginning of an object of record type "qfacts."
(This convention is part of another tagging scheme called
Knotes--for Knowledge Notes--which is not necessary to discuss
here.) The beginning of a set of Qfacts records is defined by the
tag

     <records>

The end of a Qfacts file is defined in SGML style by the tag

     </o>

or by the end of the file, whichever comes first.

Qfacts files are designed to be easily searched by boolean grep
programs like Maxfind or KWS, merged with other plain text Qfacts
files, and analyzed by knowledgebase software which understands
the Qfacts format. A typical way to use Qfacts files is to store
tens, or hundreds, or thousands of them under a single directory,
and to retrieve records with a favorite grep program accessed
through a well-tuned batch file.

Qfacts statements can be easily composed on the fly with a simple
text editor, and are fully self-documented and portable.

Multiple values for any property can be stored as a list enclosed
in parentheses and by separating each item in the value list by a
semicolon:

     France <major city> (Paris; Marseille; Lyon; Toulouse; Nice)

Values themselves can be treated as objects or heads by storing
their property/value pairs in parentheses:

     France <capital> Paris (<population> 2,188,918 <year> 1982)

Parentheses can be nested at any level of depth.

Generally, however, the best style is to store only one
property/value pair in each record.

Some sample Qfacts statements:

     Electronic Data Systems <sales> $4,744.6m <y> 1988 <s> Universal Almanac 1990
     Exxon <Fortune 500 rank> 3 <y> 1988 <s> Universal Almanac 1990
     France <capital> Paris
     Huntington, Samuel <c> pro-Clinton ad signer <y> 1992 <s> New York Times 8/17/1992
     Los Angeles, Calif <population> 2,969,528 <y> 1980
     Massachusetts <governor> Weld, William (<political party> Republican) <y> 1992
     Mean Streets <c> movie <director> Scorcese, Martin <y> 1973
     Mosley, Walter <book by> A Red Death (New York: Pocket Books) <y> 1992
     Perot, Ross <U.S. presidential election: percent of popular vote> 19 <d> November 4, 1992
     Turner, Ted <address> CNN, One CNN Center, Atlanta, GA 30348 <y> 1992 <s> Boston Globe 11/16/1992 p22
     Will, George <c> syndicated columnist
     Vanity Fair <publisher> The Conde Naste Publications Inc. <y> 1992

There are a number of reserved property tags and other keywords
in Qfacts:

     <category> = a category to which an object belongs
     <c> = abbreviation for <category>
     <date> = date that property/value pair(s) was true for object
     <d> = abbreviation for date
     <keyword> = keyword describing an object and statement
     <k> = abbreviation for <keyword>
     <note> = miscellaneous note
     <n> = abbreviation for <note>
     <quote> = quote about an object
     <quote+> = positive quote about an object
     <quote-> = negative quote about an object
     <q> =  abbreviation for <quote>
     <q+> = abbreviation for <quote+>
     <q-> = abbreviation for <quote->
     <source> = the source of a qfact
     <s> = abbreviation for <source>
     <time> = time that property/value pair(s) was true for object
     <t> = abbreviation for <time>
     <user> = user who composed qfact
     <u> = abbreviation for <user>
     <w> = write date: date qfact was composed
     <year> = year that property/value pair(s) was true for object
     <y> = abbreviation for <year>
     !rule: = a rule directive
     !abb: = an abbreviation definition

There are two other special types of Qfacts statement.

Rules and other commands for manipulating, analyzing, and
generating inferences from Qfacts statements are expressed as
special directives preceded by an exclamation point:

     !rule: if x <area code for> y then y <area code> x

The variables "x" and "y" always point to an object and value
respectively.

For the statement

     617 <area code for> Boston

Qfacts on command would automatically generate the statement:

     Boston <area code> 617

Rule directives must appear on single lines, and can be stored in
the same file with other Qfacts statements.

Abbreviation directives are stored in a similar way:

     !abb: lang = language
     !abb: hfac = House Foreign Affairs Committee

A Qfacts statement with an object/head enclosed by a leading
pound sign and following colon is a pointer to a record type:

     #movie: <title> Amadeus <director> Forman, Milos <y> 1984
     #book: <author> Vidal, Gore <title> Live from Golgatha <city> New York <publisher> Random House <year> 1992

One could write the rule:

     !rule: in #movie if <title> y then y <c> movie

In other words, Amadeus belongs to the category "movie."

The left and right angle brackets which delimit Qfacts tags can
be forced into their conventional meaning by preceding them with
a tilde:

     ~<  ~>

A Qfacts record without any property tags is perfectly legal, and
is considered to be a miscellaneous unstructured note.

The best style for storing source information is minimal but
sufficient to track down the source:

     <source> New York Times 11/24/1992 p3 //a newspaper source
     <source> Steele Common Lisp 1990 p251 //a book source

With today's powerful and omnipresent databases, for most folks
expanding these brief source pointers to their full cites is a
trivial matter. The goal behind Qfacts is to provide a mechanism
for representing knowledge as easily, quickly and tersely (but
intelligibly) as possible.

A sample use of Qfacts files: unzip them to C:\QFDATA and search
them with QF.BAT:

        @echo off
        kws c:\qfdata\*.* %1 %2 %3 %4 > c:\tmp\tmp.qf
        list c:\tmp\tmp.qf /w

This batch file assumes that QF.BAT, KWS and LIST are in your
path.

In the latest version of KWS the above batch statement will
assume a boolean "and" between arguments.

This scheme for doing simple knowledge representation in plain
ASCII files is entirely arbitrary. Suggestions are welcome for
improving these conventions. If enough people can agree on a
standard for basic knowledge representation, useful software
tools should appear in due time for processing plain
knowledgebase files.

Wayne McGuire
Compuserve: 71330,2074
Genie: w.mcguire
Internet: wmcguire@world.std.com
Internet: 71330.2074@compuserve.com
Internet: wayne.mcguire@channel1.com
Channel One (BBS): 617-354-8873