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

There is an warning message #79

Closed hohuynh closed 3 years ago

hohuynh commented 6 years ago

Below is my code as your example, it ran without error but there is a warning message like image in attachment. I installed stanford-corenlp-3.8.0 from nuget. Could you let me know what issue here ?

`var jarRoot = @"......\StanfordNLP\stanford-english-corenlp-models";

        // Annotation pipeline configuration
        var props = new Properties();
        //props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,parse,dcoref"); 
        props.setProperty("ner.useSUTime", "0");

        // We should change current directory, so StanfordCoreNLP could find all the model files automatically
        var curDir = Environment.CurrentDirectory;
        Directory.SetCurrentDirectory(jarRoot);
        var pipeline = new StanfordCoreNLP(props);
        Directory.SetCurrentDirectory(curDir);

        // Annotation
        var annotation = new Annotation(sentence);
        pipeline.annotate(annotation); `

image

Thanks,

sergey-tihon commented 6 years ago

This is known warnings - sorry. I do not know yet a way to fix or work around them.

I guess that the reason is that StanfordNLP group does not ship slf4j in zip packages, so we do not recompile them and .NET runtime could load classes at runtime.