From 1b2b4bf8072700b1b548ec856269fcf8d90e2fb2 Mon Sep 17 00:00:00 2001 From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl> Date: Tue, 11 Sep 2012 13:39:30 +0200 Subject: [PATCH] noprep.ccl: rm propositions from np --- tools/noprep.ccl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/noprep.ccl diff --git a/tools/noprep.ccl b/tools/noprep.ccl new file mode 100644 index 0000000..583ef6b --- /dev/null +++ b/tools/noprep.ccl @@ -0,0 +1,28 @@ +// generates "real" NP chunks by removing chunk-initial prepositions +// the new chunks are added as "cut_np" + +// to be used with wccl-rules + +tag_rules( + rule("noprep", + and( + isannbeg(0, "chunk_np"), + not(in({prep}, class[0])), + rlook(0, end, $End, + isannend($End, "chunk_np") + ) + ), + mark(0, $End, "cut_np") + ); + rule("withprep", + and( + isannbeg(0, "chunk_np"), + in({prep}, class[0]), + rlook(0, end, $End, + isannend($End, "chunk_np") + ) + ), + mark(1, $End, "cut_np") + ) +) + -- GitLab