Skip to content

Commit

Permalink
Merge pull request #12 from dmhowcroft/build-ner-api
Browse files Browse the repository at this point in the history
Update NERApp to be compatible with current Stanford Core NLP
  • Loading branch information
mwhite14850 authored Nov 14, 2018
2 parents 6631dbd + 2a02c6b commit f35e058
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ccgbank/bin/ner/NERApp/src/nerapp/NERApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,38 @@ public static void main(String[] args) throws IOException {
for(String classMod : classifierMods) { if(classMod != null) { numClassifiers++; } }
switch (numClassifiers) {
case 1:
classifier = new NERClassifierCombiner(true, false, classifierMods[0]);
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0]);
break;
case 2:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1]);
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1]);
break;
case 3:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2]);
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2]);
break;
case 4:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3]);
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3]);
break;
case 5:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4]);
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4]);
break;
case 6:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifierMods[5]);
break;
case 7:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifierMods[5], classifierMods[6]);
break;
case 8:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifierMods[5], classifierMods[6], classifierMods[7]);
break;
case 9:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifierMods[5], classifierMods[6], classifierMods[7], classifierMods[8]);
break;
case 10:
classifier = new NERClassifierCombiner(true, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifier = new NERClassifierCombiner(true, false, false, classifierMods[0], classifierMods[1], classifierMods[2], classifierMods[3], classifierMods[4],
classifierMods[5], classifierMods[6], classifierMods[7], classifierMods[8], classifierMods[9]);
break;
default:
Expand Down Expand Up @@ -175,4 +175,4 @@ public void setWord(String string) {
this.wd = string;
}

}
}

0 comments on commit f35e058

Please sign in to comment.