Query Language

aarne.ranta

Multilingual Online Translation

UGOT, with help and feedback from Ontotext, has started a GF grammar for queries. The grammar is currently for English only and translates queries like

"Bulgarian people working at Google"

to abstract syntax trees like

MQuery (QSet (SPlural (KProp (PRelation Employed (SInd (IName Google))) (KProp (PCountry Bulgaria) Person))))

The same syntax tree has hundreds of variants, such as

give me persons that are Bulgarian that are professionally active in Google give me Bulgarian people that work at Google give me people that are Bulgarian that work at Google Bulgarian people employed by Google

The grammar is very incomplete and unfinished, and very much work in progress! So contributions are welcome.

The code can be found in the GF darcs repository and viewed in http://code.haskell.org/gf/examples/query/ - see in particular README.