Partial Parsing
James-Decatur opened this issue · 3 comments
Hello,
I've noticed that you have partial training and partial evaluation, but not partial prediction. I have a treebank/corpus with partially completed trees, with labels and arcs I know are right, and I want the parser to work from there and predict the rest. Is this possible?
Thanks,
James
@James-Decatur Hi, it's indeed possible. You just need to populate the scores of incorrect arcs/rels with -INF
.
Unfortunately, I can't add this to the pkg for the consistency of API interfaces (we can't access the gold annotations during prediction). You can impl it by yourself with just a few lines of code :)
TIPS: you could still get partial annotated rels by [self.REL.vocab[rel] for rel in batch.sentences[0].rels]
and the same applies to arcs.