如何从 spacy 中的转录中表示 unknown/blank 单词?
How to represent an unknown/blank word from a transcription in spacy?
我正在处理音频抄本中的文本,其中有一些不认识的词。每个未知单词都有标记(例如 "He unknown to the store")。我正在寻找表示 "unknown" 单词的最佳方式,以便将 spacy 的句子依赖解析搞得一团糟。
什么是最好的替代品来增加 spacy 的句子依赖解析器在最广泛的句子范围内工作最好的几率?是 space/' ' 或 '___' 或 '...' 还是无关紧要?没有结构 when/where \ 发生。
谢谢!
如果单词是未知的,最好简单地删除它们并截断多余的 space。如果未知 words/markers 不包含在 spacy 词汇表中,它们无论如何都会搞乱依赖解析,用特殊字符替换它们也是如此。
He / to the store
输出:
He ROOT
/ punct
to prep
the det
store pobj
然而,
He to the store
输出:
He ROOT
to prep
the det
store pobj
如果你删除它们,那么基本上你会得到一个对转录的其余部分正确的依赖分析。
我正在处理音频抄本中的文本,其中有一些不认识的词。每个未知单词都有标记(例如 "He unknown to the store")。我正在寻找表示 "unknown" 单词的最佳方式,以便将 spacy 的句子依赖解析搞得一团糟。
什么是最好的替代品来增加 spacy 的句子依赖解析器在最广泛的句子范围内工作最好的几率?是 space/' ' 或 '___' 或 '...' 还是无关紧要?没有结构 when/where \ 发生。
谢谢!
如果单词是未知的,最好简单地删除它们并截断多余的 space。如果未知 words/markers 不包含在 spacy 词汇表中,它们无论如何都会搞乱依赖解析,用特殊字符替换它们也是如此。
He / to the store
输出:
He ROOT
/ punct
to prep
the det
store pobj
然而,
He to the store
输出:
He ROOT
to prep
the det
store pobj
如果你删除它们,那么基本上你会得到一个对转录的其余部分正确的依赖分析。