Matching unknown input in Unitex

35 views
Skip to first unread message

Vladimir Cernenko

unread,
Dec 19, 2019, 10:53:59 AM12/19/19
to Unitex-GramLab
Hello! I have a rookie question, hopefully it is not too primitive for this group.
I am trying to tag named entities like songs and artists in sentences like "Play X by Y on spotify" (where 'on spotify' may or may not occur in the text). For X and Y, I am using a looped box with <TOKEN> or <DIC>+<!DIC>. Making 'on spotify' optional messes with the output as it is also recognized as the possible part of the <TOKEN> loop. What is the best practice to solve such issues? Thank you very much in advance

eric.laporte

unread,
Dec 20, 2019, 10:44:13 AM12/20/19
to Unitex-GramLab
Hello,
You can make separate paths for sentences with on spotify and for those without on spotify. Then, your problem will be only with the path without on spotify: in that path, consider making patterns X and Y a little more specific than just <TOKEN> or <WORD> loops, maybe by checking length, forbidden tokens or other approximate constraints.
Best,
Eric
Reply all
Reply to author
Forward
0 new messages