Hi,
Am 05.04.2013 09:23, schrieb Laurent Audibert:
Hi all and thanks for the good job on TextMarker.
I would like to write a rule using a disjunction on the type match
rather than annotation within a given type.
For example, I would like to factorise two rules like :
Token{REGEXP("human")} Lemma{FEATURE("lemma","body")};
Lemma{FEATURE("lemma","human")} Lemma{FEATURE("lemma","body")};
in just one rule like :
( Token{REGEXP("human")} OR Lemma{FEATURE("lemma","human") )
Lemma{FEATURE("lemma","body")};
I could't find the way to do that with TextMarker language. Is it
impossible ?
No. Disjunctive matching does not support conditions right now. I
personally would have preferred the solution with the two rules. You
could probably write a rule, if one of the types (Token and Lemma) is
the parent type of the other one.
If you like this syntax to be supported, the you are welcome to open a
feature requeston jira. I will see if I can include it in the 2.0.1 release.
Best,
Peter