Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The implementation language is SICStus Prolog 3 4 (or later) which is a standard Prolog compiler.

...

=== How to get hold of the system ===

TUC is available on SVN from
http://basar.idi.ntnu.no/svn/busstuc
which is at the Department of Computer and Information Science at the University of Trondheim (NTNU), Norway.

When delivered, it will be in a tar-file that expands to directory busterthe bustuc/ folder containing a collection of Prolog-files.

...

NOTE the bus system contains a large database busroute.pl.

It is therefore necessary possible to compile this separately into a saved state
( e.g. busbase) and use busbase instead of the compiler command.

Example:

(Step 1, only one time whenever the schedule is updated)

% sicstus
?-compile(busroute).
?-save_program(busbase).
?-halt.
.....

(Step 2... To compile the rest of the program)

% busbase.sav
?-[tucbus].
?-save_program(bustuc).
?-halt.
......

...

?-[tuclinuks]. ( Linux, Norwegian installation language
and user language)

?-[tucbuster]. ( Dialog version of BusTUC)


3. Make an an executable program , e.g. nrl NRL (or bustuc)


?-save_program(nrl).

...

depending on default settings. Otherwise, statements are taken as
implicit as implicit questions.


***************************************************

...

The system translates the English text via a general grammar with
semantic constraints.
The constraints are determined by the content of
of the semantic knowledge base.
The system operates on a backtracking fashion, returning
solutions which are both syntactically and semantically correct.
In this version, only the first possible solution is presented, the other
are other are cut away.

Example:

" John saw a man in the park with a telescope"

This sentence is genuinely ambiguous, but the analysis
chosen analysis chosen will at least be semantically plausible (with the current semantic
definitions).

TUC translates English to First Order Logic (FOL), and then
to a Skolemized form called TQL. Slash (/) is used as a
general a general predicate generating operator, which is
left-associative. The last argument is usually
a situation-variable or -constant. In most cases,
it  it can be understood as an unspecified time period.

...

Queries are processed and answered according to the
knowledge the knowledge base and the dialogue content.

Except for system commands, commands are meant
to meant to be performed by TUC.

A script of sentences can be read from a text file,
given  given by a read command.
All definitions given herein will be semi-permanent.
Otherwise, definitions given in dialogue will be
forgotten be forgotten by reset commands.

There are a few error messages.
They are accompanied by a rephrase of the input,
and  and a '*' pointing at the error, (usually the word
before word before or after the '*'). The '*' signifies how far
the far the analysis proceeded until no more alternatives were
possiblewere possible.


The error messages are:

--- Ungrammatical at * ---

...


If you get an error message which is not an unknown word,
you should experiment with simpler versions of the phrase.
Hopefully, missing semantic definitions should be the main source of
the problem.

For the description below, the user types whatever is not printed.
Text  Text surrounded by < > is generic and is not verbatim.

...

nodotflag := true/false. All '.' except last is ignored

dialog := 0 Missing data are replaced by default values
dialog := 1 Missing data left unknown (for prompting by dialog processor)

traceprog := 1 ..to 6 trace of pragmatic rule application

traceans := 1 ..to 6 trace of bus answer rule application

...

parsetime_limit := 3000 (default) max parsing time in ms before
parser gives up

language := english/norsk Default user language

unix_language := eng/nor Unix installation language

wold := <identifier> Possible to set another world than real

  • NB World parameter is always reset

...

  • to real after end of read file


=== System Commands in NL mode: ===

These commands starts with a backslash operator to distinguish
them distinguish them from NL text. The NL commands must appear on one line,
a  a last dot is optional.


E: \ Exit, return to Prolog mode

...


All the System commands in Prolog mode listed above are also available in
NL mode (e.g. the command \clear which is listed as an example ).

...

The accepted language, which is called E is a subset
of English. A Norwegian version is also available.
Among all its restrictions, note the following:

- Punctuations are Punctuation is only allowed (taken into account) as the final marks,
( no comma ,semicolon or hyphens).

statement .
question ?
command !

- A line may be split into several lines until the line
ends line ends with one of these marks.

- No attention is payed to the morphological form, eg.
singular  singular or plural or tense.

- All names not put in 'quotes' must be known by the
system. New names can be defined using the standard phrase
phrase 'is a' <noun> or 'is an' <noun>
as in
E: anne Anne is a girl.

- Genitive is written by a single 's' without apostrophe as in

E: who is johns mother ?

For a demonstration, see the content of the file 'twm.e'
which  which is listed below.

\begin

Every person that gets a spot has this spot.

Once upon a time there lived in England a king.
The king had 3 wise men.
Every wise man got a colored spot on his forehead.
Every spot was red or white.
Every wise man could see every spot that was unequal
his own spot.
The king said that there was at least one white spot.
The king gave each wise man a white spot.

How did one man know that he had a white spot ?

\end

For your information, some files with extension '.e'
are  are included in the delivery as
illustrative as illustrative examples. Also the file 'problems.e' contains
examples of sentences which are not treated adequately.

...

The grammar is based on a simple
grammar simple grammar for statements, while questions and
commands and commands are derived by use of movements.
The grammar formalism is called ConSensiCal Grammar,
which  which is an acronym for Context Sensitive Categorial Attribute Logical Grammar.
It is an easy to use variant of Extra-position Grammars
(XG, XG-grammars (F. Pereira)), which is an extension of Definite
Clause Definite Clause Grammars.
A characteristic grammatical expression in
in Consensical Grammar is found in the definition of a relative_clause
clause which after 'that' expects a statement MINUS a noun_phrase.

A skeleton grammar follows below for declarative sentences (statements).
The  The grammar which is listed in the file 'gram_e.pl' is much more comprehensive
and comprehensive and sophisticated. The grammar is in fact an attributed
grammar that produces a formula in a first order event calculus.

...


sentence ---> statement . |
question  question ?  |
command  command !

statement ---> noun_phrase verb_phrase

command ---> statement \ [you] .

...

vp ---> intransitive_verb  |
transitive transitive_verb noun_phrase

verb_complement ---> prep_phrase  |
adverbial adverbial_phrase

prep_phrase ---> preposition noun_phrase

...

noun_complement ---> prep_phrase  |
relative relative_clause

relative_clause ---> that (statement / noun_phrase)

...

... an open ended list .

C/D A    A phrase of category C, lacking a phrase
of phrase of category C

C\D similar to / , but the subtracted phrase
must occur first in the text.

...

TUC is adaptable, which means that there is a general
grammar for the syntax, while the semantics of the
words are declared in tables.

...

Also, semantic.pl - contains many root forms of words.

In addition,
lex.pl - contains general rules for lexical analysis.

...

A relation apo (a part of) is used to define
the define the constituent structure of the nouns.

...