Revision: 15886
http://gate.svn.sourceforge.net/gate/?rev=15886&view=rev
Author: renew
Date: 2012-06-12 13:43:36 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
catch exception to prevent LearningPR bug (#3501907) from crashing
pipelines
Modified Paths:
--------------
gate/trunk/plugins/Learning/src/gate/learning/DocFeatureVectors.java
Modified: gate/trunk/plugins/Learning/src/gate/learning/DocFeatureVectors.java
===================================================================
--- gate/trunk/plugins/Learning/src/gate/learning/DocFeatureVectors.java
2012-06-12 12:00:41 UTC (rev 15885)
+++ gate/trunk/plugins/Learning/src/gate/learning/DocFeatureVectors.java
2012-06-12 13:43:36 UTC (rev 15886)
@@ -67,7 +67,14 @@
if(feat[j] != null && Pattern.matches((".+\\[[-0-9]+\\]$"), feat[j])) {
int ind = feat[j].lastIndexOf('[');
String positionStr = feat[j].substring(ind + 1, feat[j].length() -
1);
- positionCurr = Integer.parseInt(positionStr);
+ try {
+ positionCurr = Integer.parseInt(positionStr);
+ }
+ catch(NumberFormatException e) {
+ // FIXME: Learning PR bug
+ e.printStackTrace();
+ break;
+ }
feat[j] = feat[j].substring(0, ind);
}
if(prevPosition != positionCurr && tempSize > 0) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs