Controlled Languages for Knowledge Representation in FOL.

30
Controlled Languages for Knowledge Representation in FOL
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    219
  • download

    4

Transcript of Controlled Languages for Knowledge Representation in FOL.

Page 1: Controlled Languages for Knowledge Representation in FOL.

Controlled Languages for Knowledge Representation in FOL

Page 2: Controlled Languages for Knowledge Representation in FOL.

Motivation:

Translate (contrived) English into FOL without solving NLU.

Page 3: Controlled Languages for Knowledge Representation in FOL.

Natural English

Controlled English

MOCL English

T-Complete Formalisms

FOLSpec. Lang.L-CL

Page 4: Controlled Languages for Knowledge Representation in FOL.

Commonly Referenced L-CLs:• Controlled Language for Inference Purposes (CLIP)

[Sukkarieh2003]• Controlled English to Logic Translation (CELT)

[PeaseMurray2003]• Attempto Controlled English (ACE)

[FuchsSchwertelSchwitter1999]• Processable English (PENG) [Schwitter2002]• Common Logic Controlled English (CLCE)[Sowa2004]• Several Others (not considered here)

Page 5: Controlled Languages for Knowledge Representation in FOL.

Representation KIF Support Tool Support

CLIP McLogic No Maybe

CELT DRS YES Maybe

ACE DRS ? Yes

PENG DRS No? Yes

CLCE ? Yes No

Page 6: Controlled Languages for Knowledge Representation in FOL.

CLIP

Attributes:• McLogic [McAllesterGivan1992]• Montagovian syntax (Richard Montague 1930-71)• Syllogistic Reasoning

Criticisms:• Lots of inference rules (34) including both forward and

backwards chaining• Each new language construct can introduce new

inference rules

Page 7: Controlled Languages for Knowledge Representation in FOL.

Schubert’s Steamroller in McLogic

Every wolf in an animal. Every fox is an animal. Every bird is an animal. Every caterpillar is an animal. Every snail is an animal. Some wolf exists. Some fox exists. Some bird exists. Some caterpillar exists. Some snail exists. Every grain is a plant. Some grain exists. Every caterpillar is smaller than every bird. Every snail is smaller than every bird. Every bird is smaller than every fox. Every fox is smaller than every wolf. It is not true that some wolf eats some fox. It is not true that some wolf eats some grain. Every bird eats every caterpillar. It is not true that some bird eats some snail. Every caterpillar eats some plant. Every snail eats some plant. Every animal X eats every plant or every animal that is smaller than X and eats some plant.

(every, wolf, animal). (every, fox, animal). … (some, wolf, exists). … (every, caterpillar, (smaller-than, (every, bird))). …

(not, (some, wolf, (eat, (some, fox)))). … (every, animal, (eat, (every, plant)) $LAMBDA(X, (every, X, (eat, (every, animal + ((smaller-than, (some, X)) + (eat, (some, plant))))))))

[SukkariehPulman1999]

Page 8: Controlled Languages for Knowledge Representation in FOL.

CELT

• Ostensibly KIF plus ACE (minus a few features) coupled with WordNet and SUMO

• “WordNet provides a very large initial vocabulary and CELT automates the process of mapping sentences with terms from WordNet to their more formal representations in KIF formulas and the Standard Upper Merged Ontology.” [PeaseMurray2003]

• Also mapped to PhaseBank [PeaseFellbaum2004]

Page 9: Controlled Languages for Knowledge Representation in FOL.

CELT KIF Example

John eats every hamburger that he sees.

He observes a hamburger at Wendys.

[PeaseMurray2003]

(and

(instance John-1 CognitiveAgent)

(attribute John-1 Male)

(attribute John-1 FullyFormed)

(instance John-1 Human)

(exists

(?event4 )

(forall

(?hamburger ?event13)

(=>

(and

(instance ?hamburger Food)

(patient ?event13 ?hamburger)

(instance ?hamburger Physical)

(experiencer ?event13 John-1)

(instance ?event13 Seeing))

(and

(instance ?event4 Eating)

(agent ?event4 John-1)

(patient ?event4 ?hamburger)))))

(exists (?event 17 ?hamburger21)

(instance ?event17 Seeing)

(experiencer ?event17 John-1)

(instance ?hamburger21 Food)

(patient ?event17 ?hamburger21)

(instance Wendys_Burger_Store Building)

(located ?event17 Wendys_Burger_Store)))

Page 10: Controlled Languages for Knowledge Representation in FOL.

PENG

• Also ostensibly ACE (minus a few features)• Has a nice editor ECOLE (unification-based

grammar formalism)• Schwitter was a major contributor to ACE• Schwitter also investigates techniques to convert

English into Controlled English

Page 11: Controlled Languages for Knowledge Representation in FOL.

ACE

• Predefined Function words– determiners,– Prepositions,– Conjunctions, …

• User-defined content words– nouns,– verbs,– adjectives, …

• Construction Rules• Interpretation Rules• Unification-based Phase Structure Grammar• Single unambiguous semantic interpretation (even if the

English seems ambiguous)

Page 12: Controlled Languages for Knowledge Representation in FOL.

Simple ACE Sentences

subject + verb + complements + adjuncts• A new customer inserts 2 valid cards.• John’s customer inserts a card of Mary.• The customer Mr Miller inserts a card A.• A customer who is new inserts a card that he owns.• A customer inserts some cards manually.• A customer manually inserts not more than 2 cards.• A customer inserts a card into a slot.• John’s customer who is new inserts a valid card of Mary

manually into a slot A.[???]

Page 13: Controlled Languages for Knowledge Representation in FOL.

Composite ACE Sentences

Recursively built from simple sentences using: Coordination (and, or):

A customer inserts 2 cards and the machine checks their codes.

Subordination (who, which, that):A customer who is new inserts a card that he owns.

Quantification:Every customer inserts a card.

Negation:No customer inserts more than 2 cards. [???]

Page 14: Controlled Languages for Knowledge Representation in FOL.

ACE Interpretation Rules

The customer inserts a card with a code.Rule:

A prepositional phrase always modifies the verb.

Interpretation:The customer {inserts a card with a code}.

The customer inserts a card that carries a code.Rule:

A relative sentence always modifies the immediately preceding noun phrase.

Interpretation:The customer inserts {a card that carries a code}.

Page 15: Controlled Languages for Knowledge Representation in FOL.

ACE and DRS

Every company that buys a standard machine gets a discount. A British company buys a standard machine.

paragraph(drs([A,B,C],[drs([D,E,F],[object(D,company)-1,structure(D,atomic)-1,object(E,machine)-1, structure(E,atomic)-1, property(E,standard)-1,predicate(F,event,buy,D,E)-1]) => drs([G,H],[object(G,discount)-1,structure(G,atomic)-1, predicate(H,event,get,D,G)-1]),object(A,company)-2, structure(A,atomic)-2, property(A,'British')-2,object(B,machine)-2, structure(B,atomic)-2, property(B,standard)-2,predicate(C,event,buy,A,B)-2]),text(['Every company that buys a standard machine gets a discount.', 'A British company buys a standard machine.']))

[FuchsSchwertel2003]

Page 16: Controlled Languages for Knowledge Representation in FOL.

ACE Future Work

Fixed Modal Phrases

can, cannot, must, must not, is/does always, is/does never

Page 17: Controlled Languages for Knowledge Representation in FOL.

CLCE

• Strong ties to CL, KIF and CGIF• Little information available (not a single

published work on CLCE)• Grammar Specification is incomplete• No Parser publicly available but the claim is:

“Under the assumption that all words, names, and variables are declared explicitly or implicitly before their first use, the translation of any CLCE text to FOL can be performed in a single pass by a context-free parser augmented with two symbol tables” [Sowa2004]

Page 18: Controlled Languages for Knowledge Representation in FOL.

CLCE Grammar

Sentences– Simple, Complex, Compound– Declarative, Interrogative, Imperative– Extended Sentences (ie. Paragraphs)

Page 19: Controlled Languages for Knowledge Representation in FOL.

CLCE Grammar

Reserved Words:Boolean operators:

not, and, either, or, neither, nor, if, then. Quantifiers:

a, an, some, something, someone, every, everything, everyone, no, nothing, no one.

Special verbs: is, has, have, does. Interrogatives: who, what, when, where, which. Relative pronoun: that. Definite article: the. List connector: and. Special lists: none, others, nothing else, no one else. Argument markers: of, than, as. Special phrases:

there is, such that, only if, if and only if, it is false that, is it true that.

Page 20: Controlled Languages for Knowledge Representation in FOL.

CLCE Example

CLCE:Every ancestor of a person x is either a parent of x or a parent of an ancestor of x.

FOL:(y)~(x:Person)(Ancestor(y,x) ~(Parent(y,x) (z)

(Parent(y,z) Ancestor(z,x))))

CGIF:[(Ancestor [@lambda] [Person:*x]): @every*y] [Either: [Or:

(Parent ?y ?x)] [Or: (Parent ?y [*z]) (Ancestor ?z ?x)]]

Page 21: Controlled Languages for Knowledge Representation in FOL.

Commonly Cited Books:• L. M. Iwanska and S. C. Schapiro (eds). Natural Language

Processing and Knowledge Representation. AAAI Press. 2000.• H. Kamp and U. Reyle. From Discourse to Logic, Introduction to

Modeltheoretic Semantics of Natural Language, Formal Logic and Discourse Representation Theory. 1993.

• P. Blackburn and J. Bos. Representation and Inference for Natural Language: A First Course in Computational Semantics. 2005.

• P. Blackburn and J. Bos. Working with Discourse Representation Theory: An Advanced Course in Computational Semantics. Forthcoming.

