我需要在基于 C# 的桌面应用程序中对来自用户的各种文本输入进行一些自然语言处理。为此,我正在使用 Antelope。第一步是将文本拆分成句子。根据 Antelope 提供的文档,我使用了:
using Proxem.Antelope;
using Proxem.Antelope.Lexicon;
using Proxem.Antelope.Tools;
using Proxem.Antelope.LinkGrammar;
using Proxem.Antelope.Stanford;
using NUnit.Framework;
...
...
...
ISentenceSplitter splitter = new Tools.MIL_HtmlSentenceSplitter();
splitter.Text = text;
foreach (string sentence in splitter.Sentences)
{
// Process sentence…
}
此外,我还添加了对这些库的引用。但它给出了错误
The type or namespace name 'ISentenceSplitter' could not be found (are you missing a using directive or an assembly reference?) C:\Users\...
和
The type or namespace name 'Tools' could not be found (are you missing a using directive or an assembly reference?) C:\Users\...
我似乎想不出解决办法。在网上搜索后,我发现其他人也有这个问题,但没有人真正找到解决方案。你们能帮帮我吗?
最佳答案
简单的答案是避免使用这个库。没有冒犯作者的意思,他们可能已经做了非常好的和艰苦的工作,但是如果在各种可能的尝试之后都不能使用它,那么它就毫无用处。他们在文档中提到一个函数属于一个特定的接口(interface),但是当你去那里时,它不存在于任何可用的接口(interface)中。
对于那些好奇的人:我确实通过他们的网站联系了作者,但即使在 8 天后也没有得到回复。
还有其他可用的替代方案,例如 OpenNLP (java) 或其 C# 对应项 SharpNLP .
关于c# - Proxem的羚羊 : interface not found "ISentenceSplitter",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5528649/