Skip to content

Commit

Permalink
Fix opennlp-wsd (requires PENN format)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Jul 8, 2024
1 parent 95c9caf commit a6f5381
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

import opennlp.tools.lemmatizer.DictionaryLemmatizer;
import opennlp.tools.postag.POSModel;
import opennlp.tools.postag.POSTagFormat;
import opennlp.tools.postag.POSTaggerME;
import opennlp.tools.tokenize.TokenizerME;
import opennlp.tools.tokenize.TokenizerModel;
Expand Down Expand Up @@ -295,7 +296,7 @@ public static DictionaryLemmatizer getLemmatizer() {
public static POSTaggerME getTagger() {
if (tagger == null) {
try {
tagger = new POSTaggerME(new POSModel(new File(taggerModelPath)));
tagger = new POSTaggerME(new POSModel(new File(taggerModelPath)), POSTagFormat.PENN);
} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit a6f5381

Please sign in to comment.