Revision: 14620
http://gate.svn.sourceforge.net/gate/?rev=14620&view=rev
Author: valyt
Date: 2011-11-30 11:14:35 +0000 (Wed, 30 Nov 2011)
Log Message:
-----------
Fix to ignore non-bindings (i.e. annotation IDs of -1) when using negative
constraints.
Modified Paths:
--------------
gate/trunk/plugins/JAPE_Plus/src/gate/jape/plus/SPTBase.java
Modified: gate/trunk/plugins/JAPE_Plus/src/gate/jape/plus/SPTBase.java
===================================================================
--- gate/trunk/plugins/JAPE_Plus/src/gate/jape/plus/SPTBase.java
2011-11-30 02:17:53 UTC (rev 14619)
+++ gate/trunk/plugins/JAPE_Plus/src/gate/jape/plus/SPTBase.java
2011-11-30 11:14:35 UTC (rev 14620)
@@ -267,7 +267,7 @@
if (bindingStack[i] == null) {
bindingStack[i] = new IntArrayList();
}
- bindingStack[i].add(aStep[j]);
+ if(aStep[j] >= 0) bindingStack[i].add(aStep[j]);
}
}
}
@@ -711,7 +711,7 @@
Predicate predicate =
predicatesByType[annotationType[annotationId]][predicateId];
- boolean result = calculatPredicateValue(annotationId, predicateId);
+ boolean result = calculatePredicateValue(annotationId, predicateId);
// store the calculated result
// first mark the predicate as computed
QuickBitVector
@@ -756,7 +756,7 @@
predicateId);
}
- protected boolean calculatPredicateValue(int annotationId, int predicateId) {
+ protected boolean calculatePredicateValue(int annotationId, int predicateId)
{
Predicate predicate =
predicatesByType[annotationType[annotationId]][predicateId];
@@ -1228,7 +1228,7 @@
for(Map.Entry<String, IntArrayList> entry : instance.bindings.entrySet()) {
AnnotationSet boundAnnots = new AnnotationSetImpl(document);
for(int i = 0; i < entry.getValue().size(); i++) {
- boundAnnots.add(annotation[entry.getValue().get(i)]);
+ boundAnnots.add(annotation[entry.getValue().getQuick(i)]);
}
newBindings.put(entry.getKey(), boundAnnots);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs