From ebd9d19bd2b96ad9146708f09a3d68d48b549994 Mon Sep 17 00:00:00 2001
From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl>
Date: Wed, 4 May 2011 16:35:58 +0200
Subject: [PATCH] more tests for ann/annsub

---
 .../match/postcond2/cclmatch-none.ccl         | 11 +++
 .../match/postcond2/cclmatch-none.out.xml     | 70 ++++++++++++++++
 tests/rules-data/match/postcond2/cclmatch.xml | 70 ++++++++++++++++
 .../rules-data/match/postcond2/cclmatch2.ccl  | 11 +++
 .../match/postcond2/cclmatch2.out.ccl         | 80 +++++++++++++++++++
 .../rules-data/match/postcond2/cclmatch3.ccl  |  5 ++
 .../match/postcond2/cclmatch3.out.xml         | 80 +++++++++++++++++++
 .../rules-data/match/postcond2/cclmatch4.ccl  |  5 ++
 .../match/postcond2/cclmatch4.out.xml         | 80 +++++++++++++++++++
 .../match/postcond2/simple.is-the-tagset      |  1 +
 10 files changed, 413 insertions(+)
 create mode 100644 tests/rules-data/match/postcond2/cclmatch-none.ccl
 create mode 100644 tests/rules-data/match/postcond2/cclmatch-none.out.xml
 create mode 100644 tests/rules-data/match/postcond2/cclmatch.xml
 create mode 100644 tests/rules-data/match/postcond2/cclmatch2.ccl
 create mode 100644 tests/rules-data/match/postcond2/cclmatch2.out.ccl
 create mode 100644 tests/rules-data/match/postcond2/cclmatch3.ccl
 create mode 100644 tests/rules-data/match/postcond2/cclmatch3.out.xml
 create mode 100644 tests/rules-data/match/postcond2/cclmatch4.ccl
 create mode 100644 tests/rules-data/match/postcond2/cclmatch4.out.xml
 create mode 100644 tests/rules-data/match/postcond2/simple.is-the-tagset

