【问题标题】:spacy sentence tokenization error on Hebrew希伯来语的spacy句子标记化错误
【发布时间】:2018-07-15 20:01:45
【问题描述】:

尝试对希伯来语使用空的句子标记化。

import spacy
nlp = spacy.load('he')
doc = nlp(text)
sents = list(doc.sents)

我明白了:

    Warning: no model found for 'he'

    Only loading the 'he' tokenizer.

Traceback (most recent call last):   
  ...
    sents = list(doc.sents)   
  File "spacy/tokens/doc.pyx", line 438, in __get__ (spacy/tokens/doc.cpp:9707)
    raise ValueError( ValueError: Sentence boundary detection requires the dependency parse, which requires data to be installed. For more info, see the documentation:  https://spacy.io/docs/usage

怎么办?

【问题讨论】:

    标签: python spacy


    【解决方案1】:

    spaCy 的Hebrew coverage 目前非常少。它目前只有希伯来语的 word 标记化,它大致在空白处分割,并带有一些额外的规则和例外。您想要的 sentence 标记化/边界检测需要对句子进行更复杂的语法分析,以确定一个句子在哪里结束,另一个在哪里开始。这些模型需要大量标记的训练数据,因此可用于比标记化更少的语言(here 的列表)。

    最初的消息是告诉你它可以进行标记化,这不需要模型,然后你得到的错误是没有模型来分割句子、做 NER 或 POS 等。

    您可以查看this list 以获取有关希伯来语 NLP 的其他资源。如果您找到了足够多的正确格式的标记数据并且您有雄心壮志,您可以使用here 中描述的概述来训练您自己的希伯来语 spaCy 模型。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-06
      相关资源
      最近更新 更多