bugfix ticket #186
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
index d5dd84d..eec2cf2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
@@ -76,7 +76,7 @@
/**
* A list of node categories that can be sequenced (i.e. which can be in a sequence with any number of other nodes in this list)
*/
- private final List<String> sequentiableCats = Arrays.asList(new String[]{"OPWF", "OPLEM", "OPMORPH", "OPBEG", "OPEND", "OPIN", "OPBED", "OPELEM"});
+ private final List<String> sequentiableCats = Arrays.asList(new String[]{"OPWF", "OPLEM", "OPMORPH", "OPBEG", "OPEND", "OPIN", "OPBED", "OPELEM", "OPOR", "OPAND"});
/**
* Keeps track of sequenced nodes, i.e. nodes that implicitly govern a sequence, as in (C2PQ (OPWF der) (OPWF Mann)).
* This is necessary in order to know when to take the sequence off the object stack, as the sequence is introduced by the
@@ -1082,7 +1082,8 @@
*/
String[] queries = new String[]{
/* COSMAS 2 */
- "Mann:sa,-pa,+te,se"
+ "Mann:sa,-pa,+te,se",
+ "d*r ($Baum oder $Wald)"
};
// CosmasTree.verbose=true;
for (String q : queries) {
diff --git a/src/test/java/CosmasTreeTest.java b/src/test/java/CosmasTreeTest.java
index a288aa0..ecf0cfc 100644
--- a/src/test/java/CosmasTreeTest.java
+++ b/src/test/java/CosmasTreeTest.java
@@ -82,6 +82,13 @@
ct = new CosmasTree(query);
map = ct.getRequestMap().get("query").toString();
assertEquals(morph1.replaceAll(" ", ""), map.replaceAll(" ", ""));
+
+ query="MORPH(V)";
+ expected =
+ "{@type=korap:token, wrap={@type=korap:term, key=V, match=match:eq}}";
+ ct = new CosmasTree(query);
+ map = ct.getRequestMap().get("query").toString();
+ assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
}
@Test