Example #1
0
 public override TokenStream Create(TokenStream input)
 {
     try
     {
         NLPLemmatizerOp lemmatizerOp = OpenNLPOpsFactory.GetLemmatizer(dictionaryFile, lemmatizerModelFile);
         return(new OpenNLPLemmatizerFilter(input, lemmatizerOp));
     }
     catch (IOException e)
     {
         throw new Exception(e.ToString(), e);
     }
 }
Example #2
0
 public override TokenStream Create(TokenStream input)
 {
     try
     {
         NLPLemmatizerOp lemmatizerOp = OpenNLPOpsFactory.GetLemmatizer(dictionaryFile, lemmatizerModelFile);
         return(new OpenNLPLemmatizerFilter(input, lemmatizerOp));
     }
     catch (Exception e) when(e.IsIOException())
     {
         throw RuntimeException.Create(e);
     }
 }