CoreNLP 启用从CoreMapExpressionExtractor保留嵌套/重叠匹配并公开名称

cig3rfwq  于 2个月前  发布在  其他
关注(0)|答案(3)|浏览(46)

在我的工作当中,我们使用了tokens-regex,但是我希望使用更低级的CoreMapExpressionExtractor并对其进行修改,以允许匹配是嵌套的或者重叠的。
对于我的用例,我想要查看所有可能的匹配结果,而不仅仅是最大的或者不重叠的匹配结果。我只使用了该语言的result功能,没有进行任何标注。
我还希望暴露ExtractFunc的名称以及MatchedExpression的名称。
我已经将更改提交到了一个本地分支,在那里我公开了名称,并允许CoreMapExpressionMatcher的Env来决定是否返回所有匹配结果。

lrl1mhuk

lrl1mhuk1#

Fork the repo and push it to your own local repo…
On Mon, Oct 10, 2022 at 10:37 AM jrsperry ***@***.***> wrote: In my work we have used tokens-regex, but I'm looking to use the lower-level CoreMapExpressionExtractor and to modify it to allow for matches that are either nested, or overlapping. For my use case I want to see all possible matches, not just the largest or non-overlapping matches. I'm only using the result functionality of the language, not doing any annotating. I would also like to expose the name of the ExtractFunc of the MatchedExpression. I have changes checked in to a local branch where I expose the name, and allow for the Env of the CoreMapExpressionMatcher to allow for all the matches to be returned or not. I'm getting access denied in pushing to a new branch however. — Reply to this email directly, view it on GitHub <#1307>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA2AYWOUMKWTIHDVNHCQCR3WCRH4RANCNFSM6AAAAAARBRPMWU > . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>

slwdgvem

slwdgvem2#

我已经完成了这个操作,我认为这对于使用CoreMapExpressionExtractor的人可能有用。我会提交一个PR供大家考虑。

相关问题