sergey-tihon / Stanford.NLP.NET

Stanford NLP for .NET
http://sergey-tihon.github.io/Stanford.NLP.NET/
MIT License
595 stars 123 forks source link

In connecting to NLP service,While using sentences annotation getting null value #94

Closed jgazelle closed 3 years ago

jgazelle commented 5 years ago

I used the code from the below link https://sergey-tihon.github.io/Stanford.NLP.NET//samples/CoreNLP.Server.html Here sentences returns null var sentences = document.get(sentencesAnnotationClass) as java.util.AbstractList;

jgazelle commented 5 years ago

If i use 'tokenize' and ssplit it is not returning null.When I add 'pos' then sentences above is giving null

sergey-tihon commented 3 years ago

Sample is fixed and updated in docs

        var sentencesAnnotationClass = GetAnnotationClass<CoreAnnotations.SentencesAnnotation>();
        var sentences = sentencesAnnotationClass.getClasses().Select(document.get).ToList();