There's more...

We can also create a sentence iterator using UimaSentenceIterator by passing an analysis engine, as shown in the following code:

SentenceIterator iterator = new UimaSentenceIterator(path,AnalysisEngineFactory.createEngine( AnalysisEngineFactory.createEngineDescription(TokenizerAnnotator.getDescription(), SentenceAnnotator.getDescription())));

The concept of an analysis engine is borrowed from UIMA's text-processing pipeline. DL4J has standard analysis engines available for common tasks that enable further text customization and decide how sentences are defined. Analysis engines are thread safe compared to OpenNLP text-processing pipelines. ClearTK-based pipelines are also used to handle common text-processing tasks in DL4J. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset