Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to remove UIMA annotations?
    text
    copied!<p>I'm using some UIMA annotators in a pipeline. It run tasks like: </p> <ul> <li>tokenizer </li> <li>sentence splitter</li> <li>gazetizer</li> <li><strong>My Annotator</strong> </li> </ul> <p>The problem is that I don't want to write ALL the annotations (Token, Sentence, SubToken, Time, myAnnotations, etc..) to the disk because the files gets very large quicky. </p> <p>I want to remove all the annotations and keep only the created by <strong>My Annotator</strong>.</p> <p>I'm working with the next libraries:</p> <ol> <li>uimaFIT 2.0.0</li> <li>ClearTK 1.4.1</li> <li>Maven</li> </ol> <p>And I'm using a <code>org.apache.uima.fit.pipeline.SimplePipeline</code> with:</p> <pre><code>SimplePipeline.runPipeline( UriCollectionReader.getCollectionReaderFromDirectory(filesDirectory), //directory with text files UriToDocumentTextAnnotator.getDescription(), StanfordCoreNLPAnnotator.getDescription(),//stanford tokenize, ssplit, pos, lemma, ner, parse, dcoref AnalysisEngineFactory.createEngineDescription(// XWriter.class, XWriter.PARAM_OUTPUT_DIRECTORY_NAME, outputDirectory, XWriter.PARAM_FILE_NAMER_CLASS_NAME, ViewURIFileNamer.class.getName()) ); </code></pre> <p>What I'm trying to do is to use the Standford NLP annotator(from ClearTK) and remove the useless annotation.</p> <p>How do I do this?</p> <p>From what I know, you can use the <code>removeFromIndexes();</code> method from with an Annotation instance.</p> <p>Do I need to create an UIMA processor and add it to my pipeline?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload