uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommaso Teofili <tommaso.teof...@gmail.com>
Subject Re: [ANN] UIMA/Drools bridge: use Drools to write NLP gramras
Date Mon, 11 Jun 2012 06:48:55 GMT
Nice thing Roberto, thanks for letting us know!
Have a nice day,
Tommaso

2012/6/8 Roberto Franchini <franchini@celi.it>

> Hi,
> we have released on github a little bridge that allow to write NLP
> grammars using  Drools rule engine  (http://www.jboss.org/drools)
>
> https://github.com/celi-uim/uima-drools
>
> We use Drools as an NLP-grammars engine since 2010 and we are very
> happy with it.
>
> This project is just a proof of concept: it shows how Drools can be
> embedded in UIMA, but is not production ready.
> The example is very simple: the annotator loads a grammar that emit a
> Classification annotation if a Token has text "good".
> Here's the grammar:
>
> package it.celi.uima.drool;
>
> import org.uimafit.examples.type.Token;
> import it.celi.uima.type.Classification;
>
> global org.apache.log4j.Logger log
>
> global org.apache.uima.jcas.JCas jCas
>
> rule "simple classifier"
> when
>    $token:Token(coveredText == "good")
> then
>        Classification cl = new Classification(jCas);
>        cl.setBegin($token.getBegin());
>        cl.setEnd($token.getEnd());
>        cl.setLabel("positive");
>        cl.addToIndexes();
>        if(log.isDebugEnabled()) log.debug("token:: " +
> $token.getCoveredText());
> end
>
> Regards,
> RF
>
> --
> Roberto Franchini
> The impossible is inevitable.
> Be smart: http://goo.gl/LqgRY
> http://www.celi.it
> http://www.blogmeter.it
> Tel +39.011.562.71.15
> jabber:ro.franchini@gmail.com skype:ro.franchini
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message