diff --git a/tests/rules-data/match/postcond2/cclmatch-none.ccl b/tests/rules-data/match/postcond2/cclmatch-none.ccl
new file mode 100644
index 0000000..594b822
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch-none.ccl
@@ -0,0 +1,11 @@
+apply(
+  match(
+    is("A")
+  ),
+  cond(
+    annsub(M, "B")
+  ),
+  actions(
+    mark(M, "C")
+  )
+)
diff --git a/tests/rules-data/match/postcond2/cclmatch-none.out.xml b/tests/rules-data/match/postcond2/cclmatch-none.out.xml
new file mode 100644
index 0000000..7b48741
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch-none.out.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
+<cesAna xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" type="lex disamb">
+<chunkList>
+ <chunk>
+  <sentence>
+   <tok>
+    <orth>Dwa</orth>
+    <lex><base>dwa</base><ctag>other</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">1</ann>
+   </tok>
+   <tok>
+    <orth>wielkie</orth>
+    <lex><base>wielki</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">2</ann>
+   </tok>
+   <tok>
+    <orth>włochate</orth>
+    <lex><base>włochaty</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+   </tok>
+   <tok>
+    <orth>zapchlone</orth>
+    <lex><base>zapchlić</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+   </tok>
+   <tok>
+    <orth>koty</orth>
+    <lex><base>kot</base><ctag>noun</ctag></lex>
+    <ann chan="A" head="1">1</ann>
+    <ann chan="B" head="1">3</ann>
+   </tok>
+   <tok>
+    <orth>zjadły</orth>
+    <lex><base>zjeść</base><ctag>verb</ctag></lex>
+    <ann chan="A">0</ann>
+    <ann chan="B" head="1">4</ann>
+   </tok>
+   <tok>
+    <orth>pięć</orth>
+    <lex><base>pięć</base><ctag>other</ctag></lex>
+    <ann chan="A" head="1">2</ann>
+    <ann chan="B">4</ann>
+   </tok>
+   <tok>
+    <orth>tłustych</orth>
+    <lex><base>tłusty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+   </tok>
+   <tok>
+    <orth>soczystych</orth>
+    <lex><base>soczysty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+   </tok>
+   <tok>
+    <orth>much</orth>
+    <lex><base>mucha</base><ctag>noun</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">0</ann>
+   </tok>
+  </sentence>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/match/postcond2/cclmatch.xml b/tests/rules-data/match/postcond2/cclmatch.xml
new file mode 100644
index 0000000..7b48741
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
+<cesAna xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" type="lex disamb">
+<chunkList>
+ <chunk>
+  <sentence>
+   <tok>
+    <orth>Dwa</orth>
+    <lex><base>dwa</base><ctag>other</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">1</ann>
+   </tok>
+   <tok>
+    <orth>wielkie</orth>
+    <lex><base>wielki</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">2</ann>
+   </tok>
+   <tok>
+    <orth>włochate</orth>
+    <lex><base>włochaty</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+   </tok>
+   <tok>
+    <orth>zapchlone</orth>
+    <lex><base>zapchlić</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+   </tok>
+   <tok>
+    <orth>koty</orth>
+    <lex><base>kot</base><ctag>noun</ctag></lex>
+    <ann chan="A" head="1">1</ann>
+    <ann chan="B" head="1">3</ann>
+   </tok>
+   <tok>
+    <orth>zjadły</orth>
+    <lex><base>zjeść</base><ctag>verb</ctag></lex>
+    <ann chan="A">0</ann>
+    <ann chan="B" head="1">4</ann>
+   </tok>
+   <tok>
+    <orth>pięć</orth>
+    <lex><base>pięć</base><ctag>other</ctag></lex>
+    <ann chan="A" head="1">2</ann>
+    <ann chan="B">4</ann>
+   </tok>
+   <tok>
+    <orth>tłustych</orth>
+    <lex><base>tłusty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+   </tok>
+   <tok>
+    <orth>soczystych</orth>
+    <lex><base>soczysty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+   </tok>
+   <tok>
+    <orth>much</orth>
+    <lex><base>mucha</base><ctag>noun</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">0</ann>
+   </tok>
+  </sentence>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/match/postcond2/cclmatch2.ccl b/tests/rules-data/match/postcond2/cclmatch2.ccl
new file mode 100644
index 0000000..75f7fb4
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch2.ccl
@@ -0,0 +1,11 @@
+apply(
+  match(
+    is("B")
+  ),
+  cond(
+    annsub(M, "A")
+  ),
+  actions(
+    mark(M, "C")
+  )
+)
diff --git a/tests/rules-data/match/postcond2/cclmatch2.out.ccl b/tests/rules-data/match/postcond2/cclmatch2.out.ccl
new file mode 100644
index 0000000..999ba97
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch2.out.ccl
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
+<cesAna xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" type="lex disamb">
+<chunkList>
+ <chunk>
+  <sentence>
+   <tok>
+    <orth>Dwa</orth>
+    <lex><base>dwa</base><ctag>other</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">1</ann>
+    <ann chan="C" head="1">1</ann>
+   </tok>
+   <tok>
+    <orth>wielkie</orth>
+    <lex><base>wielki</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">2</ann>
+    <ann chan="C" head="1">2</ann>
+   </tok>
+   <tok>
+    <orth>włochate</orth>
+    <lex><base>włochaty</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">2</ann>
+   </tok>
+   <tok>
+    <orth>zapchlone</orth>
+    <lex><base>zapchlić</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">2</ann>
+   </tok>
+   <tok>
+    <orth>koty</orth>
+    <lex><base>kot</base><ctag>noun</ctag></lex>
+    <ann chan="A" head="1">1</ann>
+    <ann chan="B" head="1">3</ann>
+    <ann chan="C" head="1">3</ann>
+   </tok>
+   <tok>
+    <orth>zjadły</orth>
+    <lex><base>zjeść</base><ctag>verb</ctag></lex>
+    <ann chan="A">0</ann>
+    <ann chan="B" head="1">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>pięć</orth>
+    <lex><base>pięć</base><ctag>other</ctag></lex>
+    <ann chan="A" head="1">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>tłustych</orth>
+    <lex><base>tłusty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>soczystych</orth>
+    <lex><base>soczysty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>much</orth>
+    <lex><base>mucha</base><ctag>noun</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">0</ann>
+    <ann chan="C">0</ann>
+   </tok>
+  </sentence>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/match/postcond2/cclmatch3.ccl b/tests/rules-data/match/postcond2/cclmatch3.ccl
new file mode 100644
index 0000000..d9c9f33
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch3.ccl
@@ -0,0 +1,5 @@
+apply(
+  match(repeat(equal(class[0], adj))),
+  cond(ann(M, "B")),
+  actions(mark(M,"C"))
+)
diff --git a/tests/rules-data/match/postcond2/cclmatch3.out.xml b/tests/rules-data/match/postcond2/cclmatch3.out.xml
new file mode 100644
index 0000000..c45a8fc
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch3.out.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
+<cesAna xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" type="lex disamb">
+<chunkList>
+ <chunk>
+  <sentence>
+   <tok>
+    <orth>Dwa</orth>
+    <lex><base>dwa</base><ctag>other</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">1</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>wielkie</orth>
+    <lex><base>wielki</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">2</ann>
+    <ann chan="C" head="1">1</ann>
+   </tok>
+   <tok>
+    <orth>włochate</orth>
+    <lex><base>włochaty</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">1</ann>
+   </tok>
+   <tok>
+    <orth>zapchlone</orth>
+    <lex><base>zapchlić</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">1</ann>
+   </tok>
+   <tok>
+    <orth>koty</orth>
+    <lex><base>kot</base><ctag>noun</ctag></lex>
+    <ann chan="A" head="1">1</ann>
+    <ann chan="B" head="1">3</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>zjadły</orth>
+    <lex><base>zjeść</base><ctag>verb</ctag></lex>
+    <ann chan="A">0</ann>
+    <ann chan="B" head="1">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>pięć</orth>
+    <lex><base>pięć</base><ctag>other</ctag></lex>
+    <ann chan="A" head="1">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>tłustych</orth>
+    <lex><base>tłusty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>soczystych</orth>
+    <lex><base>soczysty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>much</orth>
+    <lex><base>mucha</base><ctag>noun</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">0</ann>
+    <ann chan="C">0</ann>
+   </tok>
+  </sentence>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/match/postcond2/cclmatch4.ccl b/tests/rules-data/match/postcond2/cclmatch4.ccl
new file mode 100644
index 0000000..6e68f17
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch4.ccl
@@ -0,0 +1,5 @@
+apply(
+  match(repeat(equal(class[0], adj))),
+  cond(annsub(M, "B")),
+  actions(mark(M,"C"))
+)
diff --git a/tests/rules-data/match/postcond2/cclmatch4.out.xml b/tests/rules-data/match/postcond2/cclmatch4.out.xml
new file mode 100644
index 0000000..0dfe62a
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch4.out.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
+<cesAna xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" type="lex disamb">
+<chunkList>
+ <chunk>
+  <sentence>
+   <tok>
+    <orth>Dwa</orth>
+    <lex><base>dwa</base><ctag>other</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">1</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>wielkie</orth>
+    <lex><base>wielki</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">2</ann>
+    <ann chan="C" head="1">1</ann>
+   </tok>
+   <tok>
+    <orth>włochate</orth>
+    <lex><base>włochaty</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">1</ann>
+   </tok>
+   <tok>
+    <orth>zapchlone</orth>
+    <lex><base>zapchlić</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">1</ann>
+   </tok>
+   <tok>
+    <orth>koty</orth>
+    <lex><base>kot</base><ctag>noun</ctag></lex>
+    <ann chan="A" head="1">1</ann>
+    <ann chan="B" head="1">3</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>zjadły</orth>
+    <lex><base>zjeść</base><ctag>verb</ctag></lex>
+    <ann chan="A">0</ann>
+    <ann chan="B" head="1">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>pięć</orth>
+    <lex><base>pięć</base><ctag>other</ctag></lex>
+    <ann chan="A" head="1">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>tłustych</orth>
+    <lex><base>tłusty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C" head="1">2</ann>
+   </tok>
+   <tok>
+    <orth>soczystych</orth>
+    <lex><base>soczysty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">2</ann>
+   </tok>
+   <tok>
+    <orth>much</orth>
+    <lex><base>mucha</base><ctag>noun</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">0</ann>
+    <ann chan="C">0</ann>
+   </tok>
+  </sentence>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/match/postcond2/simple.is-the-tagset b/tests/rules-data/match/postcond2/simple.is-the-tagset
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/tests/rules-data/match/postcond2/simple.is-the-tagset
@@ -0,0 +1 @@
+
-- 
GitLab