Hi,

I do not see a way to do something like a conditional MARKFAST in Ruta as you described.


I would postprocess the annotations with an UNMARK rule or add another layer by creating temp annotations. Then, only create MyFeatureAnnotations for those that start with a sentence.


Best,


Peter


Am 04.04.2019 um 12:26 schrieb Mario Juric:
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














--
Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Salzstr. 15
79098 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.klu...@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó

Reply via email to