Hi,

I am trying out some simple rule based feature extraction using Ruta. In one of 
the cases I want to mark up places where certain phrases occur in the beginning 
of a sentence, and I want to keep the phrases in a list that I load as resource 
and then apply using the MARKFAST action, but I don’t know how to constrain it 
to sentence beginnings only. Doing something like

Sentence { STARTSWITH(Sentence) ->
    MARKFAST(MyFeatureAnnotation, phraseList)
}

will obviously not work because the sentence always starts with a sentence, and 
it doesn’t seem to put any constrain on the MARKFAST action itself. I can then 
try to unmark those again that don’t align with a sentence start, but it’s 
kinda clumsy, and I have to be careful not to unmark other MyFeatureAnnotation 
created previously by other rules/annotators. It’s doable but I like to 
understand if there is a smarter way, which has so far eluded me after looking 
at the documentation?

Any input is appreciated, thanks :)

Cheers,
Mario Juric













Reply via email to