Revision: 19236
http://sourceforge.net/p/gate/code/19236
Author: markagreenwood
Date: 2016-04-13 10:43:05 +0000 (Wed, 13 Apr 2016)
Log Message:
-----------
a new feature to allow annotations that overlap rather than being contained
within the specified annotation type
Modified Paths:
--------------
gate/trunk/plugins/Format_CSV/gcp/csv4gcp.jar
gate/trunk/plugins/Format_CSV/gcp/src/gate/cloud/io/csv/CSVStreamingOutputHandler.java
Modified: gate/trunk/plugins/Format_CSV/gcp/csv4gcp.jar
===================================================================
(Binary files differ)
Modified:
gate/trunk/plugins/Format_CSV/gcp/src/gate/cloud/io/csv/CSVStreamingOutputHandler.java
===================================================================
---
gate/trunk/plugins/Format_CSV/gcp/src/gate/cloud/io/csv/CSVStreamingOutputHandler.java
2016-04-13 01:22:03 UTC (rev 19235)
+++
gate/trunk/plugins/Format_CSV/gcp/src/gate/cloud/io/csv/CSVStreamingOutputHandler.java
2016-04-13 10:43:05 UTC (rev 19236)
@@ -45,6 +45,8 @@
public static final String PARAM_ANNOTATION_SET_NAME = "annotationSetName";
public static final String PARAM_ANNOTATION_TYPE = "annotationType";
+
+ public static final String PARAM_CONTAINED_ONLY = "containedOnly";
private static final Logger logger = Logger
.getLogger(CSVStreamingOutputHandler.class);
@@ -58,6 +60,8 @@
protected String annotationSetName, annotationType;
protected String[] columns;
+
+ protected boolean containedOnly;
@Override
protected void configImpl(Map<String, String> configData) throws IOException,
@@ -99,6 +103,10 @@
// at the document level as if the param was missing
if(annotationType != null && annotationType.trim().equals(""))
annotationType = null;
+
+ // should we only look at annotations contained within the annotationType
or
+ // do we allow overlapping ones as well?
+ containedOnly = Boolean.parseBoolean(configData.get(PARAM_CONTAINED_ONLY));
}
@Override
@@ -191,8 +199,16 @@
if(within != null) {
// if we have been provided with an annotation to limit the search then
- // get just those contained within it
- annots = Utils.getContainedAnnotations(annots, within);
+ // get just those either....
+
+ if (containedOnly) {
+ // contained within the annotation
+ annots = Utils.getContainedAnnotations(annots, within);
+ }
+ else {
+ // or partially overlapping with it
+ annots = Utils.getOverlappingAnnotations(annots, within);
+ }
}
// if there are no annotations then we can quit
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs