Unable to load Jape Transducer


Douglas Lopes de Souza
 

I'm following the tutorial steps and I've been trying to solve the problem of loading the 'main.jape' file to Processing Resoucers for a few hours.
That's too many lines of error log. The first line of the error is:
Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass59
I had similar problem adding a new ANNIE Gazzetteer with the resources folder file 'mylists.def':
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Desktop/GATETutorial- 2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
In this second case I solved by putting the mylists.def file to the desktop folder.
 
I'm using version 9.0.1, build 5271e02 and java version 1.8.0_202


Diana Maynard
 

Hi Douglas
We would need to see more of the error log for the JAPE problem to diagnose it. But do read it carefully as usually it does give quite a good indication of the problem. Also please clarify if you are loading the default JAPE grammar or a modified version of the default one.
Diana

On 24 Apr 2022, at 21:47, Douglas Lopes de Souza <d229316@...> wrote:

I'm following the tutorial steps and I've been trying to solve the problem of loading the 'main.jape' file to Processing Resoucers for a few hours.
That's too many lines of error log. The first line of the error is:
Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass59
I had similar problem adding a new ANNIE Gazzetteer with the resources folder file 'mylists.def':
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Desktop/GATETutorial- 2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
In this second case I solved by putting the mylists.def file to the desktop folder.

I'm using version 9.0.1, build 5271e02 and java version 1.8.0_202


Douglas Lopes de Souza
 

Hi Diana!
Thank you for the prompt response.
I tried to discover the reason, read all the erro log, but I think it's beyond my limits.
Im following the GateTutorial -2010 (https://gate.ac.uk/wiki/quick-start/GATE-Tutorial-2010-Gate4.0.pdf)

This is what happens when I try to load the  'mylists.def' file to ANNIE Gazetteer:
Odd pair: >IDEAS<
Odd pair: >IDEAS<
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:285)
at gate.creole.gazetteer.DefaultGazetteer.init(DefaultGazetteer.java:126)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:530)
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:279)
... 4 more
Caused by: gate.creole.ResourceInstantiationException: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:206)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:194)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:156)
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:522)
... 5 more
Caused by: gate.util.GateRuntimeException: Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:198)
... 8 more
Caused by: gate.util.GateRuntimeException: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerNode.getFeatures(GazetteerNode.java:156)
at gate.creole.gazetteer.GazetteerNode.<init>(GazetteerNode.java:97)
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:195)
... 8 more
I figured it could be related to the save location of the file and it only seems to accept it when I put the file directly on the desktop.


And this is when I try to load the 'main.jape' file to the  Jape Transducer.
Error: annotations cannot be resolved at line 27 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier1ActionClass256

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier1ActionClass256
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier1ActionClass256
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier1"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conjAnnots = bindings.get("conj");
22      if(conjAnnots != null && conjAnnots.size() != 0) {
23  
24      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj");
25   gate.FeatureMap newFeatures= Factory.newFeatureMap();
26   newFeatures.put("rule","ConjunctionIdentifier1");
27   annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
28      
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass258

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass258
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass258
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass257

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass257
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass257
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

gate.util.GateRuntimeException: gate.util.GateException: There were errors; see error log for details!
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:197)
at gate.jape.MultiPhaseTransducer.finish(MultiPhaseTransducer.java:129)
at gate.jape.Batch.parseJape(Batch.java:170)
at gate.jape.Batch.<init>(Batch.java:100)
at gate.creole.Transducer.init(Transducer.java:119)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateException: There were errors; see error log for details!
at gate.util.compilers.Eclipse.compile(Eclipse.java:442)
at gate.util.Javac.loadClasses(Javac.java:58)
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:194)
... 7 more
In this case I cant make it works changing the file to another location like the desktop folder.
Can you help me with this?

Regards,

Douglas

Em seg., 25 de abr. de 2022 às 04:48, Diana Maynard via groups.io <d.maynard=sheffield.ac.uk@groups.io> escreveu:
Hi Douglas
We would need to see more of the error log for the JAPE problem to diagnose it. But do read it carefully as usually it does give quite a good indication of the problem. Also please clarify if you are loading the default JAPE grammar or a modified version of the default one.
Diana



