Skip to content

Commit e1d1176

Browse files
J38Stanford NLP
authored and
Stanford NLP
committed
some helpful instructions
1 parent 08da2af commit e1d1176

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
This is an example Maven project with Stanford CoreNLP as a dependency.
2+
3+
Make sure to set the RAM with this command:
4+
5+
export MAVEN_OPTS="-Xmx14000m"
6+
7+
You can build the project with this command:
8+
9+
mvn compile
10+
11+
You can run example demos with a command like this:
12+
13+
mvn exec:java -Dexec.mainClass="edu.stanford.nlp.StanfordCoreNLPEnglishTestApp"

src/edu/stanford/nlp/pipeline/DeterministicCorefAnnotator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ else if (granularity.equals("coarse"))
9090
sourceNERTagClass = CoreAnnotations.NamedEntityTagAnnotation.class;
9191
// switch tags
9292
for (CoreLabel token : tokens) {
93-
if (!"".equals(token.get(sourceNERTagClass)) && token.get(sourceNERTagClass) != null)
93+
if (!token.get(sourceNERTagClass).equals("") && token.get(sourceNERTagClass) != null)
9494
token.set(CoreAnnotations.NamedEntityTagAnnotation.class, token.get(sourceNERTagClass));
9595
}
9696
}

0 commit comments

Comments
 (0)