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); } }
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); } }