Skip to content

Instantly share code, notes, and snippets.

@agibsonccc
Created September 3, 2014 22:49
Show Gist options
  • Save agibsonccc/ef873b33ebda053b9d56 to your computer and use it in GitHub Desktop.
Save agibsonccc/ef873b33ebda053b9d56 to your computer and use it in GitHub Desktop.
/**
* Creates a tokenization,/stemming pipeline
* @return a tokenization/stemming pipeline
*/
public static AnalysisEngine defaultAnalysisEngine() {
try {
return AnalysisEngineFactory.createEngine(AnalysisEngineFactory.createEngineDescription(
SentenceAnnotator.getDescription(),
TokenizerAnnotator.getDescription()));
}catch(Exception e) {
throw new RuntimeException(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment