The problem is that you don't have "Lookup" annotations you are trying to use in your JAPE program.
You need to add 2 additional resources:
LanguageAnalyser gazetter = (LanguageAnalyser)Factory.createResource(
"gate.creole.gazetteer.DefaultGazetteer");
LanguageAnalyser splitter = (LanguageAnalyser)Factory.createResource(
"gate.creole.splitter.SentenceSplitter");
Your processing resources should run in following order:
pipeline.add(tokeniser);
pipeline.add(gazetter);
pipeline.add(splitter);
pipeline.add(jape);
Gazetterr will create "Lookup" annotations.
Sentence splitter will stop creating "Organisation" annotations that span over two sentences.
that was tested, and it works for me.
...GATE initialised
Creating doc for file:/Users/andreyshafirin/tmp/testdoc.txt
Found annotations of the following types: [Lookup, Organisation, Token, Split, SpaceToken, Sentence]
PS:
I think there is a better approach to work with GATE from Java code. You can create application in GATE Developer, customize it and save it to file (here you will find how). Then you can load GATE application from your java code (see this example for you, and more other examples here to get idea how). This way you don't have to worry about bunch of details and features related to properties of processing resources (you will define and change them in GUI).
Good luck with GATE.