On 2012-10-16, at 8:31 AM, Andreas Niekler <[email protected]> wrote:
> Dear UIMA Users, > > i wonder what the best practice would be to render a CAS as a html snippet > that could be included into a webpage. I already found the > AnnotationViewGenerator which is producing complete html files which is far > to much as i just want to generate snippets. > > Has anybody a nice library or script to easily convert a cas to a html based > structure? I do not know if there is a class doing what you want from a CAS, but it is easy to extract snippets of html from a document using a library like jsoup (http://jsoup.org). For example, you could extract the body content in the following way : // retrieve complete document html String html = … // extract html under body String snippet = Jsoup.parse(html).select("body").html(); Hope this help, Alexandre > > Thank you very much > > -- > Andreas Niekler, Dipl. Ing. (FH) > NLP Group | Department of Computer Science > University of Leipzig > Johannisgasse 26 | 04103 Leipzig > > mail: [email protected]
