[
https://issues.apache.org/jira/browse/UIMA-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578011#action_12578011
]
Marshall Schor commented on UIMA-891:
-------------------------------------
If you do resultSpec.containsType(sometype, "en-uk") - in other words, the
query is whether the result spec has a type with the language "English" as
spoken in the "UK", then the logic for matching give a match when the result
spec has this type for the languages "en-uk", "en", or "x-unspecified". So
your last example is correct, above.
(Maybe you can add a test case to be sure :-) )
The comment in the code that does the language matching in
ResultSpecification_impl is:
* Languages matches if the query language is xxx-yyy and
* result spec languages contains:
* x-unspecified
* xxx-yyy
* xxx
So - you can query with a "sub-language" of what's in the result spec, but not
the other way around.
> uima example annotator does not work with the new Result spec design
> --------------------------------------------------------------------
>
> Key: UIMA-891
> URL: https://issues.apache.org/jira/browse/UIMA-891
> Project: UIMA
> Issue Type: Bug
> Components: Examples
> Affects Versions: 2.2.1
> Reporter: Michael Baessler
> Assignee: Michael Baessler
> Fix For: 2.2.2
>
>
> Annotators does not produce any output result since the use the ResultSpec
> API in a wrong way
> They do:
> resultSpec.containsType("org.apache.uima.tutorial.TimeAnnot")
> which checks the type for language x-unspecified
> But the annotator only works for "en" as mentioned in the output spec so they
> have to do a check like:
> resultSpec.containsType("org.apache.uima.tutorial.TimeAnnot","en")
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.