> On 24 Apr 2022, at 21:47, Douglas Lopes de Souza <d229316@...> wrote:
>
> I'm following the tutorial steps and I've been trying to solve the problem of loading the 'main.jape' file to Processing Resoucers for a few hours.
> That's too many lines of error log. The first line of the error is:
> Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass59
> I had similar problem adding a new ANNIE Gazzetteer with the resources folder file 'mylists.def':
> gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Desktop/GATETutorial- 2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
> In this second case I solved by putting the mylists.def file to the desktop folder.

> I'm using version 9.0.1, build 5271e02 and java version 1.8.0_202
>







Jan Dedek
 

Hi to all.

Thank you Douglas for the full log with all the details.

The first issue (the gazetteer one) seems to me that can be resolved by changing the gazetterFeatureSeparator to something different than ":" e.g. to "\t" (tab character).

The second issue (the jape one) seems to be caused by very old jape files used in the tutorial. According to the GATE change log: the annotations variable was removed in GATE 8.0 .
See https://gate.ac.uk/sale/tao/splitap1.html#sec:changes:8.0
  • Many deprecated classes, fields and methods have been removed. If you were previously calling any of these deprecated APIs you will need to update your code accordingly. Also some classes in the GATE core that were only used by one plugin have been moved into the respective plugin’s source tree. In particular, Java RHS actions in JAPE rules no longer provide the long-deprecated annotations variable – use inputAS or outputAS as appropriate.
The jape files need to be edited: the annotations variable must be replaced by inputAS or outputAS.

JD




st 27. 4. 2022 v 21:01 odesílatel Douglas Lopes de Souza <d229316@...> napsal:

Hi Diana!
Thank you for the prompt response.
I tried to discover the reason, read all the erro log, but I think it's beyond my limits.
Im following the GateTutorial -2010 (https://gate.ac.uk/wiki/quick-start/GATE-Tutorial-2010-Gate4.0.pdf)

This is what happens when I try to load the  'mylists.def' file to ANNIE Gazetteer:
Odd pair: >IDEAS<
Odd pair: >IDEAS<
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:285)
at gate.creole.gazetteer.DefaultGazetteer.init(DefaultGazetteer.java:126)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:530)
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:279)
... 4 more
Caused by: gate.creole.ResourceInstantiationException: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:206)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:194)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:156)
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:522)
... 5 more
Caused by: gate.util.GateRuntimeException: Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:198)
... 8 more
Caused by: gate.util.GateRuntimeException: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerNode.getFeatures(GazetteerNode.java:156)
at gate.creole.gazetteer.GazetteerNode.<init>(GazetteerNode.java:97)
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:195)
... 8 more
I figured it could be related to the save location of the file and it only seems to accept it when I put the file directly on the desktop.


And this is when I try to load the 'main.jape' file to the  Jape Transducer.
Error: annotations cannot be resolved at line 27 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier1ActionClass256

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier1ActionClass256
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier1ActionClass256
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier1"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conjAnnots = bindings.get("conj");
22      if(conjAnnots != null && conjAnnots.size() != 0) {
23  
24      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj");
25   gate.FeatureMap newFeatures= Factory.newFeatureMap();
26   newFeatures.put("rule","ConjunctionIdentifier1");
27   annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
28      
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass258

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass258
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass258
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass257

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass257
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass257
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

gate.util.GateRuntimeException: gate.util.GateException: There were errors; see error log for details!
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:197)
at gate.jape.MultiPhaseTransducer.finish(MultiPhaseTransducer.java:129)
at gate.jape.Batch.parseJape(Batch.java:170)
at gate.jape.Batch.<init>(Batch.java:100)
at gate.creole.Transducer.init(Transducer.java:119)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateException: There were errors; see error log for details!
at gate.util.compilers.Eclipse.compile(Eclipse.java:442)
at gate.util.Javac.loadClasses(Javac.java:58)
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:194)
... 7 more
In this case I cant make it works changing the file to another location like the desktop folder.
Can you help me with this?

Regards,

Douglas

Em seg., 25 de abr. de 2022 às 04:48, Diana Maynard via groups.io <d.maynard=sheffield.ac.uk@groups.io> escreveu:
Hi Douglas
We would need to see more of the error log for the JAPE problem to diagnose it. But do read it carefully as usually it does give quite a good indication of the problem. Also please clarify if you are loading the default JAPE grammar or a modified version of the default one.
Diana



