Books
in black and white
Main menu
Home About us Share a book
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Communicating with Databases in Natural Language - Wallace M.

Wallace M. Communicating with Databases in Natural Language - Ellis Horwood Limited, 1985. - 170 p.
Download (direct link): comumunicatingwthisdatabase1985.djvu
Previous << 1 .. 4 5 6 7 8 9 < 10 > 11 12 13 14 15 16 .. 59 >> Next

REL also includes the facility to define verbs REL’s grammar is a “Case” grammar (see below, Chapter 5 section 2..3), so that, once the ‘cases’ for a verb are known, the whole variety of possible clauses which use the verb can be accepted by the grammar. Here is an example of a REL verb definition:
VERB: SHIPS “SAIL” FROM PORTLAND TO VANCOUVER:
THE PORT OF DEPARTURE OF SHIPS IS PORTLAND AND THE DESTINATION OF SHIPS IS VANCOUVER
This definition establishes the ‘cases’ for the verb “to sail”. It enables REL to parse such sentences as,
“How many ships sail to Los Angeles from each port?”
“Which is the most empty ship that sails to Honolulu?”
Unfortunately, no universal set of cases has yet been discovered, so this particular technique may not be equally applicable to all types of information. For the paraphrase of the example the new grammar would not accept the queries:
“Who sailed . „ (a human subject)
“Which ship sailed on May 30th ,. ” (a temporal clause)
“Did Marn sail out of Portland . ...” (port of departure introduced by a different preposition).
We conclude that some very clever extensibility features have been designed, but for any such feature its effectiveness is heavily dependent on the design of the original core grammar.
4 THE ENGLISH DICTIONARY
4.1 The function of a dictionary
One important function of an English dictionary is to record the correspondences between English words. Consider the dictionary definition of a bachelor, “unmarried man”. Suppose, for example, that word-meanings are expressed as relational formulae. Thus the noun “man” means
X.man(X) (where “X” is a variable, and “man” a relation)
The adjective “married” simply means the relation ‘married’, and the prefix “un-” means the logical negation “not” For the definition of “bachelor” we would like to extract the compound meaning:
X. (man(X) & not married(X))
from the words “unmarried man”
Similarly the grammar is a kind of dictionary of function words. The production:
SENTENCE -* WHAT (ATTRIBUTE) IS (ENTITY) I PRINT ATTRIBUTE
OF ENTITY
30 NATURAL LANGUAGE ENQUIRY
[Ch
gives the meaning of the words “what” and “is” in the context of this sentence. Moreover definitions can be viewed as extensions to the grammar, so that all verbs, in REL, are defined by the grammar In a LIFER system even content words can be represented by productions:
ATTRIBUTE -* COUNTRY I ?’NATION English word Database name
Extracting the meaning of a word, then is much like extracting the meaning of any grammatical construction in an English sentence. In practice, however, implementing an English dictionary in an NLU is very different from implementing a parser. The vital distinction is that there is a fixed, quite small, number of grammatical categories but a possibly huge number of individual words. Matters of efficiency are of paramount importance in dictionary lookup.
If the grammar of a LIFER NLU included the two productions:
SENTENCE -> WHAT (SHIP) ARE THERE I el
SENTENCE -* WHAT IS THE (ATTRIBUTE) OF <SHIP> I e2
LIFER would inefficiently try to process the sentence
“What is the length of the Nautilus?”
by trying to find a ship called “Is”, It is a drawback of the top-down approach that this kind of inefficiency creeps more and more into the system as the parser is extended.
One solution is to perform dictionary lookup “bottom-up” — unguided by the parser This solution also allows the dictionary to be stored in a more traditional fashion: since the dictionary need not be divided into separate sections for each distinct grammatical category, the dictionary can be kept in alphabetical order, and all alternative meanings for each word can be kept together. The bottom-up approach involves inefficiencies of its own, since the system may search blindly for a word when a top-down analysis could guide the search. Thus INTELLECT engages in the following dialogue:
User: CHICAGO IS WHICH EMPLOYEES’ CITY?
INTELLECT: IM NOT FAMILIAR WITH THE WORD “CHICAGO”
IF ITS A WORD YOU EXPECT TO FIND IN THE DATABASE HIT THE RETURN KEY OTHERWISE EITHER FIX ITS SPELLING OR ENTER A SYNONYM FOR IT.
User: [return]
INTELLECT: WHAT FIELD SHOULD IT APPEAR IN?
User: city
With the top-down knowledge that the next word should describe a city, the system could look through the list of cities in the database and avoid the necessity to consult the user
2]
NATURAL LANGUAGE ENQUIRY 31
A further question is whether to search for alternative meanings foi a given word. The INTELLECT system cannot, for example, deal with a word that has one “familiar” meaning, and is also a database value. The question of “how hard to try” will also come up in the context of spelling correction; (see section 5).
4.2 Semantics
In our discussion of meaning we are confined to the data models implemented in currently working databases. A word can therefore name a relation (or record), an attribute (or field), a segment (or set) or a database value. The defined words have meanings which are constructed out of the above.
Previous << 1 .. 4 5 6 7 8 9 < 10 > 11 12 13 14 15 16 .. 59 >> Next