1

I am new in GATE and I am using it to conduct the machine learning. The configure file for Batching Learning PR is the following:

<?xml version="1.0"?>

-<ML-CONFIG>

<VERBOSITY level="1"/>

<SURROUND value="false"/>

<PARAMETER value="0.5" name="thresholdProbabilityClassification"/>

<multiClassification2Binary method="one-vs-others"/>

<EVALUATION method="kfold" ratio="0.66" runs="5"/>

<ENGINE options=" -p 50 -n 5 -optB 0.0 " implementationName="PAUM" nickname="PAUM"/>


-<DATASET>

<INSTANCE-TYPE>attitude</INSTANCE-TYPE>


-<NGRAM>

<NAME>ngram</NAME>

<NUMBER>1</NUMBER>

<CONSNUM>1</CONSNUM>


-<CONS-1>

<TYPE>Token</TYPE>

<FEATURE>root</FEATURE>

</CONS-1>

<!-- <CONS-2> <TYPE>Token</TYPE> <FEATURE>orth</FEATURE> </CONS-2> -->


</NGRAM>


-<ATTRIBUTE>

<NAME>Class</NAME>

<SEMTYPE>NOMINAL</SEMTYPE>

<TYPE>attitude</TYPE>

<FEATURE>feature</FEATURE>

<POSITION>0</POSITION>

<CLASS/>

</ATTRIBUTE>

</DATASET>

</ML-CONFIG>

The annotation I want the program to learn is called 'attitude', with feature called 'feature'. The value of the feature is just positive and negative.

However, every time I run the Batch Learning PR(Trainning mode), there will be an error like this:

java.lang.NullPointerException
at gate.learning.NLPFeaturesOfDoc.writeNLPFeaturesToFile(NLPFeaturesOfDoc.java:818)
at gate.learning.LightWeightLearningApi.annotations2NLPFeatures(LightWeightLearningApi.java:198)
at gate.learning.LearningAPIMain.execute(LearningAPIMain.java:594)
at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:291)
at gate.creole.SerialController.runComponent(SerialController.java:225)
at gate.creole.SerialController.executeImpl(SerialController.java:157)
at gate.creole.SerialAnalyserController.executeImpl(SerialAnalyserController.java:223)
at gate.creole.SerialAnalyserController.execute(SerialAnalyserController.java:126)
at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:291)
at gate.gui.SerialControllerEditor$RunAction$1.run(SerialControllerEditor.java:1728)
at java.lang.Thread.run(Unknown Source)

Since I can't debug during the midway within GATE, I don't understand what's wrong with the code.

Could anyone help?

Thanks!

Fan Yang
  • 23
  • 3

1 Answers1

0

I would suggest you to check file on which training process failed. It may happen that no features were produced by GATE (for example document content is empty and etc).

ashingel
  • 494
  • 3
  • 11