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

786 views Asked by At

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

1

There are 1 answers

0
maiky On BEST ANSWER

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