Special AI Tools

We are developing tools to access the Artificial Intelligence tools from larger scale AI projects and make them available to the wider programming community. One of the problems with the acceptance of previous AI systems was the difficulty in connecting them to real-world applications. With the rise of the internet and IP communications, connecting mixed technology systems together is much easier. It is now natural for multiple servers, each using its own method, to be integrated in to a final solution. We hope some of these tools will help bring AI to more applications.

CyN - A tool for accessing OpenCyc using AIML

CycLink - A tool for accessing OpenCyc from inside Visual Basic

Rosetta - A tool that parses English sentences into multiple tagged formats

Also See: Free Ontologies


PROJECT: CyN

TECHNOLOGY AREA: Natural language chat bot development system

OBJECTIVE: Cyn (source code) is a AIML interpreter that can access OpenCyc.

DESCRIPTION: CyN is a modification of Program N by Gary Dubuque at http://www.aimlpad.com . Basically Cyc + ProgramN = CyN.

  • A desktop AIML interpreter for the Windows environment.

  • Can access OpenCyc and use it to make AIML side decisions, and use OpenCyc information.

  • Provides a basic IRC capability to Program N with basic logging

  • Adds some additional selection options to Program N

CyN is not:

  • A full natural language parser for OpenCyc. It can provide basic pattern template based parsing.

  • A full chat bot. The basic system is an interpreter. It still requires a full AIML set.

  • A drop-in, general purpose, natural language AI. Ideally it should function as an AIML bot with an inference engine. Details can be found in the description .pdf

  • Finished. This is the sort of project that is never finished, because better functionality can always be added. Please let us know of additional functionality needed. More categories of language patterns can always be written.

CONTAINS: C code for windows executable, along with necessary data files.

RECOMMENDATION:

ADDITIONAL WORK REQUIRED:

  • Tighter integration with OpenCyc for linguistic and logical information. Pending C version of CycLink.

  • OpenCyc KE definitions for all logical predicates.

  • AIML definition of all OpenCyc logical predicates

DOWNLOAD 2004-01-25 version: Cyn (source code) Includes basic CyN interpreter and nano-IRC client. Goes to a IRC-channel and responds to private messages sent to it. See option.ini file.

Publications :

Living in CyN : Mating AIML and Cyc Together with Program N

KEYWORDS: Natural language parser, CycL, OpenCyc, AIML, Chat bot


TECHNOLOGY AREA: Commonsense Inference Engine Interface to Visual Basic

OBJECTIVE: CycLink Is a Visual Basic wrapper for accessing an OpenCyc server. OpenCyc is "free to use" from Cycorp. OpenCyc is a 40 MB Linux or Windows XP/WindowsNT binary executable, and claims to be a resource for commonsense reasoning. OpenCyc is a full first order logic engine preloaded with a broad coverage ontology. OpenCyc is capable of reasoning with contradictions by defining local non-contradictory (i.e. locally consistent) subdomains through a hierarchy of “microtheories” that inherit facts and rules from each other.

DESCRIPTION: CycLink lets you access OpenCyc from inside Visual Basic. Cyc and Visual Basic are both rich tools and provide multiple ways to approach a problem. The CycLink control likewise tries to provide multiple interface models to try and match these different approaches.

CycLink interfaces include:

  • Raw: The control provides simple message-response functionality, and the user can issue raw CYC API calls to gain full lower level access.

  • Binding Collection: Most queries to Cyc return a list of solutions in the form of variables and their fillers. These answers are pre-parsed into a VB collection of collections. This Collection of answers is also used as a foundation for other interfaces.
  • Knowledge Entry Text Format Centric: Cyc provides an easy short-hand knowledge entry method. These interfaces emulate similar functionality.

  • RecordSet Centric: For those with a database background, the control can return the answers as an open Recordset, just like a SQL query. All normal record set browsing operations are available.

  • GUI Centric: The ability to provide direct visible results via the standard VB control elements is the key functionality provided. CycL queries and indications of the data to be updated can be stored in the Tag properties of controls, and the entire form can be updated in one operation. List boxes and grids can be filled with answers. Buttons and check boxes can be enabled/disabled or indicators can be made visible or change color as appropriate.

  • CYC EL Interface: Provides VB equivalents of the CYC EL functions listed in the CYC API.

