diff --git a/examples/np-match.ccl b/examples/np-match.ccl new file mode 100644 index 0000000000000000000000000000000000000000..127fb7a4f11c89457c79ed8a07ea30416add72d0 --- /dev/null +++ b/examples/np-match.ccl @@ -0,0 +1,33 @@ +match_rules( + apply( + match( + optional(equal(base[0], "nie")), + repeat( + inter(class[0], {adj, ppas, pact}) + ) + ), + cond( + agr(first(:2), last(M), {nmb,gnd,cas}) + ), + actions( + mark(M, "AdjP") + ) + ); + + apply( + match( + optional(is("AdjP")), + inter(class[0], {subst, ger, depr}) + ), + cond( + or( + empty(:1), + agrpp(last(:1), first(:2), {nmb,gnd,cas}) + ) + ), + actions( + mark(M, M, :2, "NP") + ) + ) +) +