Skip to content

Commit bd0f24b

Browse files
committed
first draft of corefud.GuessSpan
1 parent bfaad05 commit bd0f24b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

udapi/block/corefud/guessspan.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from udapi.core.block import Block
2+
3+
class GuessSpan(Block):
4+
"""Block corefud.GuessSpan heuristically fills mention spans, while keeping mention.head"""
5+
6+
def process_coref_mention(self, mention):
7+
mention.words = mention.head.descendants(add_self=True)
8+
# TODO add empty nodes that are causing gaps
9+
# TODO add heuristics from corefud.PrintMentions almost_forest=1

0 commit comments

Comments
 (0)