-
Notifications
You must be signed in to change notification settings - Fork 4
AceUse
FrancisBond edited this page Aug 1, 2013
·
6 revisions
Some common use examples for Ace, illustrated with Jacy:
For the full list of command line options see AceOptions.
Prepare for parsing, outputting only the top best MRS, nicely formatting the output (one EP per line)
$ ace -g grammar.dat -Tf1
$ 犬 が 吠える
SENT: 犬 が 吠える
[ LTOP: h0
INDEX: e1 [ e TENSE: pres MOOD: indicative PROG: - PERF: - ASPECT: default_aspect PASS: - SF: prop ]
RELS: < [ udef_q_rel<-1:-1> LBL: h3 ARG0: x2 [ x PERS: 3 ] RSTR: h4 BODY: h5 ]
[ "_inu_n_rel"<-1:-1> LBL: h6 ARG0: x2 ]
[ "_hoeru_v_1_rel"<-1:-1> LBL: h7 ARG0: e1 [ e TENSE: pres MOOD: indicative PROG: - PERF: - ASPECT: default_aspect PASS: - SF: prop ] ARG1: x2 ] >
HCONS: < h4 qeq h6 > ]
NOTE: 1 readings, added 183 / 63 edges to chart (22 fully instantiated, 26 actives used, 11 passives used) RAM: 1327k
Pipe parse output into generation:
$ ace -g grammar.dat -Tf1 | ace -g grammar.dat -e
$ 犬 が 猫 を 追う 。
NOTE: 1 readings, added 323 / 101 edges to chart (31 fully instantiated, 37 actives used, 17 passives used) RAM: 1996k
犬 が 猫 を 追う
猫 を 犬 が 追う
NOTE: 85 passive, 431 active edges in final generation chart; built 88 passives total. [2 results]
This produces the compiled grammar.
$ ace -G grammar.dat -g path-to/config.tdl
Home | Forum | Discussions | Events