uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas G. (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-2808) JCasUtil Subiterator returns annotations which are not within borders of the container (parent) annotation if parameter "strict" is set to "false"
Date Tue, 16 Apr 2013 07:03:16 GMT

    [ https://issues.apache.org/jira/browse/UIMA-2808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13632632#comment-13632632
] 

Thomas G. commented on UIMA-2808:
---------------------------------

I've tried know 

 CAS cas = sa.getCAS();
                try {
                    cas.getJCas();
                } catch (CASException ex) {
                    ex.printStackTrace();
                }
		 Iterator<AnnotationFS> it3 = ((AnnotationIndex<AnnotationFS>) cas.getAnnotationIndex(CasUtil.getType(cas,
ValueAnnotation.class)))
				.subiterator(sa, false, false);

and now it compiles, thanks! "sa" is the current "SentenceAnnotation"

Nevertheless, the overlapping error as described still occurs.
                
> JCasUtil Subiterator returns annotations which are not within borders of the container
(parent) annotation if parameter "strict" is set to "false"
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-2808
>                 URL: https://issues.apache.org/jira/browse/UIMA-2808
>             Project: UIMA
>          Issue Type: Bug
>            Reporter: Thomas G.
>         Attachments: JCasUtilSubiteratorUIMATest.zip
>
>
> * JCasUtil Subiterator returns annotations which are not within the border of the container
(parent) annotation if parameter "strict" is set to "false"
> * See attached maven project for test setup, java classes, a SIMPLIFIED typesystem and
the test CAS xml-file.
> * We have two annotations, "SentenceAnnotation" and "ValueAnnotation". A "SentenceAnnotation"
covers a sentence and the "ValueAnnotation" covers a numerical value. 
> * We have the following example plank text:
> ** "This is sentence A with no value. This is sentence B with value 377."
> ** Creates two sentence annotations ("This is sentence A with no value." and "This is
sentence B with value 377.") and one value annotation ("377").
> ** Now, if i want to get all "ValueAnnotation" within a "SentenceAnnotation", i iterate
over each "SentenceAnnotation" and use JCasUtil.iterator(...) to get the ValueAnnotations
with the following parameters: JCasUtil.iterator(currentSentence, ValueAnnotation.class, false,
false);
> ** As a result, i get for the first sentence also the value of the second sentence and
this might be wrong because even if "strict" is set to "false", the  begin of the "ValueAnnotation"
should be smaller than the end of the "SentenceAnnnotation". But in the example given the
begin of the "ValueAnnotation" is after the end of the FIRST "SentenceAnnotation"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message