CycLink is not:

  • OpenCyc or Cyc. It is an IP control to access an OpenCyc server. You have to download or have access to an OpenCyc server. CycLink is the browser client control to their knowledge server.

  • A Cycorp product. CycLink is a freeware control put out by Daxtron Labs to access OpenCyc. So, if it breaks or fails to meet your needs, don’t blame Cycorp. (And don’t try to blame us too much either.)

  • A drop-in, general purpose, natural language AI. OpenCyc is a logic engine with a large preloaded knowledge base/ontology designed to cover commonsense reasoning. That means that you communicate with Cyc in its own language (called CycL). In the future, OpenCyc will include natural language processing, and when that interface becomes available it will be included in the control.

  • Finished. This is the sort of project that is never finished, because better functionality can always be added. Please let us know of anything that would be really handy to have in the control.

EXAMPLE USAGE:

VB Code:

'Create a new connection to OpenCyc

Dim MyCyc As New CycAccessClass

'initialize with local default settings

MyCyc.DefaultInit

'Is Animal a superset of Dog ?(True/False)

Debug.Print MyCyc.isGenlOf("#$Animal", "#$Dog"); " Animal isGenlOf Dog"

'What are all the supersets Dog belongs to? (List them)

Debug.Print "getAllGenls(Dog) ="; MyCyc.getAllGenls("#$Dog")

'Can you prove a Dog is an Animal? (True you can prove it or False)

PX$ = "#$genls #$Dog #$Animal"

Debug.Print MyCyc.CanProve(PX$); "="; PX$

'Why is a Dog an Animal? (Explain)

Debug.Print "A Dog is an animal because:"; MyCyc.getWhyGenl("#$Dog", "#$Animal")

Generates:

True Animal isGenlOf Dog

getAllGenls(Dog) =

