*
Hi here i am forwarding my java class.
package* com.iton.uima.annotator;
*
import* java.util.regex.Matcher;
*
import* java.util.regex.Pattern;
*
import* com.ibm.uima.analysis_component.JCasAnnotator_ImplBase;
*
import* com.ibm.uima.analysis_engine.AnalysisEngineProcessException;
*
import* com.ibm.uima.jcas.impl.JCas;
*
import* com.iton.uima.TestType;
*
public* *class* TestAnnotator *extends* JCasAnnotator_ImplBase
{
Pattern testPat = Pattern.*compile*("who");
@Override
*public* *void* process(JCas jCas) *throws* AnalysisEngineProcessException {
String docText = jCas.getDocumentText();
Matcher testMatch = testPat.matcher(docText);
*int* index = 0;
*while*(testMatch.find(index))
{
TestType testType = *new* TestType(jCas);
testType.setBegin(testMatch.start());
testType.setEnd(testMatch.end());
testType.setTestFeature("TestFeature");
testType.addToIndexes();
index = testMatch.end();
}
}
}
On 8/30/07, Thilo Goetz <[EMAIL PROTECTED]> wrote:
>
> Your Java code might be helpful. I'm not really
> sure what it is you are trying to achieve.
>
> --Thilo
>
> vijay vijay wrote:
> > HI
> >
> > i am new to this concept.After down loading
> UIMA_SDK_USR_GUIDE
> > the pdf file i have run one example.in that example i have mentioned
> > Parrtern is "hi",which is hardcoded.i have put that in text file,then i
> have
> > run the document analyzer and i got result.Now i want to look for same
> "HI"
> > to be searched from multiple files.so can u plz guide me.if u want iwill
> > send my java class file to u.
> >
> > vijay
> >
>