[lkb] generation ranking in LKB
Stephan Oepen
oe at ifi.uio.no
Sat Jul 10 11:15:52 CEST 2010
hi xuchen,
i am assuming you are thinking of generation using the ERG here? the
following lines in the `script' file enable realization ranking:
#+(and :tsdb :logon)
(tsdb::read-model (lkb-pathname (parent-directory) "jhpstg.g.mem"))
#+(and :tsdb :logon)
(setf *unpacking-scoring-hook* #'tsdb::mem-score-configuration)
the reason this is only supported in the LOGON tree is its dependency
on the CMU LM toolkit and the actual language model, which were deemed
too space-consuming to be included in the general LKB SVN.
so, assuming you are actually in the LOGON tree, you should be able to
use realization ranking. it will be turned on by default when running
in [incr tsdb()], i.e. batch generating. for interactive use, i think
you would have to pass the optional :nanalyses argument. e.g.
LKB(22): (do-parse-tty "kim gave the big angry dog a bone.")
720
375
-1
30937
10
LKB(23): (generate-from-mrs
(mrs::extract-mrs (first *parse-record*))
:nanalyses 42)
("Kim gave the angry big dog a bone."
"Kim gave the big angry dog a bone."
"Kim gave a bone to the angry big dog."
"Kim gave a bone to the big angry dog.")
86312
2780
728
3008
800
337
635
LKB(24): (loop for edge in *gen-record* collect (edge-score edge))
(2.20243 1.8947849 1.7799873 1.4181345)
too bad the adjective ordering ends up unnatural in this example, but
the model appears to be doing something (useful).
best - oe
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Universitetet i Oslo (IFI); Boks 1080 Blindern; 0316 Oslo; (+47) 2284 0125
+++ --- oe at ifi.uio.no; stephan at oepen.net; http://www.emmtee.net/oe/ ---
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the lkb
mailing list