I didn't attach anything in last email just pasted to the email but I guess no 
point highlighting any lines since the user list site is in plaintext.   While 
we're at it resolving the issue so attachments can be added can we also 
transition to a rich text forum to preserve formatting set by the user's email? 
:-)
 
> From: [email protected]
> To: [email protected]
> Subject: RE: Using Regex Annotator: Adding a default value for a type system 
> feature -RESOLVED
> Date: Wed, 6 Nov 2013 20:37:17 -0500
> 
> Richard,
>  
> I had no idea that the attachments weren't going through.....why not?   They 
> do for other apache user forums. 
>  
> Thank you so much for your prompt response and help,  all I had to do was add 
> the text 'computing' without any hyphens or quotes.   Sorry for wasting your 
> time on such a trivial case, I tried with the quotes around it "computing" 
> and didn't think to try it without.    I've attached and highlighted the line 
> for other users to see what was done to resolve the issue.   
>  
>       <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">computing</setFeature>
> 
> </annotation>
> 
> </createAnnotations> 
> 
> </concept> 
>  
> Regards,
> Paula
> 
>  
> > Subject: Re: Using Regex Annotator: Adding a default value for a type 
> > system feature
> > From: [email protected]
> > Date: Wed, 6 Nov 2013 22:33:32 +0100
> > To: [email protected]
> > 
> > Hi,
> > 
> > first, I think that the list strips attachments - at least I never got one 
> > in any of your past mails including this one.
> > 
> > Although, the documentation of the regex annotator doesn't seem to state 
> > it, setting feature values works for me:
> > 
> >     <createAnnotations>
> >       <annotation id="substQuot" 
> > type="de.tudarmstadt.ukp.dkpro.ugd.applychangesannotator.SofaChangeAnnotation">
> >         <begin group="0"/>
> >         <end group="0"/>
> >         <setFeature name="operation" type="String">replace</setFeature>
> >         <setFeature name="value" type="String">&quot;</setFeature>
> >         <setFeature name="reason" type="String">substQuot</setFeature>
> >       </annotation>
> >     </createAnnotations>
> > 
> > So the text in setFeature doesn't have to refer to a capturing group as far 
> > as I can tell (mind, it has been quite a while
> > since I last tried that).
> > 
> > -- Richard
> > 
> > On 06.11.2013, at 19:40, digital paula <[email protected]> wrote:
> > 
> > > 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