[developers] PET bug fix in item::identity() method
Stephan Oepen
oe at csli.Stanford.EDU
Tue Oct 31 17:26:21 CET 2006
hi bernd,
the tLexItem::identity() method was originally intended to return an
appropriate symbol for use in MEM features. for lexical items, that
should be the LE type, not the instance name. until quite recently,
the method was flawed, in that it returned the instance name. which
caused MEM scoring to miss out on features involving leaf nodes, i.e.
should cost a little in parse selection accuracy.
recently, both zhang yi and i noticed this flaw and corrected it; but
we are unsure about using identity() in tJxchgPrinter::real_print().
for the time being, zhang yi preserved backwards compatibility, using
a variant tLexItem::identity2() solely for tJxchgPrinter.
i am now wondering:
- assuming tJxchgPrinter really wants the instance id, would it be
equivalent to just use item->id() and ditch identity2()?
- should i rename identity() to sm_identity(), to make it clear who
is the intended consumer of its output?
both changes would be pure fall cleaning, but before going ahead with
them, i am hoping to get your opinion :-).
all best - oe
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Universitetet i Oslo (IFI); Boks 1080 Blindern; 0316 Oslo; (+47) 2284 0125
+++ CSLI Stanford; Ventura Hall; Stanford, CA 94305; (+1 650) 723 0515
+++ --- oe at csli.stanford.edu; oe at ifi.uio.no; stephan at oepen.net ---
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the developers
mailing list