Polyglot - 如何从句子标签中获得信心

问题描述

我正在使用 polyglot 从文件获取组织、位置和人员。并非所有匹配都正确,那么有没有办法获得标签匹配置信度?

import polyglot
import codecs
from polyglot.text import Text,Word
import sys

text = Text(sys.argv[1])

for sent in text.sentences:
    for entity in sent.entities:
        if entity.tag == 'I-ORG':
            # check tag confidence
            # some code...
        elif entity.tag == 'I-LOC':
            # check tag confidence
            # some code...
        elif entity.tag == 'I-PER':
            # check tag confidence
            # some code...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)