[developers] PET bug fix in item::identity() method

Bernd Kiefer kiefer at dfki.de
Mon Nov 6 10:54:04 CET 2006


Hi Stephan,

> 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.

sorry, i didn't know at all what identity was good for. Maybe you could
add some doxygen documentation in item.h, or whereever it is appropriate?

> 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()? 

This seems OK to me. The output of jxchg printing should not change,
that's the only requirement. Renaming identity to sm_identity might
also be a good idea, but i would consider a sentence or two in the
documentation string even more helpful (see above).

And one last general thing to all current PET-developers:

would you mind (1) adding appropriate CHANGELOG entries and (2) *above*
the current version number? I used to do this first and exploit them as
my svn changelog entries. Hope i don't ask for too much.

Best,

        Bernd


-- 
**********************************************************************
Bernd Kiefer                                            Am Blauberg 16
kiefer at dfki.de                                      66119 Saarbruecken
+49-681/302-5301 (office)                      +49-681/3904507  (home)
**********************************************************************





More information about the developers mailing list