试图设置矛盾的文档:'(4708,4717,'公司在')' (4681,4717,')'

发布于 2025-02-04 07:45:59 字数 97 浏览 4 评论 0原文

[在此处输入图像描述] [1]

尝试设置冲突的文档。令牌只能是一个实体的一部分,因此请确保您设置的实体不要重叠。要与重叠的实体一起工作,请考虑使用doc.spans。

[enter image description here][1]

Trying to set conflicting doc.ents: '(4708, 4717, 'Companies worked at')' and '(4681, 4717, 'Degree')'. A token can only be part of one entity, so make sure the entities you're setting don't overlap. To work with overlapping entities, consider using doc.spans instead.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自控 2025-02-11 07:45:59

实体识别器不支持重叠的实体。
要解决此问题,您有几个选择:

  • 保留其中一个实体
  • 在您的管道中使用两个实体识别器,一个用于学位,另一个用于Companies_Worked_at。然后使用“ set_extensions”维护两个注释(识别者将相互覆盖)。
  • 使用spangaterizer代替entityRecognizer( https://spacy.io/apacy.io/api/api/spancategorizer

The EntityRecognizer does not support overlapping entities.
To solve this issue, you have a couple of choices:

  • Keep one of those entities
  • Use two EntityRecognizers in your pipeline, one for degree and another for companies_worked_at. Then use "set_extensions" to maintain both annotations (the recognizers will overwrite each other).
  • Use the SpanCategorizer instead of the EntityRecognizer (https://spacy.io/api/spancategorizer)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文