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".
This document describes the GF OAA Agent included with the GF Java interpreter.
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})"
$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',gf(num,gf(pot2as3,gf(pot2,gf(pot0,gf(n3))))))
Language uninstantiated, unambiguous parse:
parse(numerals, Lang, 'three hundred', Tree) => parse(numerals,english,'three hundred',gf(num,gf(pot2as3,gf(pot2,gf(pot0,gf(n3))))))
Language uninstantiated, parses with several languages to same parse tree:
parse(numerals, Lang, 'tre', Tree) => parse(numerals,albanian,tre,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3))))))) parse(numerals,danish,tre,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3))))))) parse(numerals,italian,tre,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3))))))) parse(numerals,norwegian_book,tre,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3))))))) parse(numerals,swedish,tre,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3)))))))
Language uninstantiated, parses with several languages to different parse trees:
parse(numerals, Lang, 'tres', Tree) => parse(numerals,catalan,tres,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3))))))) parse(numerals,danish,tres,gf(num,gf(pot2as3,gf(pot1as2,gf(pot1,gf(n6)))))) parse(numerals,spanish,tres,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3)))))))
linearize(Grammar,Lang,Tree,Text)
Language given:
linearize(numerals,english,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(n3)))))),Str) => linearize(numerals,english,gf(num,gf(pot2as3,gf(pot1as2,gf(pot0as1,gf(pot0,gf(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'])
load_grammar(PropFile,Name)
Load a grammar:
load_grammar('test.properties', Test) => load_grammar('test.properties', 'test')