[Added beginnings of documentation. bjorn@bringert.net**20041022135116] < > { adddir ./doc addfile ./doc/gf-java.html hunk ./doc/gf-java.html 1 - + + + +
+Björn Bringert, +bringert@cs.chalmers.se +
+ ++The Grammatical +Framework (GF) is a grammar formalism well suited to writing +multilingual grammars for natural languages. +
+ ++The system presented in +this document implements parsing and linearization using GF grammars. +
+ ++The Open Agent Architecture +(OAA) is "a framework for integrating a community of heterogeneous +software agents in a distributed environment". +
+ +The GF system is required +for producing the input to this system from GF source grammars. GF is not required to run programs +using this syste, only to produce the grammars for them.
+ +Java 1.5 is required to compile +and run the system.
+ ++OAA 2.3.0 or later is required to use +the OAA interfce. +
+ ++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) ++
The standard parsing and linearization functions use untyped abstract syntax trees. +There is a facility for generating Java classes which can represent an abstract +syntax using typed trees.
+ + + hunk ./se/chalmers/cs/gf/oaa/Translate.java 15 - private static String solvableString = "translate(Grammar, FromLang,Input,ToLang,Output)"; + private static String solvableString = "translate(Grammar,FromLang,Input,ToLang,Output)"; }