我正在使用斯坦福 NER 来识别搜索文本中的每个实体。一旦我识别出实体,我需要将该实体传递给一个算法,该算法使用每个单词的权重计算每个实体类型(例如国家、客户)的分数。目前我的训练数据有如下单词和答案:
country_training.tsv
brazil country
japan country
customer_training.tsv
hyundai customer
apple customer
如何将权重与上述每个训练数据相关联,如下所示,以便我也可以获得每个单词的权重?
country_training.tsv
brazil country 1.5
japan country 4.0
customer_training.tsv
hyundai customer 4.0
apple customer 2.3
请指教。
权重被输入到 NER 中,以用它们的权重注释每个实体。