I am getting error by loading main.jape from demo in GATE Developer GUI. It seems like some class Japehelpers is needed. I would appreciate any help. Thanks.
Here there is a stack:
- Error: japehelpers.Japehelpers cannot be resolved to a type at line 23 in japeactionclasses.mention_owl_classnpATChain_ruleActionClass443
- Error: japehelpers.Japehelpers cannot be resolved to a type at line 23 in japeactionclasses.mention_owl_classnpATChain_ruleActionClass443
- The offending input was:
- 1 // mention_owl_classnpATChain_ruleActionClass443
- 2 package japeactionclasses;
- 3 import java.io.*;
- 4 import java.util.*;
- 5 import gate.*;
- 6 import gate.jape.*;
- 7 import gate.creole.ontology.*;
- 8 import gate.annotation.*;
- 9 import gate.util.*;
- 10
- 11 public class mention_owl_classnpATChain_ruleActionClass443
- 12 implements java.io.Serializable, RhsAction {
- 13 public void doit(gate.Document doc,
- 14 java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
- 15 gate.AnnotationSet annotations,
- 16 gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
- 17 gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
- 18
- 19 if (true) {
- 20
- 21 AnnotationSet as = (gate.AnnotationSet)bindings.get("ann");
- 22 Annotation a = (gate.Annotation)as.iterator().next();
- 23 japehelpers.Japehelpers myJapehelpers = new japehelpers.Japehelpers();
- 24 AnnotationSet chain = myJapehelpers.getAS("NP Chain", inputAS);
- 25 if(chain==null||chain.isEmpty())
- 26 {
- 27 //System.out.println("chain empty");
- 28 }
- 29 Integer chainId = null;
- 30
- 31 Iterator chainIt = chain.iterator();
- 32 while(chainIt.hasNext())
- 33 {
- 34 Annotation chainAnn = (Annotation)chainIt.next();
- 35 if(((ArrayList)(chainAnn.getFeatures().get("IDs"))).contains(a.getFeatures().get("id")))
- 36 chainId = chainAnn.getId();
- 37 }
- 38 FeatureMap outputFeatures = Factory.newFeatureMap();
- 39 outputFeatures.put("className", a.getFeatures().get("class"));
- 40
- 41 String instanceName = "";
- 42
- 43 try {
- 44 instanceName = doc.getContent().getContent(a.getStartNode().getOffset(), a.getEndNode().getOffset()).toString();
- 45 }
- 46 catch(Exception e) {
- 47 }
- 48
- 49 if(a.getFeatures().get("class").toString().compareToIgnoreCase("Document")==0) {
- 50 outputFeatures.put("instanceName",a.getFeatures().get("title"));
- 51 }
- 52 else if(a.getFeatures().get("class").toString().compareToIgnoreCase("Sentence")==0) {
- 53 outputFeatures.put("instanceName", instanceName);
- 54 }
- 55 else
- 56 outputFeatures.put("instanceName",instanceName);
- 57
- 58 outputFeatures.put("corefChain", chainId);
- 59 outputFeatures.put("representationId", a.getFeatures().get("id"));
- 60 outputAS.add(as.firstNode(), as.lastNode(), "OwlExportClassDomain", outputFeatures);
- 61
- 62 }
- 63 }
- 64 }
- gate.creole.ResourceInstantiationException: Error while parsing the grammar (file:/home/artjomk/Work/GateOwlTutorial/OwlExporterDemo/grammars/main/main.jape):
- at gate.creole.Transducer.init(Transducer.java:114)
- at gate.Factory.createResource(Factory.java:385)
- at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:220)
- at java.lang.Thread.run(Thread.java:636)
- Caused by: gate.util.GateRuntimeException: gate.util.GateException: There were errors; see error log for details!
- at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:160)
- at gate.jape.MultiPhaseTransducer.finish(MultiPhaseTransducer.java:126)
- at gate.jape.Batch.parseJape(Batch.java:216)
- at gate.jape.Batch.<init>(Batch.java:84)
- at gate.creole.Transducer.init(Transducer.java:96)
- ... 3 more
- Caused by: gate.util.GateException: There were errors; see error log for details!
- at gate.util.compilers.Eclipse.compile(Eclipse.java:398)
- at gate.util.Javac.loadClasses(Javac.java:46)
- at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:157)
- ... 7 more

Try the new 3.0-pre-release
Hi Artjom,
I just mailed you a pre-release of the new 3.0 version which we'll put up shortly. Let me know if this fixes the problem.
Cheers, René
3.0-pre-release
Hi Rene,
I have been having the same problem with the japehelpers.Hapehelpers class not being loaded
Could you please send me the pre release 3.0 version of OWLExporter
Cheers
Lesley
Contact me
I've tried to email you, but the email address in your profile does not seem to work. Please contact me: http://www.semanticsoftware.info/contact [6]