简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM