All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.pipelines.groovy.removeUnwantedTokens4LDA.groovy Maven / Gradle / Ivy

Go to download

A GATE plugin that provides many different machine learning algorithms for a wide range of NLP-related machine learning tasks like text classification, tagging, or chunking.

There is a newer version: 4.2
Show newest version
// Remove all the TokenWord annotations within Unwanted annotations
import gate.Utils

Set toDelete = []

for(Annotation unwanted : inputAS.get("Unwanted")) {
  contained = gate.Utils.getContainedAnnotations(inputAS, unwanted)
  toDelete.addAll(contained)
}

outputAS.removeAll(toDelete)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy