yakivyusin / simplenetnlp Goto Github PK
View Code? Open in Web Editor NEW.NET NLP library
License: MIT License
.NET NLP library
License: MIT License
I have the following code in my F# interactive:
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-libs"
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-models\pos"
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-models\sentiment"
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-models\parser"
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-models\naturalli"
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-models\ner"
#I @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\NLPTest\nlp-models\lexparser"
#r @"C:\Users\amit-\Documents\Visual Studio 2017\Projects\NLPTest\packages\SimpleNetNlp.3.7.0.1\lib\SimpleNetNlp.dll"
open SimpleNetNlp
let sentence = Sentence "This is a sample sentence."
sentence.Lemmas |> Seq.iter (printfn "%s")
But when I try to run the code, I get the following error:
SimpleNetNlp.Exceptions.MissingModelException: Missing Pos Tagger Model (please install SimpleNetNlp.Models.PosTagger) ---> java.lang.RuntimeException: edu.stanford.nlp.io.RuntimeIOException: Error while loading a tagger model (probably missing model file) ---> edu.stanford.nlp.io.RuntimeIOException: Error while loading a tagger model (probably missing model file) ---> java.io.IOException: Unable to open "edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger" as class path, filename or URL
Could you please provide a more descriptive example of usage in your README file?
SimpleNetNlp works perfect when I am running my project in Visual Studio. However, if I publish the project and run the installed application I run into this error -
"java.io.IOException: Unable to open "edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger" as class path, filename or URL"
Is there a known issue with this?
We have many Ukraine in Germany.
They are having challenges to really speaking German with more confidence.
I am writing app for that and it would be great you tool help the Ukrainians in Germany by using this project to support German too :-)
I have tested 4.5.6 using the latest ikvm.maver with the German language model
It would be great that we have a wrapper through your work here to make it easy to access the Standford CoreNLP API for German
I wonder if you are familiar with the latest IKVM which could make the upgrading simpler using ikvm.marven?
sergey-tihon/Stanford.NLP.NET#128
Can you point me in the right direction to use custom models and train them?
Hi,
will be a Support for .Net Core?
I'm trying to do a simple Sentiment() on the pure Sentence with simple text as an API call in ASP.NET Core, but when running it, it keeps throwing this inner exception. I checked and the files seem to be there.
RuntimeIOException: java.io.IOException: Unable to open "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz" as class path, filename or URL
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SimpleNetNlp;
namespace StanfordNLPTest
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var sentence = new Sentence("She born in a small town.");
var lemmas = sentence.Lemmas;
var pos = sentence.PosTags;
var triplets = sentence.OpenIe;
}
}
}
SimpleNetNlp.Exceptions.UnhandledLibraryException: An unexpected exception was thrown by Stanford CoreNLP ---> edu.stanford.nlp.io.RuntimeIOException: Could not load affinity model at edu/stanford/nlp/models/naturalli/affinities: Unable to open "edu/stanford/nlp/models/naturalli/affinities/pp.tab.gz" as class path, filename or URL
It works well at POS taggting line. But OpenIe called, It hangs a minute and throws exception.
Hi and thanks for SimpleNetNlp. I just downloaded on SharpDevelop5.1 and after creating a Console Application, using .NET 4.5.2 I wanted to try that little example you have set up in the front page. But when I try to run the code I end up with System.TypeLoadException: could not load type 'SimpleNetNlp.Sentence'. I have name the project itself SimpleNetNLP, I hope that is not confusing. I have also installed all of the different packages for analyzing the text. I checked .dll names and they are correct. I also include the little sample code.
Program.txt
Thanks for you time in advance!
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Although not a bug in the c# code, this is a frustrating error which causes the instantiation of Sentence to be slower than required and is thrown for every new Sentence created.
Is there a workaround or means to suppress?
I'm getting the following error when trying to use the Sentence class inside an MVC controller :-
**Inner Exception 1:
RuntimeIOException: java.io.IOException: Unable to open "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz" as class path, filename or URL
Inner Exception 2:
IOException: Unable to open "edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz" as class path, filename or URL**
I thought it might be a permissions issue but I can load the file bytes with the following code in the controller :-
var binFolderPath = System.Web.HttpContext.Current.Server.MapPath("~/bin/");
var fileBytes= System.IO.File.ReadAllBytes(binFolderPath + "\edu\stanford\nlp\models\lexparser\englishPCFG.ser.gz");
Thanks in advance for any assistance.
Hi
When deploying to app services on azure, the edu folder with relevant tagger and tagger-property files are not getting created in bin folder and to me that seems to be the reason this is not working when deployed. Dev env works perfectly. The Nuget package shows to have successfully installed. Can you suggest what could be reason for this.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.