Closed hendyharf closed 8 years ago
I think that it is stack size issue:
Please try to switch to 64bit
version of IISExpress - https://github.com/sergey-tihon/Stanford.NLP.NET/issues/43#issuecomment-190186401
Or deploy to real IIS - https://github.com/sergey-tihon/Stanford.NLP.NET/issues/15#issuecomment-77526331
I've just changed to 64 bit. I don't know if it's working or not, but I get another issue:
Could not load file or assembly 'slf4j-api, Version=1.7.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
error here:
var lp = LexicalizedParser.loadModel(modelsDirectory + @"\lexparser\englishPCFG.ser.gz");
What's wrong?
Not sure about the reason, this dll
is in NuGet package.
What NuGet packages you referenced? Your code from the sample for Stanford.NLP.Parser
but you use it with Stanford.NLP.CoreNLP
.
You definitely should not refernce both packages from NuGet.
I'm using only Stanford.NLP.CoreNLP
. But anyway this is already working! But why it takes so much times to me, like 23seconds? A lot of exception A first chance exception of type 'java.lang.NoSuchFieldException' occurred in IKVM.OpenJDK.Core.dll
and
A first chance exception of type 'java.lang.NoSuchMethodException' occurred in IKVM.OpenJDK.Core.dll
. Is there anything wrong with it?
Model initialization if long operation and you probably should not do it on each call.
Currently I'm building a web application to extract the subjects, predicates, and objects of the sentences with Stanford CoreNLP (Dependency Parser). My solution so far contains two projects, NLP (Console Application) and the WebApp (C# ASP.NET-MVC EF) itself.
I have a View called Create that contains an input text box and a button.
It will parse the sentence to the Create function inside the TextController. Then the sentence will be passed to a function FindPOS in a class named DependencyParser.cs in the NLP project.
This FindPOS function will return an array of string of a processed sentence (Subject, Predicate, Object). This code is a purely from your code Stanford NLP Parser for .NET, so I just copy-paste it to this function.
After I compile the solution, then I input sentence to the textbox (i.e. "My mother told me not to drink too much sugar water") and click the Find button in the page Create View, I got this following error: "Object reference not set to an instance of an object" in the line var tree = lp.apply(rawWords);
Why is this happened? I've already installed the NuGet package to the NLP project "Stanford CoreNLP" and downloaded the database of the Stanford CoreNLP from the official website and put it in the NLP project
/bin/Debug
. I've also already Added the Reference of the NLP project to the WebApp project and write the using NLP; in the TextController and I've already Debug if the sentence is passed or not to the FindPOS function (It's passed).I've already tried to make the NLP project as the startup project then compile it as a Console Application, It works very well, nothing problem. It executes the
jarRoot
in the directory filebin/Debug
.Why does the
jarRoot
not executed when compiling the solution as the WebApp startup project? Or is it something wrong with the .NET Framework version? Both projects are in the same version, 4.5. Are there any solutions for this?Thank you.