Björn Bringert, bringert@cs.chalmers.se
The Open Agent Architecture (OAA) is "a framework for integrating a community of heterogeneous software agents in a distributed environment".
If the grammar properties file is test.properties and the facilitator is running on $FAC_HOST, port $FAC_PORT, the GF agent is started with:
$ java -cp $CLASSPATH:gfc2java.jar:. se.chalmers.cs.gf.oaa.GFAgent /test.properties -oaa_connect "tcp('${FAC_HOST}',${FAC_PORT})"
The path to the properties file is loaded as a java resource, so the leading slash means to look look at the root of the package hierarchy to find the file in the current directory.
$CLASSPATH must contain the paths to:
The OAA agent declares these solvables:
parse(Grammar,Lang,Text,Tree)
Language given, unambiguous parse:
parse(numerals, german, 'drei hundert', Tree) => parse(numerals, german, 'drei hundert', num(pot2as3(pot2(pot0(n3)))))
Language uninstantiated, unambiguous parse:
parse(numerals, Lang, 'three hundred', Tree) => parse(numerals, english, 'three hundred', num(pot2as3(pot2(pot0(n3)))))
Language uninstantiated, parses with several languages to same parse tree:
parse(numerals, Lang, 'tre', Tree) => parse(numerals, albanian, tre, num(pot2as3(pot1as2(pot0as1(pot0(n3)))))) parse(numerals, danish, tre, num(pot2as3(pot1as2(pot0as1(pot0(n3)))))) parse(numerals, italian, tre, num(pot2as3(pot1as2(pot0as1(pot0(n3)))))) parse(numerals, norwegian_book, tre,num(pot2as3(pot1as2(pot0as1(pot0(n3)))))) parse(numerals, swedish, tre, num(pot2as3(pot1as2(pot0as1(pot0(n3))))))
Language uninstantiated, parses with several languages to different parse trees:
parse(numerals, Lang, 'tres', Tree) => parse(numerals,catalan,tres,num(pot2as3(pot1as2(pot0as1(pot0(n3)))))) parse(numerals,danish,tres,num(pot2as3(pot1as2(pot1(n6))))) parse(numerals,spanish,tres,num(pot2as3(pot1as2(pot0as1(pot0(n3))))))
linearize(Grammar,Lang,Tree,Text)
Language given:
linearize(numerals, english, num(pot2as3(pot1as2(pot0as1(pot0(n3))))), Str) => linearize(numerals, english, num(pot2as3(pot1as2(pot0as1(pot0(n3))))), three)
translate(Grammar,FromLang,Input,ToLang,Output)
Input language not given:
translate(numerals, Lang, 'tres', english, Str) => translate(numerals,catalan,tres,english,three) translate(numerals,danish,tres,english,sixty) translate(numerals,spanish,tres,english,three)
list_grammars(Grammars)
Get all grammars:
list_grammars(Grammars) => list_grammars([query,answer])
list_languages(Grammar, InputLangs, OutputLangs)
Get languages for all grammars (Grammar uninstantiated):
list_languages(Grammar, InputLangs, OutputLangs) => list_languages(query,['*all*','GbgQueryEng','GbgQuerySwe'],['*all*','GbgQueryEng','GbgQuerySwe']) list_languages(answer,['*all*','GbgRouteEng','GbgRouteMap','GbgRouteSwe'],['*all*','GbgRouteEng','GbgRouteMap','GbgRouteSwe'])
Get languages for the query grammar (Grammar instantiated):
list_languages('query', InputLangs, OutputLangs) => list_languages(query,['*all*','GbgQueryEng','GbgQuerySwe'],['*all*','GbgQueryEng','GbgQuerySwe'])