Hi Armando,

how do you define it.starred.odnamar.uima.tcas.Date?
Is the super type of "it.starred.odnamar.uima.tcas.Date" "uima.tcas.Annotation"?

Not sure if the setup in your scenario match the design. The annotation you 
specify as exception
(it.starred.odnamar.uima.tcas.Date) have to cover the annotation of the 
original match.

e.g.
<rule regEx="(car)(.)*" matchStrategy="matchAll" 
matchType="org.apache.uima.TokenAnnot">
  <ruleExceptions>      
    <exception matchType="org.apache.uima.SentenceAnnot">test</exception>
  </ruleExceptions>
</rule>

In that case the SentenceAnnot have to cover the TokenAnnot, if not, the 
exception is not evaluated.

That may also explains why your second test with the supertype 
uima.tcas.Annotation works because in
most cases you will have a covering annotation of type uima.tcas.Annotation.

-- Michael

Armando Stellato wrote:
> Hi all,
> 
>  
> 
> I'm using RegexAnnotator to annotate numbers, but excluding those which are
> part of already taken annotations such as Dates.
> 
>  
> 
> <ruleExceptions>
> 
> <exception matchType="it.starred.odnamar.uima.tcas.Date">.</exception>
> 
> </ruleExceptions>
> 
>  
> 
> This one does not work (the annotation for the number is taken even when it
> is covered by a Date), however, if I add the exception on
> uima.tcas.Annotation:
> 
>  
> 
> <ruleExceptions>
> 
> <exception matchType="it.starred.odnamar.uima.tcas.Date">.</exception>
> 
>       <exception matchType="uima.tcas.Annotation">.</exception>
> 
> </ruleExceptions>
> 
>  
> 
> The number annotation is not taken, as it should be. I tried with other ones
> and it seems it does not include those which are not built-in types
> 
>  
> 
> I already checked the type string for my date annotation and it is the right
> one. Also, the date annotation is taken, and the date annotator is put
> before the number annotator (so that the number annotator should actually
> find the date annotation) in the aggregate list.
> 
>  
> 
> Any suggestions?
> 
>  
> 
> Armando
> 
>  
> 
> 

Reply via email to