> On 24 Apr 2022, at 21:47, Douglas Lopes de Souza <d229316@...> wrote:
>
> I'm following the tutorial steps and I've been trying to solve the problem of loading the 'main.jape' file to Processing Resoucers for a few hours.
> That's too many lines of error log. The first line of the error is:
> Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass59
> I had similar problem adding a new ANNIE Gazzetteer with the resources folder file 'mylists.def':
> gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Desktop/GATETutorial- 2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
> In this second case I solved by putting the mylists.def file to the desktop folder.

> I'm using version 9.0.1, build 5271e02 and java version 1.8.0_202
>







Douglas Lopes de Souza
 

It works!

I did as you suggested and replaced all variables "annotatios.add" with "inputAS.add" and everything worked. In the case of Gazzeteer it also worked perfectly!
Thanks for the help and with this exercise I understood a little more about the syntax used in the files.
Thank you very much!

Douglas

Em qui., 28 de abr. de 2022 às 04:01, Jan Dedek <dedekj@...> escreveu:

Hi to all.

Thank you Douglas for the full log with all the details.

The first issue (the gazetteer one) seems to me that can be resolved by changing the gazetterFeatureSeparator to something different than ":" e.g. to "\t" (tab character).

The second issue (the jape one) seems to be caused by very old jape files used in the tutorial. According to the GATE change log: the annotations variable was removed in GATE 8.0 .
See https://gate.ac.uk/sale/tao/splitap1.html#sec:changes:8.0
  • Many deprecated classes, fields and methods have been removed. If you were previously calling any of these deprecated APIs you will need to update your code accordingly. Also some classes in the GATE core that were only used by one plugin have been moved into the respective plugin’s source tree. In particular, Java RHS actions in JAPE rules no longer provide the long-deprecated annotations variable – use inputAS or outputAS as appropriate.
The jape files need to be edited: the annotations variable must be replaced by inputAS or outputAS.

JD




st 27. 4. 2022 v 21:01 odesílatel Douglas Lopes de Souza <d229316@...> napsal:
Hi Diana!
Thank you for the prompt response.
I tried to discover the reason, read all the erro log, but I think it's beyond my limits.
Im following the GateTutorial -2010 (https://gate.ac.uk/wiki/quick-start/GATE-Tutorial-2010-Gate4.0.pdf)

This is what happens when I try to load the  'mylists.def' file to ANNIE Gazetteer:
Odd pair: >IDEAS<
Odd pair: >IDEAS<
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:285)
at gate.creole.gazetteer.DefaultGazetteer.init(DefaultGazetteer.java:126)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:530)
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:279)
... 4 more
Caused by: gate.creole.ResourceInstantiationException: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:206)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:194)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:156)
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:522)
... 5 more
Caused by: gate.util.GateRuntimeException: Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:198)
... 8 more
Caused by: gate.util.GateRuntimeException: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerNode.getFeatures(GazetteerNode.java:156)
at gate.creole.gazetteer.GazetteerNode.<init>(GazetteerNode.java:97)
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:195)
... 8 more
I figured it could be related to the save location of the file and it only seems to accept it when I put the file directly on the desktop.


And this is when I try to load the 'main.jape' file to the  Jape Transducer.
Error: annotations cannot be resolved at line 27 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier1ActionClass256

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier1ActionClass256
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier1ActionClass256
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier1"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conjAnnots = bindings.get("conj");
22      if(conjAnnots != null && conjAnnots.size() != 0) {
23  
24      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj");
25   gate.FeatureMap newFeatures= Factory.newFeatureMap();
26   newFeatures.put("rule","ConjunctionIdentifier1");
27   annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
28      
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass258

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass258
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass258
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass257

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass257
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass257
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

gate.util.GateRuntimeException: gate.util.GateException: There were errors; see error log for details!
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:197)
at gate.jape.MultiPhaseTransducer.finish(MultiPhaseTransducer.java:129)
at gate.jape.Batch.parseJape(Batch.java:170)
at gate.jape.Batch.<init>(Batch.java:100)
at gate.creole.Transducer.init(Transducer.java:119)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateException: There were errors; see error log for details!
at gate.util.compilers.Eclipse.compile(Eclipse.java:442)
at gate.util.Javac.loadClasses(Javac.java:58)
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:194)
... 7 more
In this case I cant make it works changing the file to another location like the desktop folder.
Can you help me with this?

Regards,

Douglas

Em seg., 25 de abr. de 2022 às 04:48, Diana Maynard via groups.io <d.maynard=sheffield.ac.uk@groups.io> escreveu:
Hi Douglas
We would need to see more of the error log for the JAPE problem to diagnose it. But do read it carefully as usually it does give quite a good indication of the problem. Also please clarify if you are loading the default JAPE grammar or a modified version of the default one.
Diana



> On 24 Apr 2022, at 21:47, Douglas Lopes de Souza <d229316@...> wrote:
>
> I'm following the tutorial steps and I've been trying to solve the problem of loading the 'main.jape' file to Processing Resoucers for a few hours.
> That's too many lines of error log. The first line of the error is:
> Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass59
> I had similar problem adding a new ANNIE Gazzetteer with the resources folder file 'mylists.def':
> gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Desktop/GATETutorial- 2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
> In this second case I solved by putting the mylists.def file to the desktop folder.

> I'm using version 9.0.1, build 5271e02 and java version 1.8.0_202
>







Ian Roberts
 

For reference for anyone else reading this - it's generally better to use outputAS when you're adding annotations to the output, and inputAS only when you're dealing with existing annotations from the input, as this is in line with how the generated code from regular :label.Type = {} actions works.  If you add annotations to inputAS then it will confuse anyone who tries to change the outputASName runtime parameter and finds your grammar creating annotations in the wrong set...

Ian

On 28/04/2022 20:09, Douglas Lopes de Souza wrote:
It works!

I did as you suggested and replaced all variables "annotatios.add" with "inputAS.add" and everything worked. In the case of Gazzeteer it also worked perfectly!
Thanks for the help and with this exercise I understood a little more about the syntax used in the files.
Thank you very much!

Douglas

Em qui., 28 de abr. de 2022 às 04:01, Jan Dedek <dedekj@...> escreveu:
Hi to all.

Thank you Douglas for the full log with all the details.

The first issue (the gazetteer one) seems to me that can be resolved by changing the gazetterFeatureSeparator to something different than ":" e.g. to "\t" (tab character).

The second issue (the jape one) seems to be caused by very old jape files used in the tutorial. According to the GATE change log: the annotations variable was removed in GATE 8.0 .
See https://gate.ac.uk/sale/tao/splitap1.html#sec:changes:8.0
  • Many deprecated classes, fields and methods have been removed. If you were previously calling any of these deprecated APIs you will need to update your code accordingly. Also some classes in the GATE core that were only used by one plugin have been moved into the respective plugin’s source tree. In particular, Java RHS actions in JAPE rules no longer provide the long-deprecated annotations variable – use inputAS or outputAS as appropriate.
The jape files need to be edited: the annotations variable must be replaced by inputAS or outputAS.

JD




st 27. 4. 2022 v 21:01 odesílatel Douglas Lopes de Souza <d229316@...> napsal:
Hi Diana!
Thank you for the prompt response.
I tried to discover the reason, read all the erro log, but I think it's beyond my limits.
Im following the GateTutorial -2010 (https://gate.ac.uk/wiki/quick-start/GATE-Tutorial-2010-Gate4.0.pdf)

This is what happens when I try to load the  'mylists.def' file to ANNIE Gazetteer:
Odd pair: >IDEAS<
Odd pair: >IDEAS<
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:285)
at gate.creole.gazetteer.DefaultGazetteer.init(DefaultGazetteer.java:126)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:530)
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:279)
... 4 more
Caused by: gate.creole.ResourceInstantiationException: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:206)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:194)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:156)
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:522)
... 5 more
Caused by: gate.util.GateRuntimeException: Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Documents/GATETutorial-2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:198)
... 8 more
Caused by: gate.util.GateRuntimeException: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
at gate.creole.gazetteer.GazetteerNode.getFeatures(GazetteerNode.java:156)
at gate.creole.gazetteer.GazetteerNode.<init>(GazetteerNode.java:97)
at gate.creole.gazetteer.GazetteerList.load(GazetteerList.java:195)
... 8 more
I figured it could be related to the save location of the file and it only seems to accept it when I put the file directly on the desktop.


