java gate api. Creating pipeline with success, how can i get the annotationsets from the docs processed?

StackOverflow https://stackoverflow.com/questions/4885717

  •  28-10-2019
  •  | 
  •  

Question

sorry in advance for my poor grammar.

I have created a pipeline with GATE API, i run it successfully. I created a serialanalysercontroller like this: pipeline = (SerialAnalyserController)Factory.createResource("gate.creole.SerialAnalyserController"); , then i load a corpus of files (previously populated)

pipeline.setCorpus(foo) and last, pipeline.execute().

It all works great and i see the results. My problem is that i cannot find the way to get the AnnotationSet for each document that was processed in the corpus. For example i want to find the AnnotationSet ("sentences") to find in which offsets the sentences start and stop in the original text file. The API does not tell how I will get the annotations from the SerialAnalyserController - how to get each gate.Document after the process pipeline has finished.

Thanks in advance

Was it helpful?

Solution

Ok, found it!

I get the corpus back, then because the Corpus is a list, with method get(x) i get which document I want and then I get the annotationSets.

Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top