Revision: 16852
http://sourceforge.net/p/gate/code/16852
Author: markagreenwood
Date: 2013-09-07 13:18:13 +0000 (Sat, 07 Sep 2013)
Log Message:
-----------
a little bit of tidying and simplification
Modified Paths:
--------------
gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java
Modified: gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java
===================================================================
--- gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java
2013-09-07 12:56:25 UTC (rev 16851)
+++ gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java
2013-09-07 13:18:13 UTC (rev 16852)
@@ -117,20 +117,13 @@
// check the parameters
if(document == null)
throw new ExecutionException("No document to process!");
- if(inputASName != null && inputASName.equals("")) inputASName = null;
- AnnotationSet inputAS =
- (inputASName == null) ? document.getAnnotations() : document
- .getAnnotations(inputASName);
+ AnnotationSet inputAS = document.getAnnotations(inputASName);
+
if(baseTokenAnnotationType == null ||
baseTokenAnnotationType.trim().length() == 0) { throw new
ExecutionException(
"No base Token Annotation Type provided!"); }
- if(outputASName != null && outputASName.equals("")) outputASName = null;
- AnnotationSet outputAS =
- (outputASName == null) ? document.getAnnotations() : document
- .getAnnotations(outputASName);
-
if(baseSentenceAnnotationType == null ||
baseSentenceAnnotationType.trim().length() == 0) { throw new
ExecutionException(
"No base Sentence Annotation Type provided!"); }
@@ -284,9 +277,7 @@
int end = annot.getEndNode().getOffset().intValue();
// get the annotations of type outputAnnotationType
- AnnotationSet outputAS =
- (outputASName == null) ? document.getAnnotations() : document
- .getAnnotations(outputASName);
+ AnnotationSet outputAS = document.getAnnotations(outputASName);
AnnotationSet annotations = outputAS.get(outputAnnotationType);
if(annotations == null || annotations.size() == 0) {
// add new annotation
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs