【问题标题】:Stanford NER - Extract Multi word entities斯坦福 NER - 提取多词实体
【发布时间】:2011-04-19 13:00:02
【问题描述】:

如何在斯坦福 NER 中标记搭配?目前它将Federal Reserve Bank of New York标记为

<wi num="11" entity="ORGANIZATION">Federal</wi> <wi num="12" entity="ORGANIZATION">Reserve</wi> <wi num="13" entity="ORGANIZATION">Bank</wi> <wi num="14" entity="ORGANIZATION">of</wi> <wi num="15" entity="ORGANIZATION">New</wi> <wi num="16" entity="ORGANIZATION">York</wi>

我希望它被识别为

<wi num="11" entity="ORGANIZATION">Federal Reserve Bank of New York</wi>

这可能吗?

【问题讨论】:

    标签: java stanford-nlp named-entity-recognition


    【解决方案1】:

    类似的事情是,是的。如果你给标志

    -outputFormat inlineXML
    

    然后你会得到:

    <ORGANIZATION>Federal Reserve Bank of New York</ORGANIZATION>
    

    (请注意,这并没有真正改变斯坦福 NER 的工作方式,而只是改变了输出的格式。如果您不喜欢任何提供的输出格式,那么编写自己的格式相当简单。)

    【讨论】:

    • 谢谢。这就是我想要的。
    • 您能否指导我如何生成自定义输出格式?
    • 您必须为此编写代码。 key 方法在内部对标记列表进行分类:Listclassify(List document)。然后,您可以根据需要打印这些令牌。这就是 PlainTextDocumentReaderAndWriter 中处理标准样式的代码所做的。
    • 分类方法将每个单词作为不同的标记返回。我无法将整个实体组合在一起。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-17
    • 2020-04-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多