[developers] cheap MWE problem and solution.
Francis Bond
fcbond at gmail.com
Fri May 6 15:52:08 CEST 2005
G'day,
Sorry for the extended series of pet issues. Please let Stephan and I
offer something constructive as well.
Pet has at least two output routines for dependency trees: one used by
the debugger, and one used by itsdb. Pet 0.99.7 fixed a problem with
MWEs in the output routine used by the debugger, but not for itsdb.
The problem is with things like edge 125:
Debugger output:
(695 ru-lexeme-infl-rule 0.00 7 9
(125 dearu-v-cop-stem/reg-cop-stem-lex 0.00 7 9 []
("で" 0.00 7 8)
("ある" 0.00 8 9))))))))
ITSDB output, reformatted slightly:
(695 ru-lexeme-infl-rule 7 9
(125 dearu-v-cop-stem 0 7 9 ("ある" 8 9))))))))
Only the lexeme for the key daughter is given.
Stephan produced a fix (given below) which outputs:
(695 ru-lexeme-infl-rule 7 9
(125 dearu-v-cop-stem 0 7 9 ("で ある" 7 9))))))))
For what it's worth, there was also a problem with this in Stephan's
branch. It appears to be a bug with a long pedigree.
--
Francis Bond <www.kecl.ntt.co.jp/icl/mtg/members/bond/>
NTT Communication Science Laboratories | Machine Translation Research Group
P.S. The only change was to <tLexItem::tsdb_derivation>
New:
string
tLexItem::tsdb_derivation(int protocolversion)
{
ostringstream res;
res << "(" << _id << " " << _stem->printname()
<< " " << score() << " " << _start << " " << _end
<< " " << "(\"" << orth() << "\" "
<< _start << " " << _end << ")";
return res.str();
}
Old:
string
tLexItem::tsdb_derivation(int protocolversion)
{
ostringstream res;
res << "(" << _id << " " << _stem->printname()
<< " " << score() << " " << _start << " " << _end
<< " " << _keydaughter->tsdb_derivation(protocolversion);
return res.str();
}
--
Francis Bond <www.kecl.ntt.co.jp/icl/mtg/members/bond/>
NTT Communication Science Laboratories | Machine Translation Research Group
More information about the developers
mailing list