File tree 3 files changed +15
-0
lines changed
src/gate/plugin/learningframework
3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,11 @@ public Document process(Document doc) {
179
179
180
180
@ Override
181
181
public void afterLastDocument (Controller arg0 , Throwable t ) {
182
+ if (t !=null ) {
183
+ System .err .println ("An exception occurred during processing of documents, no training will be done" );
184
+ System .err .println ("Exception was " +t .getClass ()+": " +t .getMessage ());
185
+ return ;
186
+ }
182
187
System .out .println ("LearningFramework: Starting training engine " + engine );
183
188
System .out .println ("Training set classes: "
184
189
+ corpusRepresentation .getRepresentationMallet ().getPipe ().getTargetAlphabet ().toString ().replaceAll ("\\ n" , " " ));
Original file line number Diff line number Diff line change @@ -179,6 +179,11 @@ public Document process(Document doc) {
179
179
180
180
@ Override
181
181
public void afterLastDocument (Controller arg0 , Throwable t ) {
182
+ if (t !=null ) {
183
+ System .err .println ("An exception occurred during processing of documents, no training will be done" );
184
+ System .err .println ("Exception was " +t .getClass ()+": " +t .getMessage ());
185
+ return ;
186
+ }
182
187
System .out .println ("LearningFramework: Starting training engine " + engine );
183
188
System .out .println ("Training set classes: "
184
189
+ corpusRepresentation .getRepresentationMallet ().getPipe ().getTargetAlphabet ().toString ().replaceAll ("\\ n" , " " ));
Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ public Document process(Document doc) {
159
159
160
160
@ Override
161
161
public void afterLastDocument (Controller arg0 , Throwable t ) {
162
+ if (t !=null ) {
163
+ System .err .println ("An exception occurred during processing of documents, no training will be done" );
164
+ System .err .println ("Exception was " +t .getClass ()+": " +t .getMessage ());
165
+ return ;
166
+ }
162
167
System .out .println ("LearningFramework: Starting training engine " + engine );
163
168
System .out .println ("Training set size: " + corpusRepresentation .getRepresentationMallet ().size ());
164
169
if (corpusRepresentation .getRepresentationMallet ().getDataAlphabet ().size () > 20 ) {
You can’t perform that action at this time.
0 commit comments