And this is when I try to load the 'main.jape' file to the  Jape Transducer.
Error: annotations cannot be resolved at line 27 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier1ActionClass256

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier1ActionClass256
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier1ActionClass256
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier1"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conjAnnots = bindings.get("conj");
22      if(conjAnnots != null && conjAnnots.size() != 0) {
23  
24      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj");
25   gate.FeatureMap newFeatures= Factory.newFeatureMap();
26   newFeatures.put("rule","ConjunctionIdentifier1");
27   annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
28      
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass258

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass258
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass258
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass257

The offending input was:

 1  // ConjunctionIdentifierConjunctionIdentifier2ActionClass257
 2  package japeactionclasses;
 3  import gate.*;
 4  import java.io.*;
 5  import java.util.*;
 6  import gate.util.*;
 7  import gate.jape.*;
 8  import gate.creole.ontology.*;
 9  
10  public class ConjunctionIdentifierConjunctionIdentifier2ActionClass257
11  implements java.io.Serializable, gate.jape.RhsAction {
12    private gate.jape.ActionContext ctx;
13    public java.lang.String ruleName() { return "ConjunctionIdentifier2"; }
14    public java.lang.String phaseName() { return "ConjunctionIdentifier"; }
15    public void setActionContext(gate.jape.ActionContext ac) { ctx = ac; }
16    public gate.jape.ActionContext getActionContext() { return ctx; }
17    public void doit(gate.Document doc,
18                     java.util.Map<java.lang.String, gate.AnnotationSet> bindings,
19                     gate.AnnotationSet inputAS, gate.AnnotationSet outputAS,
20                     gate.creole.ontology.Ontology ontology) throws gate.jape.JapeException {
21      gate.AnnotationSet conj2Annots = bindings.get("conj2");
22      if(conj2Annots != null && conj2Annots.size() != 0) {
23  
24  
25      gate.AnnotationSet matchedAnns= (gate.AnnotationSet) bindings.get("conj2");
26      gate.FeatureMap newFeatures= Factory.newFeatureMap();
27      newFeatures.put("rule","ConjunctionIdentifierr21");
28      annotations.add(matchedAnns.firstNode(),matchedAnns.lastNode(),"CC", newFeatures);
29  
30      }
31    }
32  }

gate.util.GateRuntimeException: gate.util.GateException: There were errors; see error log for details!
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:197)
at gate.jape.MultiPhaseTransducer.finish(MultiPhaseTransducer.java:129)
at gate.jape.Batch.parseJape(Batch.java:170)
at gate.jape.Batch.<init>(Batch.java:100)
at gate.creole.Transducer.init(Transducer.java:119)
at gate.Factory.createResource(Factory.java:431)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
at java.lang.Thread.run(Thread.java:748)
Caused by: gate.util.GateException: There were errors; see error log for details!
at gate.util.compilers.Eclipse.compile(Eclipse.java:442)
at gate.util.Javac.loadClasses(Javac.java:58)
at gate.jape.SinglePhaseTransducer.finish(SinglePhaseTransducer.java:194)
... 7 more
In this case I cant make it works changing the file to another location like the desktop folder.
Can you help me with this?

Regards,

Douglas

Em seg., 25 de abr. de 2022 às 04:48, Diana Maynard via groups.io <d.maynard=sheffield.ac.uk@groups.io> escreveu:
Hi Douglas
We would need to see more of the error log for the JAPE problem to diagnose it. But do read it carefully as usually it does give quite a good indication of the problem. Also please clarify if you are loading the default JAPE grammar or a modified version of the default one.
Diana



> On 24 Apr 2022, at 21:47, Douglas Lopes de Souza <d229316@...> wrote:
>
> I'm following the tutorial steps and I've been trying to solve the problem of loading the 'main.jape' file to Processing Resoucers for a few hours.
> That's too many lines of error log. The first line of the error is:
> Error: annotations cannot be resolved at line 28 in japeactionclasses.ConjunctionIdentifierConjunctionIdentifier2ActionClass59
> I had similar problem adding a new ANNIE Gazzetteer with the resources folder file 'mylists.def':
> gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: companies.lst: class gate.util.GateRuntimeException:Could not read gazetteer entry 14104 from URL file:/C:/Users/dglop/Desktop/GATETutorial- 2010/resources/gazetteers/companies.lst: Correct format for gazetteer entry features is: [entry]([separator][featureName]=[featureValue])*
> In this second case I solved by putting the mylists.def file to the desktop folder.

> I'm using version 9.0.1, build 5271e02 and java version 1.8.0_202
>







-- 
Ian Roberts               | Department of Computer Science
i.roberts@...  | University of Sheffield, UK