Hi
   i am trying uima as web application,i got an out put in browser which is
like this:::

Test UIMA Servlet Begin::0
Test UIMA Servlet End::348
Test UIMA Servlet Content::Hi welcome to UIMA?what it mean?who is working on
this? UIMA stands for unstructured information management
architecture.asper my knowledge Michael who is working on it from long
time and adam who
also works on the same topic. and who is this vijay? he is started learning
this one month back.And sunil is his guide to show the path to him.
Test UIMA Servlet End::uima.tcas.DocumentAnnotation

here i want to get only annotations not ant thing else,i have wriiten code
like this in servlet process method
*

private* *static* *void* processFile( File aFile, AnalysisEngine aAE,

CAS aCAS, PrintStream out)

*throws* IOException, AnalysisEngineProcessException

{

System.*out*.println("Processing file " + aFile.getName());

FileInputStream fis = *null*;

*try
*

{

fis = *new* FileInputStream(aFile );

*byte*[] contents = *new* *byte*[(*int*)aFile.length() ];

fis.read( contents );

String document = *new* String(contents, "UTF-8");

document = document.trim();

aCAS.setDocumentText(document);

aAE.process(aCAS);

FSIndex fsIndex = aCAS.getAnnotationIndex();

Iterator itr = fsIndex.iterator();

*while*(itr.hasNext())

{

DocumentAnnotation annot = (DocumentAnnotation)itr.next();

out.println("Test UIMA Servlet Begin::"+annot.getBegin()+"<br>");

out.println("Test UIMA Servlet End::"+annot.getEnd()+"<br>");

out.println("Test UIMA Servlet Content::"+annot.getCoveredText()+"<br>");

out.println("Test UIMA Servlet End::"+annot.getType()+"<br>");

}

aCAS.reset();

}

so can any one guide me here.

vijay

Reply via email to