标签: stanford-nlp

stanford解析器或dotnet中的替代品

我正在dotnet框架中开展一个Q&A项目,我需要做一些NLP流程,比如词性标注和生成解析树

我知道斯坦福解析器,但我对在C#中找到它的接口感到有点困惑我搜索了一个很好的选择,我发现:

1- http://nlpdotnet.com/Services/Introduction.aspx (但它不提供解析树)

我想知道是否还有一些好的选择

.net nlp stanford-nlp

2
推荐指数
1
解决办法
2862
查看次数

斯坦福大学-自然语言处理学可以检测疑问句吗

最近几天,我一直在与Stanford-NLP进行一些基本的调整。我也读过有关链接语法的文章。如果有人使用过这些库中的任何一个,是否可以使用其中任何一个来检测疑问句?目前,我在斯坦福大学自然语言处理学院任教。我可能必须添加大量代码才能使其工作。看来我可能需要创建一个单独的PCFG。

nlp stanford-nlp sharpnlp

2
推荐指数
1
解决办法
911
查看次数

斯坦福NER:我可以在代码中一次使用两个分类器吗?

在我的代码中,我从第一个分类器获得Person识别,对于我创建的第二个分类器,我添加了一些要被识别或注释为Organization的单词,但它没有注释Person.

我需要从他们两个中获益,我该怎么做?

我正在使用Netbeans,这是代码:

String serializedClassifier = "classifiers/english.all.3class.distsim.crf.ser.gz";
String serializedClassifier2 = "/Users/ha/stanford-ner-2014-10-26/classifiers/dept-model.ser.gz";

if (args.length > 0) {
  serializedClassifier = args[0];
}

AbstractSequenceClassifier<CoreLabel> classifier = CRFClassifier.getClassifier(serializedClassifier);
AbstractSequenceClassifier<CoreLabel> classifier2 = CRFClassifier.getClassifier(serializedClassifier2);

  String fileContents = IOUtils.slurpFile("/Users/ha/NetBeansProjects/NERtry/src/nertry/input.txt");
  List<List<CoreLabel>> out = classifier.classify(fileContents);
  List<List<CoreLabel>> out2 = classifier2.classify(fileContents);

  for (List<CoreLabel> sentence : out) {
      System.out.print("\nenglish.all.3class.distsim.crf.ser.gz: ");
    for (CoreLabel word : sentence) {
      System.out.print(word.word() + '/' + word.get(CoreAnnotations.AnswerAnnotation.class) + ' ');
    }

  for (List<CoreLabel> sentence2 : out2) {
      System.out.print("\ndept-model.ser.gz");
    for (CoreLabel word2 : …
Run Code Online (Sandbox Code Playgroud)

netbeans classification stanford-nlp

2
推荐指数
1
解决办法
779
查看次数

Stanford Core NLP是否支持德语的词典化?

我找到了与Stanford Core NLP兼容的德语解析和pos-tag模型.但是我无法让德语词典化工作.有办法吗?

stanford-nlp

2
推荐指数
1
解决办法
1040
查看次数

What lemmatizer can i use for arabic text using python?

How can I get lemmas for Arabic words? I tried the ISRI Arabic Stemmer from NLTK but it returns roots of words:

from nltk.stem.isri import ISRIStemmer
st = ISRIStemmer()
print st.stem(u'????????')
Run Code Online (Sandbox Code Playgroud)

It returns the root ??? and i want the lemma ??????

python text-processing stanford-nlp python-2.7 python-3.x

2
推荐指数
1
解决办法
2967
查看次数

coreNLP显着减缓了火花工作

我试图通过将文档剪切成句子来进行分类,然后将句子中的每个单词进行逻辑回归以进行逻辑回归.但是,我发现stanford的注释类在我的火花工作中造成了严重的瓶颈(它需要20分钟才能处理500k文件)

这是我目前用于句子解析和分类的代码

句子解析:

def prepSentences(text: String): List[CoreMap] = {
    val mod = text.replace("Sr.", "Sr") // deals with an edge case
    val doc = new Annotation(mod)
    pipeHolder.get.annotate(doc)
    val sentences = doc.get(classOf[SentencesAnnotation]).toList
    sentences
}
Run Code Online (Sandbox Code Playgroud)

然后,我将采用每个coremap并按如下方式处理引理

def coreMapToLemmas(map:CoreMap):Seq[String] = {
      map.get(classOf[TokensAnnotation]).par.foldLeft(Seq[String]())(
    (a, b) => {
        val lemma = b.get(classOf[LemmaAnnotation])
        if (!(stopWords.contains(b.lemma().toLowerCase) || puncWords.contains(b.originalText())))
      a :+ lemma.toLowerCase
    else a
  }
)
}
Run Code Online (Sandbox Code Playgroud)

也许有一个类只涉及一些处理?

scala machine-learning stanford-nlp apache-spark

2
推荐指数
1
解决办法
593
查看次数

Stanford CoreNLP(Java)浅析析与深度解析

我需要使用Stanford CoreNLP进行浅层解析深度解析.我google了很多但没有成功.最后,我发现有2个解析器,Constituency解析器Dependency解析器.

我的问题是:

选区解析器浅层解析和依赖解析器是深度解析吗?

任何人都可以把上述解析器的代码和任何有用的链接?

java parsing stanford-nlp dependency-parsing

2
推荐指数
1
解决办法
2822
查看次数

如何从Python中的CoreNLP服务器返回的字符串获取解析树?

我在corenlp服务器上使用pycorenlp。我可以以字符串格式获取解析树。但是我可以像NLTK库这样的树来获取它吗?

from pycorenlp import StanfordCoreNLP
import pprint
import nltk

nlp = StanfordCoreNLP('http://localhost:9000')

text = ('Purgrug Vobter and Juklog Qligjar vruled into the Battlefield. Vobter was about to Hellfire. Juklog Qligjar started kiblaring.')

output = nlp.annotate(text, properties={
'annotators': 'tokenize,ssplit,pos,depparse,parse',
'outputFormat': 'json'
})


print [s['parse'] for s in output['sentences']]
Run Code Online (Sandbox Code Playgroud)

输出:

[u'(ROOT\r\n  (S\r\n    (NP (NNP Purgrug) (NNP Vobter)\r\n      (CC and)\r\n      (NNP Juklog) (NNP Qligjar))\r\n    (VP (VBD vruled)\r\n      (PP (IN into)\r\n        (NP (DT the) (NN Battlefield))))\r\n    (. .)))', u'(ROOT\r\n  (S\r\n    (NP (NNP Vobter))\r\n    (VP …
Run Code Online (Sandbox Code Playgroud)

stanford-nlp corenlp-server

2
推荐指数
1
解决办法
1308
查看次数

如何通过CoreNLP识别一个小写的命名实体,如kobe bryant?

我遇到一个问题,CoreNLP只能识别名为Kobe Bryant的命名实体,它以一个大写字母开头,但不能识别kobe bryant作为一个人!那么如何通过CoreNLP识别以小写字符开头的命名实体???? 欣赏它!!!!

java stanford-nlp

2
推荐指数
1
解决办法
506
查看次数

如何在NLTK中使用stanford word tokenizer?

我正在寻找在nltk中使用stanford字标记器的方法,我想使用,因为当我比较stanford和nltk字标记器的结果时,它们都是不同的.我知道可能有办法使用stanford tokenizer,就像我们可以在NLTK中支持POS Tagger和NER一样.

是否可以在不运行服务器的情况下使用stanford tokenizer?

谢谢

python tokenize nltk stanford-nlp

2
推荐指数
1
解决办法
5434
查看次数