Page 22: Controlled Languages for Knowledge Representation in FOL.

References

• Sukkarieh. Mind your Language! Controlled Language for Inference Purposes. Controlled Language Application Workshop (CLAW2003). Dublin, Ireland. 2003.

• J. Sukkarieh and S. G. Pulman. Computer Processable English and McLogic. In Proceedings of the Third International Workshop on Computational Semantics, Tilburg, The Netherlands. 1999.

• D. McAllester, R. Givan, and S. Shalaby. Natural Language Syntax and First Order Inference. Artificial Intelligence. 56:1-20. 1992.

• A. Pease and W. Murray. An English to Logic Translator for Ontology-based Knowledge Representation Languages. In IEEE International Conference on Natural Language Processing and Knowledge Engineering. Beijing, China. 2003.

• A. Pease and C. Fellbaum. Language to Logic Translation with PhraseBank. Second International WordNet Conference (GWC2004). 2004.

• N. E. Fuchs, U. Schwertel, R. Schwitter. Attempto Controlled English (ACE) Language Manual, Version 3.0, Technical Report  99.03. Department of Computer Science, University of Zurich, August 1999.

• R. Schwitter. English as a Formal Specification Language. Proceedings of the Thirteenth International Workshop on Database and Expert Systems Applications (DEXA 2002), W04: Third International Workshop on Natural Language and Information Systems - NLIS, 2-6 September 2002, Aix-en-Provence, France, pp. 228-232, 2002.

• N. E. Fuchs, U. Schwertel. Reasoning in Attempto Controlled English. In Principles and Practice of Semantic Web Reasoning, International Workshop PPSWR 2003 Lecture Notes in Computer Science 2901. Springer Verlag. 2003.

• J. F. Sowa. Common Logic Controlled English (CLCE). http://www.jfsowa.com/clce/specs.htm. 2004

Page 23: Controlled Languages for Knowledge Representation in FOL.

Backup Material

Page 24: Controlled Languages for Knowledge Representation in FOL.

History of Controlled Languages

Page 25: Controlled Languages for Knowledge Representation in FOL.

Birth of CL [1920s & 30s]

Motivation:“The search for a common scientific language … when Latin stopped serving that purpose.” [Sukkarieh2003]

Notable CLs:• Esperanto• British American Scientific International Commercial

(BASIC) English

Page 26: Controlled Languages for Knowledge Representation in FOL.

Growth of CL [1970s & 80s]

Motivation:Improve readability of technical writing (manuals) especially for those knowing little English.

Notable CLs:• Caterpillar Fundamental English (CFE)• Douglas Aircraft Simplified English• AECMA Simplified Technical English (SE)

Page 27: Controlled Languages for Knowledge Representation in FOL.

Present Day CL [1990s – present]

Motivation:

• Simplify written communication

• Decrease ambiguity

• Enable translation

Page 28: Controlled Languages for Knowledge Representation in FOL.

Present Day CL [1990s – present]

Notable CLs:• International Language of Service and Maintenance (ILSAM)• Bull Global English• Perkins/Univ. Edinburgh PACE• GIFAS Rationalized French• General Motors Global English• Securities and Exchange Commission (SEC) Plain English• Controlled Spanish• Caterpillar Technical English (CTE)• Attempto Controlled English (ACE)• Alcatel COGRAM• Xerox Multilingual Customized English• Kodak International Service Language• IBM Easy English• General Motors Controlled Automotive Service Language (CASL)• ProLingua LinguaNet• Diebold Controlled English• Scania Swedish• Nortel Standard English (NSE)• Sun Controlled English• Oracle ORACAL

[Allen2004]

Page 29: Controlled Languages for Knowledge Representation in FOL.

2 Axis Continuum for CLs

Axis 1HOCL– Human-Oriented Controlled Language [Huijsen1998]– improves readability and comprehensibility

CPCL (MOCL)– Computer Processable Controlled Language [Pulman1996]– Machine-Oriented Controlled Language– Improves translatability

Axis 2Monolingual– Single CL (or several related by core rules)Multilingual– Multi CLs via machine-oriented translation processing techniques

Page 30: Controlled Languages for Knowledge Representation in FOL.

References

• Sukkarieh. Mind your Language! Controlled Language for Inference Purposes. Controlled Language Application Workshop (CLAW2003). Dublin, Ireland. 2003.

• Jeffrey Allen and Kathleen Barthe. Introductory overview of Controlled Languages. Invited talk presented at the Society for Technical Communication meeting of the Paris, France chapter. Paris, France. 2004.

• Willem-Olaf Huijsen. Controlled Language – An Introduction. Controlled Language Application Workshop (CLAW1998). Pittsburgh, PA. 1998.

• Pulman. Controlled Language for Knowledge Representation. Controlled Language Application Workshop (CLAW1996). Leuven, Belgium. 1996.