Hi Again UIMA Community  (specifically Marshall and Richard ;-)
 
I've been working with the regex annotator  and adding new types to search on 
in text.  By the way, the documentation for the regex annotator has been really 
helpful in explaining how to use this add-on.
 
Okay,  I created a new type called 'Computing' that will annotate from text 
based on this regular expression 
  regEx="(comp[a-z0-9]+)"   l updated the concepts.xml file and the regex 
descriptor.   Everything works as I expect but what I'd like to do now is add a 
default value of 'computing'  to the feature I added 'setTextCapture'  so I 
have a mapping of all variations found in the text to be associated with one 
value.    
 
For example, lets say the text stated:   the computting system works as 
expected and the compituing center is set up correctly.
 
The two misspelled words for computing are annotated per the regex expression 
but for each annotation I want be able to also add a feature that has a 
specified default value, in this case it would be setTextCapture="computing".   
Is there a way to do this?   
 
Here's what I added to the concepts.xml file (the line setTextCapture is not 
there) but I don't know what to put for the setTextCapture to make it a default 
of "computing".   I can't just add "computing" it won't work since it has to be 
using a regular expression code it appears.  
 
        <concept name="Computing_Detection">                    <rules>         
           <rule                          regEx="(comp[a-z0-9]+)"               
        matchStrategy="matchAll"                                
matchType="uima.tcas.DocumentAnnotation" />                              
</rules>               <createAnnotations>                     <annotation 
id="compute"                type="org.apache.uima.Computing">                   
    <begin group="0" />                     <end group="0" />                   
    <setFeature name="getTextCapture" type="String" 
normalization="Trim">$0</setFeature><setFeature name="setTextCapture" 
type="String" don't know what to put here to make it have a value of 
"computing"</setFeature>                     </annotation>                   
</createAnnotations> </concept> 
 
I've also added an attachment so you can see what I mean as illustrated using 
the CVD tool.
 
Hope you guys can help.  
 
Thanks.
 
Regards,
Paula
                                          

Reply via email to