Syntax Summary of 2/9/03
WORDS syntax resembles that of English, but it gets added syntactic sugar
to minimize the complexity of MODELER. In practice, this means phrases and
sentences get wrapped in "parentheses". Depending on the wrapping style(s)
chosen, this makes WORDS resemble algebra, Java, Lisp, or XML:
Cyclic nodes get externally bounded (pick your own favorite style):
- open-char :=: ( | < | { | < lexikos:s > | ...
- stop-char :=: ) | > | } | < / lexikos:np > | ...
The standard way of referring to any thing in WORDS (or English) is to
use a noun phrase ("NP"). When converted to XTM, this structure will become
a topic whose type and ID are both constrained by the Inglish
Ontology. (The ID is a persistent String, generated from a type-ID).
A noun phrase (it has multiple external forms) maps into a topic:
- NP :=: topicptr | descriptorSet
- topicptr :=: NP-ID | a URI | a pronoun, ...
- descriptorSet :=: open-char shape? npbody end-char
- npbody :=: det type-ID* descriptor*
A prepositional phrase ("PP") in English models a relationship between two NPs (or
for some prepositions, like "between", more than two). In XTM, this becomes
a typed association in which the topics of these NPs are members. One will
syntactically preceed the PP; the other(s) will be found inside it.
A prepositional phrase models a relationship of NP topics:
- PP :=: PP-ID | prepPhrase
- prepPhrase :=: open-char preposition ppbody others? end-char
- others :=: NP* [rare; npbody wrapping is needed for others only.]
- ppbody :=: topicptr | npbody
WORDS sentences are hugely simplified compared to those of real English. They
are limited to a specific
copulative verb - tenseless, generic and artificial. It is basically
just a way to link the new descriptors to the NP used as subject.
A WORDS sentence has only this trivial, idiomatic form:
- copulative :=: NP copVerb descriptor*
- copverb :=: has | have
To handle the above structures, we must define some helping syntax.
Functionals get grouped, and each one maps into a PSI:
- det :=: a | an | some | the | every | {a formal macro} ....
- macro :=: isa | aso | find | ako | aka | apo ....
- pronoun :=: he | she | it | we | they | ....
- preposition :=: in | on | by | between | with | over ....
The English modifier system gets replaced in WORDS with descriptors -
the member elements of associations. Each such member must have a
role-spec topic in the Inglish ontology called an aspect, which logically
constrains (via Java, OWL, TMCL, etc.) the member NP-ID(s) cited.
A descriptor is an N-tple of values for an typed aspect (role) topic:
- descriptor :=: open-char aspect-ID member* stop-char
- member :=: NP | PP | ...
Astute readers my note that a PP can become a member of a descriptor. This allows
handy and natural ones such as "(location (under the bed))" to be used in an NP
or Sentence form, but it also raises the question of how MODELER might store
such information internally.
Fortunately XTM defines associations, and they can supply ready answers. This is
discussed more fully under WORDS semantics.
|