200 (#$Carnivore #$CarnivoreOrder #$TerrestrialOrganism #$HumanScaleObject #$FrontAndBackSidedObject #$LeftAndRightSidedObject #$BilateralObject #$TopAndBottomSidedObject #$HexalateralObject #$SolidTangibleThing #$MulticellularOrganism #$ChordataPhylum #$Vertebrate #$AirBreathingVertebrate #$Homeotherm #$Mammal #$Eutheria #$CanineAnimal #$TameAnimal #$CompositeTangibleAndIntangibleObject #$Agent #$PartiallyIntangible #$PartiallyIntangibleIndividual #<(#$CollectionUnionFn (#$TheSet #$Agent-Generic #<(#$GroupFn #$Agent-Generic)>))> #<(#$CollectionUnionFn (#$TheSet #$InformationBearingThing #$Agent-Generic))> #$Agent-Generic #$IndividualAgent #$PerceptualAgent #$Heterotroph #$Organism-Whole #$EukaryoticOrganism #$NaturalTangibleStuff #$OrganicStuff #<(#$CollectionUnionFn (#$TheSet #$BiologicalLivingObject #<(#$GroupFn #$BiologicalLivingObject)>))> #$TwoOrHigherDimensionalThing #$SomethingExisting #$PartiallyTangible #$ComplexPhysicalObject #$SpatialThing #$TemporalThing #$SpatialThing-Localized #$BiologicalLivingObject #$AnimalBLO #$Animal #$NonPersonAnimal #$DomesticatedAnimal #$Thing #$Individual #$Dog)

True=#$genls #$Dog #$Animal

A Dog is an animal because:200 (((#$genls #$Dog #$DomesticatedAnimal) :TRUE) ((#$genls #$DomesticatedAnimal #$NonPersonAnimal) :TRUE) ((#$genls #$NonPersonAnimal #$Animal) :TRUE))

CONTAINS: CycLink contains both a VB6 OCX and a class module. It uses the MSWinsock control to make the connection and ADO database interface for the recordset functions. All source code is provided so you can modify or remove sections that you do not need.

ADDITIONAL WORK REQUIRED:

· Completion of a C version

· Completion systematic test of API functions

· Fuller compatibility with the Java API model

DOWNLOAD: Download CycLink here

REFERENCES:

Cycorp OpenCyc Project Page

OpenCyc Server Download page

Cycorp OpenCyc API Reference

KEYWORDS: OpenCyc, Visual Basic

PROJECT: Rosetta

TECHNOLOGY AREA: Natural language parser server

OBJECTIVE: Rosetta is a server process that accepts English sentences and returns parses in multiple tagged formats.

DESCRIPTION: Rosetta is a modification of the CMU Link Grammar Parser.

  • Acts as a independent server process.

  • Provides both http and a generic socket interface.

  • Provides XML-like tagged output for

  • Link structure

  • Syntatic structure

  • Semantic structure

  • Underlying logical assertions using Flat Logical forms

  • Rough translation in to CycL

Rosetta is not:

  • A full natural language parser for OpenCyc. It has close to the same natural range and capability as the CMU Link Grammar.

  • A CMU product. Rosetta is modified from the CMU code and thus they are not responsible.

  • A drop-in, general purpose, natural language AI. Using the data files provided, Rosetta should make a good start for a broad coverage language parser based on the link grammar system. While it can parse sentences, it needs the additional components of an inference engine.

  • Finished. This is the sort of project that is never finished, because better functionality can always be added. Please let us know of additional functionality needed. In particular, disambiguation for the various parser outputs remains an open research area.

EXAMPLE USAGE:

Query:http://localhost:2002/xml?pos="John%20went%20to%20the%20resturant"

Flat logical form returned (inside the <cyc-hypolinks> tag):

(#$ThereExists ?EVENT2 (is-verb ?EVENT2 went-v)

(#$ThereExists ?ITEM1 (is-node ?ITEM1 John)

(#$ThereExists ?ITEM5 (is-node ?ITEM5 resturant[?]-n)

(and (doneBy ?EVENT2 ?ITEM1)

(singular ?ITEM1)

(primaryObjectMoving ?EVENT2 ?ITEM1)

(past ?EVENT2)

(isa ?EVENT2 CD-PTrans)

(fn-frame ?EVENT2 name_bearing)

(fn-frame ?EVENT2 motion)

(fn-frame ?EVENT2 compatibility)

(isa ?EVENT2 IntrinsicStateChangeEvent)

(cyc-word ?EVENT2 Go-TheWord)

(isa ?EVENT2 Movement-TranslationEvent)

(toLocation ?EVENT2 ?ITEM5)

(PROP ?EVENT2 to ?ITEM5)

(XDESTINATION ?EVENT2 ?ITEM5)

(DEST ?EVENT2 ?ITEM5)

(DET ?ITEM5 the)

) ) ) )

Generates one interpretation of:

<interpertation>

<wordset><word>LEFT-WALL</word><word>John</word><word>went.v</word><word>to</word><word>the</word> <word>resturant[?].n</word><word>RIGHT-WALL</word></wordset>

<linkcount>6</linkcount>

<link><llink>LEFT-WALL</llink><label>RW</label><rlink>RIGHT-WALL</rlink></link>

<link><llink>LEFT-WALL</llink><label>Wd</label><rlink>John</rlink></link>

<link><llink>John</llink><label>Ss</label><rlink>went.v</rlink></link>

<link><llink>went.v</llink><label>MVp</label><rlink>to</rlink></link>

<link><llink>to</llink><label>Jp</label><rlink>resturant[?].n</rlink></link>

<link><llink>the</llink><label>D*u</label><rlink>resturant[?].n</rlink></link>

<hypolinks>

<link><llink>went.v</llink><label>THEME</label><rlink>John</rlink></link>

<link><llink>went.v</llink><label>DESTINATION</label><rlink>resturant[?].n</rlink></link>

<link><llink>resturant[?].n</llink><label>DETERMINER</label><rlink>the</rlink></link>

<linkcount>3</linkcount>

</hypolinks>

(#$LGP-RW ?SENT #$LEFT-WALL-TheWord #$RIGHT-WALL-TheWord )

(#$LGP-Wd ?SENT #$LEFT-WALL-TheWord #$John-TheWord )

(#$LGP-Ss ?SENT #$John-TheWord #$Went-v-TheWord )

(#$LGP-MVp ?SENT #$Went-v-TheWord #$To-TheWord )

(#$LGP-Jp ?SENT #$To-TheWord #$Resturant[?]-n-TheWord )

(#$LGP-D*u ?SENT #$The-TheWord #$Resturant[?]-n-TheWord )

(#$LGP-THEME ?SENT #$Went-v-TheWord #$John-TheWord )

(#$LGP-DESTINATION ?SENT #$Went-v-TheWord #$Resturant[?]-n-TheWord )

(#$LGP-DETERMINER ?SENT #$Resturant[?]-n-TheWord #$The-TheWord )

<cyc-hypolinks>

(#$ThereExists ?EVENT2 (is-verb ?EVENT2 went-v)

(#$ThereExists ?ITEM1 (is-node ?ITEM1 John)

(#$ThereExists ?ITEM5 (is-node ?ITEM5 resturant[?]-n)

(and (doneBy ?EVENT2 ?ITEM1)

(singular ?ITEM1)

(primaryObjectMoving ?EVENT2 ?ITEM1)

(past ?EVENT2)

(isa ?EVENT2 CD-PTrans)

(fn-frame ?EVENT2 name_bearing)

(fn-frame ?EVENT2 motion)

(fn-frame ?EVENT2 compatibility)

(isa ?EVENT2 IntrinsicStateChangeEvent)

(cyc-word ?EVENT2 Go-TheWord)

(isa ?EVENT2 Movement-TranslationEvent)

(toLocation ?EVENT2 ?ITEM5)

(PROP ?EVENT2 to ?ITEM5)

(XDESTINATION ?EVENT2 ?ITEM5)

(DEST ?EVENT2 ?ITEM5)

(DET ?ITEM5 the)

) ) ) )

</cyc-hypolinks>

<trigrams>

<trigram>went-v to resturant[?]-n</trigram>

</trigrams>

<prologlinks>

links([ l(('rw'),w(('left-wall'),('-')),w(('right-wall'),('-'))), l(('wd'),w(('left-wall'),('-')),w(('john'),('-'))), l(('ss'),w(('john'),('-')), w(('went'),('v'))), l(('mvp'),w(('went'),('v')),w(('to'),('-'))), l(('jp'),w(('to') ,('-')),w(('resturant[?]'),('n'))), l(('d*u'),w(('the'),('-')),w(('resturant[?]'),('n')))])

</prologlinks>

<synparse>

<S> <NP> John</NP> <VP> went <PP> to <NP> the resturant</NP> </PP> </VP> </S>

</synparse>

<semparse>

<EVENT> <PERSON> John</PERSON> <ACTION> went <DESTINATION> to <OPENCLASS> the resturant</OPENCLASS> </DESTINATION> </ACTION> </EVENT>

</semparse>

<prologsyn>

node(s,[ node(np,[ w(('john'))]), node(vp,[ w(('went')), node(pp,[ w(('to')), node(np,[ w(('the')), w(('resturant'))])])])])

</prologsyn>

<prologsem>

node(event,[ node(person,[ w(('john'))]), node(action,[ w(('went')), node(destination,[ w(('to')), node(openclass,[ w(('the')), w(('resturant'))])])])])

</prologsem>

<xdata>

<xrec>

<lex>john</lex><pos>-</pos> <dic><wnc>person</wnc><wnc>living_thing</wnc><wnc>causal_agent</wnc><wnc>name </wnc><wnc>action </wnc><wnc>individual</wnc><wnc>male</wnc><wnc>female</wnc><wnc>family_name</wnc>< wnc>first_name</wnc></dic>

</xrec>

<xrec>

<lex>went</lex><pos>v</pos> <dic><wnc>state</wnc></dic>

</xrec>

</xdata>

</interpertation>

CONTAINS: C code for server process and windows executable, along with necessary data files.

ADDITIONAL WORK REQUIRED:

  • Tighter integration with OpenCyc for linguistic and logical information. Pending C version of CycLink.

  • OpenCyc KE definitions for all logical predicates.

DOWNLOAD 2003-10-10 version: Download Rosetta Here

REFERENCES:

[PDF]Dependency-Based Semantic Interpretation for Answer Extraction

Conceptual Dependency and Explanation Patterns for OpenCyc

Link Grammar Parser Lexicon Expansion: additional lexicon for link grammar parser systems derived from WordNet

Szolovits, P. " Adding a Medical Lexicon to an English Parser " a 200,000 medical term add-on to the LGP lexicon.

KEYWORDS: Natural language parser, CycL, OpenCyc, Link Grammar parser