uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Silvestre Losada <silvestre.los...@gmail.com>
Subject Re: Ruta unmark tokens from given possition.
Date Thu, 08 Jan 2015 08:07:04 GMT
Peter thanks for your answer,

I tried your Rule and is not working for me, I also tried some variants
without results. What I want to remove RutaBasic annotations to pass less
information to an action that I created processing only  annotations that
are below a threshold, if I remove at the end then my acction will process
all information.

Best,

Silvestre.


On 7 January 2015 at 17:52, Peter Kl├╝gl <pkluegl@uni-wuerzburg.de> wrote:

> Hi,
>
> Am 07.01.2015 um 17:36 schrieb Silvestre Losada:
> > I'm answering to my self,
> >
> > (ANY{->UNMARK(ANY)}){CONTEXTCOUNT(Document,20,2000)};
>
> nice rule :-D
> but it's probably a bit slow
>
> My first guess was something with a min/max quantifier since these
> counting conditions like CONTEXTCOUNT and POSITION are slow.
>
> Something like
>
> Document{-> MARKFIRST(FirstToken)};
> FirstToken ANY[19, 19] ANY[1800,1800]{-> UNMARK(ANY)};
>
>
> > Removes all annotations generated by default seeder that are in postions
> 20
> > to 2000. This is working, however it does not work for RutaBasic
> > annotations using the same expression
> >
> > (RutaBasic{->UNMARK(RutaBasic)}){CONTEXTCOUNT(Document,20,2000)};
>
> RutaBasic annotations may not be removed by rules. These annotations
> build the complete disjunct partitioning of the document and store
> important information. The rule need them for working properly. If you
> do not want them in your CAS, you can remove them after applying a ruta
> analysis engine. There's a configuration parameter "removeBasics". When
> activated, the RutaBasic and the seeding annotations are removed as the
> last action of the process() method.
>
>
> Best,
>
> Peter
>
>
> > I dont know the explanation.
> >
> > Regards
> >
> > On 7 January 2015 at 16:46, Silvestre Losada <silvestre.losada@gmail.com
> >
> > wrote:
> >
> >> HI,
> >>
> >> I'm creating a ruta script, and I want to remove all tokens that are
> after
> >> position X, in other words I only want to keep first X tokens. I was
> >> playing with ruta conditions, actions and I dont know how to make it. do
> >> you think is possible to do that?
> >>
> >> Kind regards.
> >>
>
>
>

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