uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Grivolla (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 Thu, 11 Apr 2013 10:39:16 GMT

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

Jens Grivolla commented on UIMA-2808:
-------------------------------------

I don't see any use of subiterator in your Annotator.java?
                
> 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