Skip to content
Permalink
Browse files

some helpful instructions

  • Loading branch information...
J38 authored and Stanford NLP committed Oct 25, 2018
1 parent 08da2af commit e1d1176173fa4f1df01f812bd5df832a6c14e010
@@ -0,0 +1,13 @@
This is an example Maven project with Stanford CoreNLP as a dependency.

Make sure to set the RAM with this command:

export MAVEN_OPTS="-Xmx14000m"

You can build the project with this command:

mvn compile

You can run example demos with a command like this:

mvn exec:java -Dexec.mainClass="edu.stanford.nlp.StanfordCoreNLPEnglishTestApp"
@@ -90,7 +90,7 @@ else if (granularity.equals("coarse"))
sourceNERTagClass = CoreAnnotations.NamedEntityTagAnnotation.class;
// switch tags
for (CoreLabel token : tokens) {
if (!"".equals(token.get(sourceNERTagClass)) && token.get(sourceNERTagClass) != null)
if (!token.get(sourceNERTagClass).equals("") && token.get(sourceNERTagClass) != null)
token.set(CoreAnnotations.NamedEntityTagAnnotation.class, token.get(sourceNERTagClass));
}
}

0 comments on commit e1d1176

Please sign in to comment.
You can’t perform that action at this time.