blob: 1cfb8bb3fb10f4f23d327bfb0730779ec1f88a71 [file] [log] [blame]
Joachim Bingelb5f7bf02014-01-07 16:36:54 +00001import static org.junit.Assert.*;
2
3import org.junit.Test;
4
5import de.ids_mannheim.korap.query.serialize.CosmasTree;
Joachim Bingelb5f7bf02014-01-07 16:36:54 +00006import de.ids_mannheim.korap.util.QueryException;
7
8public class CosmasTreeTest {
9
Joachim Bingel2daf9862014-02-12 10:18:54 +000010 CosmasTree ct;
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000011 String map;
12 String query;
13
14 private boolean equalsContent(String str, Object map) {
15 str = str.replaceAll(" ", "");
16 String mapStr = map.toString().replaceAll(" ", "");
17 return str.equals(mapStr);
18 }
19
20 private boolean equalsQueryContent(String res, String query) throws QueryException {
21 res = res.replaceAll(" ", "");
Joachim Bingel2daf9862014-02-12 10:18:54 +000022 ct = new CosmasTree(query);
23 String queryMap = ct.getRequestMap().get("query").toString().replaceAll(" ", "");
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000024 return res.equals(queryMap);
25 }
26
Joachim Bingel11d5b152014-02-11 21:33:47 +000027// @Test
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000028 public void testContext() throws QueryException {
Joachim Bingel2daf9862014-02-12 10:18:54 +000029 String contextString = "{korap = http://korap.ids-mannheim.de/ns/KorAP/json-ld/v0.1/, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +000030 "boundary = korap:boundary/,"+
31 "group = korap:group/,"+
32 "operation = {@id = group:operation/, @type = @id},"+
33 "class = {@id = group:class, @type = xsd:integer},"+
34 "operands = {@id = group:operands, @container = @list},"+
Joachim Bingel2daf9862014-02-12 10:18:54 +000035 "frame = {@id = group:frame/, @type = @id},"+
Joachim Bingel11d5b152014-02-11 21:33:47 +000036 "classRef = {@id = group:classRef, @type = xsd:integer},"+
37 "spanRef = {@id = group:spanRef, @type = xsd:integer},"+
38 "classRefOp = {@id = group:classRefOp, @type = @id},"+
39 "min = {@id = boundary:min, @type = xsd:integer},"+
40 "max = {@id = boundary:max, @type = xsd:integer},"+
41 "exclude = {@id = group:exclude, @type = xsd:boolean},"+
42 "distances = {@id = group:distances, @container = @list},"+
Joachim Bingel2daf9862014-02-12 10:18:54 +000043 "inOrder = {@id = group:inOrder, @type = xsd:boolean}"+
Joachim Bingel11d5b152014-02-11 21:33:47 +000044 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +000045 ct = new CosmasTree("Test");
46 assertEquals(contextString.replaceAll(" ", ""), ct.getRequestMap().get("@context").toString().replaceAll(" ", ""));
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000047 }
48
49
50 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +000051 public void testSingleToken() throws QueryException {
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000052 query="der";
53 String single1 =
Joachim Bingelee3b21d2014-02-12 12:34:59 +000054 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}";
Joachim Bingel2daf9862014-02-12 10:18:54 +000055 ct = new CosmasTree(query);
56 map = ct.getRequestMap().get("query").toString();
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000057 assertEquals(single1.replaceAll(" ", ""), map.replaceAll(" ", ""));
58
59 query="Mann";
60 String single2 =
Joachim Bingelee3b21d2014-02-12 12:34:59 +000061 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}";
Joachim Bingel2daf9862014-02-12 10:18:54 +000062 ct = new CosmasTree(query);
63 map = ct.getRequestMap().get("query").toString();
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000064 assertEquals(single2.replaceAll(" ", ""), map.replaceAll(" ", ""));
65
66 query="&Mann";
67 String single3 =
Joachim Bingelee3b21d2014-02-12 12:34:59 +000068 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=lemma, match=match:eq}}";
Joachim Bingel2daf9862014-02-12 10:18:54 +000069 ct = new CosmasTree(query);
70 map = ct.getRequestMap().get("query").toString();
Joachim Bingelb5f7bf02014-01-07 16:36:54 +000071 assertEquals(single3.replaceAll(" ", ""), map.replaceAll(" ", ""));
72 }
73
Joachim Bingelba9a0ab2014-01-29 10:12:25 +000074 @Test
Joachim Bingel8c640e42014-02-07 16:20:47 +000075 public void testCaseSensitivityFlag() throws QueryException {
Joachim Bingel0207d5e2014-02-12 14:18:41 +000076 query="$deutscher";
77 String cs1 =
78 "{@type=korap:token, wrap={@type=korap:term, caseInsensitive=true, key=deutscher, layer=orth, match=match:eq}}";
79 ct = new CosmasTree(query);
80 map = ct.getRequestMap().get("query").toString();
81 assertEquals(cs1.replaceAll(" ", ""), map.replaceAll(" ", ""));
82
83 query="$deutscher Bundestag";
84 String cs2 =
85 "{@type=korap:group, operation=operation:sequence, operands=[" +
86 "{@type=korap:token, wrap={@type=korap:term, caseInsensitive=true, key=deutscher, layer=orth, match=match:eq}}," +
87 "{@type=korap:token, wrap={@type=korap:term, key=Bundestag, layer=orth, match=match:eq}}" +
88 "]}";
89 ct = new CosmasTree(query);
90 map = ct.getRequestMap().get("query").toString();
91 assertEquals(cs2.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingel8c640e42014-02-07 16:20:47 +000092 }
93
94 @Test
Joachim Bingelffd65e32014-01-22 14:22:57 +000095 public void testMORPH() throws QueryException {
96 query="#MORPH(V)";
97 String morph1 =
Joachim Bingel0207d5e2014-02-12 14:18:41 +000098 "{@type=korap:token, wrap={@type=korap:term, key=V, layer=pos, match=match:eq}}";
Joachim Bingel2daf9862014-02-12 10:18:54 +000099 ct = new CosmasTree(query);
100 map = ct.getRequestMap().get("query").toString();
Joachim Bingelffd65e32014-01-22 14:22:57 +0000101 assertEquals(morph1.replaceAll(" ", ""), map.replaceAll(" ", ""));
102 }
103
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000104 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000105 public void testSequence() throws QueryException {
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000106 query="der Mann";
107 String seq1 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000108 "{@type=korap:group, operation=operation:sequence, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000109 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
110 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000111 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000112 ct = new CosmasTree(query);
113 map = ct.getRequestMap().get("query").toString();
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000114 assertEquals(seq1.replaceAll(" ", ""), map.replaceAll(" ", ""));
115
Joachim Bingeld5161a12014-01-08 11:15:49 +0000116 query="der Mann schläft";
117 String seq2 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000118 "{@type=korap:group, operation=operation:sequence, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000119 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
120 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}," +
121 "{@type=korap:token, wrap={@type=korap:term, key=schläft, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000122 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000123 ct = new CosmasTree(query);
124 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000125 assertEquals(seq2.replaceAll(" ", ""), map.replaceAll(" ", ""));
126
127 query="der Mann schläft lang";
128 String seq3 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000129 "{@type=korap:group, operation=operation:sequence, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000130 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
131 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}," +
132 "{@type=korap:token, wrap={@type=korap:term, key=schläft, layer=orth, match=match:eq}}," +
133 "{@type=korap:token, wrap={@type=korap:term, key=lang, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000134 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000135 ct = new CosmasTree(query);
136 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000137 assertEquals(seq3.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000138 }
139
140 @Test
141 public void testOPOR() throws QueryException {
142 query="Sonne oder Mond";
143 String disj1 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000144 "{@type=korap:group, operation=operation:or, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000145 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
146 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000147 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000148 ct = new CosmasTree(query);
149 map = ct.getRequestMap().get("query").toString();
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000150 assertEquals(disj1.replaceAll(" ", ""), map.replaceAll(" ", ""));
151
Joachim Bingeld5161a12014-01-08 11:15:49 +0000152 query="(Sonne scheint) oder Mond";
153 String disj2 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000154 "{@type=korap:group, operation=operation:or, operands=[" +
155 "{@type=korap:group, operation=operation:sequence, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000156 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
157 "{@type=korap:token, wrap={@type=korap:term, key=scheint, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000158 "]}," +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000159 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000160 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000161 ct = new CosmasTree(query);
162 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000163 assertEquals(disj2.replaceAll(" ", ""), map.replaceAll(" ", ""));
164
165 query="(Sonne scheint) oder (Mond scheint)";
166 String disj3 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000167 "{@type=korap:group, operation=operation:or, operands=[" +
168 "{@type=korap:group, operation=operation:sequence, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000169 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
170 "{@type=korap:token, wrap={@type=korap:term, key=scheint, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000171 "]}," +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000172 "{@type=korap:group, operation=operation:sequence, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000173 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}," +
174 "{@type=korap:token, wrap={@type=korap:term, key=scheint, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000175 "]}" +
176 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000177 ct = new CosmasTree(query);
178 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000179 assertEquals(disj3.replaceAll(" ", ""), map.replaceAll(" ", ""));
180
181 }
182
183 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000184 public void testOPORAND() throws QueryException {
Joachim Bingeld5161a12014-01-08 11:15:49 +0000185 query="(Sonne oder Mond) und scheint";
186 String orand1 =
Joachim Bingelb7a59792014-02-14 13:52:29 +0000187 "{@type=korap:group, operation=operation:sequence, distances=[" +
188 "{@type=korap:distance, key=t, min=0, max=0}" +
189 "], operands=[" +
190 "{@type=korap:group, operation=operation:or, operands=[" +
191 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
192 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
193 "]}," +
194 "{@type=korap:token, wrap={@type=korap:term, key=scheint, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000195 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000196 ct = new CosmasTree(query);
197 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000198 assertEquals(orand1.replaceAll(" ", ""), map.replaceAll(" ", ""));
199
200 query="scheint und (Sonne oder Mond)";
201 String orand2 =
Joachim Bingelb7a59792014-02-14 13:52:29 +0000202 "{@type=korap:group, operation=operation:sequence, distances=[" +
203 "{@type=korap:distance, key=t, min=0, max=0}" +
204 "], operands=[" +
205 "{@type=korap:token, wrap={@type=korap:term, key=scheint, layer=orth, match=match:eq}}," +
206 "{@type=korap:group, operation=operation:or, operands=[" +
207 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
208 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000209 "]}" +
210 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000211 ct = new CosmasTree(query);
212 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000213 assertEquals(orand2.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000214 }
215
216 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000217 public void testOPPROX() throws QueryException {
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000218 query="Sonne /+w1:4 Mond";
219 String prox1 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000220 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000221 "distances=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000222 "{@type=korap:distance, key=w, min=1, max=4}" +
Joachim Bingel89cceac2014-01-08 15:51:08 +0000223 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000224 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000225 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
226 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingel89cceac2014-01-08 15:51:08 +0000227 "]" +
228 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000229 ct = new CosmasTree(query);
230 map = ct.getRequestMap().get("query").toString();
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000231 assertEquals(prox1.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingel89cceac2014-01-08 15:51:08 +0000232
233 query="Sonne /+w1:4,s0,p1:3 Mond";
234 String prox2 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000235 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000236 "distances=[" +
Joachim Bingelcd7b7252014-02-13 08:49:14 +0000237 "{@type=korap:distance, key=w, min=1, max=4}," +
238 "{@type=korap:distance, key=s, min=0, max=0}," +
239 "{@type=korap:distance, key=p, min=1, max=3}" +
Joachim Bingel89cceac2014-01-08 15:51:08 +0000240 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000241 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000242 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
243 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingel89cceac2014-01-08 15:51:08 +0000244 "]" +
245 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000246 ct = new CosmasTree(query);
247 map = ct.getRequestMap().get("query").toString();
Joachim Bingel89cceac2014-01-08 15:51:08 +0000248 assertEquals(prox2.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingel87480d02014-01-17 14:07:46 +0000249
250 query="Sonne %+w1:4,s0,p1:3 Mond";
251 String prox3 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000252 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000253 "distances=[" +
Joachim Bingelcd7b7252014-02-13 08:49:14 +0000254 "{@type=korap:distance, key=w, min=1, max=4, exclude=true}," +
255 "{@type=korap:distance, key=s, min=0, max=0, exclude=true}," +
256 "{@type=korap:distance, key=p, min=1, max=3, exclude=true}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000257 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000258 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000259 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
260 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000261 "]" +
262 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000263 ct = new CosmasTree(query);
264 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000265 assertEquals(prox3.replaceAll(" ", ""), map.replaceAll(" ", ""));
266
267 query="Sonne /+w4 Mond";
268 String prox4 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000269 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000270 "distances=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000271 "{@type=korap:distance, key=w, min=0, max=4}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000272 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000273 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000274 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
275 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000276 "]" +
277 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000278 ct = new CosmasTree(query);
279 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000280 assertEquals(prox4.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000281
282 query="Sonne /-w4 Mond";
283 String prox5 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000284 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000285 "distances=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000286 "{@type=korap:distance, key=w, min=0, max=4}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000287 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000288 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000289 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}," +
290 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000291 "]" +
292 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000293 ct = new CosmasTree(query);
294 map = ct.getRequestMap().get("query").toString();
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000295 assertEquals(prox5.replaceAll(" ", ""), map.replaceAll(" ", ""));
296 }
297
298 @Test
Joachim Bingelba9a0ab2014-01-29 10:12:25 +0000299 public void testOPPROXNested() throws QueryException {
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000300 query="Sonne /-w4 Mond /+w2 Sterne";
301 String prox6 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000302 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000303 "distances=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000304 "{@type=korap:distance, key=w, min=0, max=4}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000305 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000306 "operands=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000307 "{@type=korap:group, operation=operation:sequence, inOrder=true, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000308 "distances=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000309 "{@type=korap:distance, key=w, min=0, max=2}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000310 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000311 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000312 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}," +
313 "{@type=korap:token, wrap={@type=korap:term, key=Sterne, layer=orth, match=match:eq}}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000314 "]}," +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000315 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000316 "]" +
317 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000318 ct = new CosmasTree(query);
319 map = ct.getRequestMap().get("query").toString();
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000320 assertEquals(prox6.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000321 }
322
323 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000324 public void testOPIN() throws QueryException {
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000325 query="wegen #IN <s>";
Joachim Bingel3a9f7932014-01-07 17:11:31 +0000326 String opin1 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000327 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
328 "{@type=korap:group, operation=operation:position, frame=frame:contains, operands=[" +
329 "{@type=korap:span, key=s}," +
330 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000331 "{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
Joachim Bingeleecc7652014-01-11 17:21:07 +0000332 "]}" +
333 "]}" +
Joachim Bingeld5161a12014-01-08 11:15:49 +0000334 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000335 ct = new CosmasTree(query);
336 map = ct.getRequestMap().get("query").toString();
Joachim Bingeld5161a12014-01-08 11:15:49 +0000337 assertEquals(opin1.replaceAll(" ", ""), map.replaceAll(" ", ""));
338
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000339 query="wegen #IN(L) <s>";
340 String opin2 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000341 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
342 "{@type=korap:group, operation=operation:position, frame=frame:startswith, operands=[" +
343 "{@type=korap:span, key=s}," +
344 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000345 "{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000346 "]}" +
347 "]}" +
348 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000349 ct = new CosmasTree(query);
350 map = ct.getRequestMap().get("query").toString();
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000351 assertEquals(opin2.replaceAll(" ", ""), map.replaceAll(" ", ""));
352
Joachim Bingel87480d02014-01-17 14:07:46 +0000353 query="wegen #IN(%, L) <s>";
354 String opin3 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000355 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
356 "{@type=korap:group, operation=operation:position, frame=frame:startswith, exclude=true, operands=[" +
357 "{@type=korap:span, key=s}," +
358 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000359 "{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000360 "]}" +
361 "]}" +
362 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000363 ct = new CosmasTree(query);
364 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000365 assertEquals(opin3.replaceAll(" ", ""), map.replaceAll(" ", ""));
366
367 query="wegen #IN('FE,ALL,%,MIN') <s>";
368 String opin4 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000369 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
370 "{@type=korap:group, operation=operation:position, frame=frame:matches, range=all, exclude=true, grouping=false, operands=[" +
371 "{@type=korap:span, key=s}," +
372 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000373 "{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000374 "]}" +
375 "]}" +
376 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000377 ct = new CosmasTree(query);
378 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000379 assertEquals(opin4.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingeld5161a12014-01-08 11:15:49 +0000380 }
381
382 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000383 public void testOPOV() throws QueryException {
Joachim Bingeld5161a12014-01-08 11:15:49 +0000384 query="wegen #OV <s>";
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000385 String opov1 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000386 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
387 "{@type=korap:group, operation=operation:position, frame=frame:overlaps, operands=[" +
388 "{@type=korap:span, key=s}," +
389 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000390 "{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000391 "]}" +
392 "]}" +
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000393 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000394 ct = new CosmasTree(query);
395 map = ct.getRequestMap().get("query").toString();
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000396 assertEquals(opov1.replaceAll(" ", ""), map.replaceAll(" ", ""));
397
398 query="wegen #OV(L) <s>";
399 String opov2 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000400 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
401 "{@type=korap:group, operation=operation:position, frame=frame:overlaps-left, operands=[" +
402 "{@type=korap:span, key=s}," +
403 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000404 "{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000405 "]}" +
406 "]}" +
407 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000408 ct = new CosmasTree(query);
409 map = ct.getRequestMap().get("query").toString();
Joachim Bingelcc1dc242014-01-15 09:32:38 +0000410 assertEquals(opov2.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000411 }
412
413 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000414 public void testOPNOT() throws QueryException {
Joachim Bingel3a9f7932014-01-07 17:11:31 +0000415 query="Sonne nicht Mond";
416 String opnot1 =
Joachim Bingelb7a59792014-02-14 13:52:29 +0000417 "{@type=korap:group, operation=operation:sequence, distances=[" +
418 "{@type=korap:distance, key=t, min=0, max=0, exclude=true}" +
419 "], operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000420 "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
421 "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
Joachim Bingel3a9f7932014-01-07 17:11:31 +0000422 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000423 ct = new CosmasTree(query);
424 map = ct.getRequestMap().get("query").toString();
Joachim Bingel3a9f7932014-01-07 17:11:31 +0000425 assertEquals(opnot1.replaceAll(" ", ""), map.replaceAll(" ", ""));
426 }
427
428 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000429 public void testBEG_END() throws QueryException {
Joachim Bingel3a9f7932014-01-07 17:11:31 +0000430 // BEG and END operators
431 // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/links.html
432 // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/rechts.html
433 // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/thematische-bsp/bsp-satzlaenge.html
Joachim Bingel87480d02014-01-17 14:07:46 +0000434 query="#BEG(der /w3:5 Mann)";
435 String beg1 =
Joachim Bingelcd7b7252014-02-13 08:49:14 +0000436 "{@type=korap:group, operation=operation:submatch, spanRef=[0,1], operands=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000437 "{@type=korap:group, operation=operation:sequence, inOrder=false, distances=[" +
438 "{@type=korap:distance, key=w, min=3, max=5}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000439 "]," +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000440 "operands = [" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000441 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
442 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000443 "]}" +
444 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000445 ct = new CosmasTree(query);
446 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000447 assertEquals(beg1.replaceAll(" ", ""), map.replaceAll(" ", ""));
448
449 query="#BEG(der /w3:5 Mann) /+w10 kommt"; // nesting #BEG() in a distance group
450 String beg2 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000451 "{@type=korap:group, operation=operation:sequence, inOrder=true, distances=[" +
452 "{@type=korap:distance, key=w, min=0, max=10}" +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000453 "], operands=[" +
Joachim Bingelcd7b7252014-02-13 08:49:14 +0000454 "{@type=korap:group, operation=operation:submatch, spanRef=[0,1], operands=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000455 "{@type=korap:group, operation=operation:sequence, inOrder=false, distances=[" +
456 "{@type=korap:distance, key=w, min=3, max=5}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000457 "]," +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000458 "operands = [" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000459 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
460 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000461 "]}" +
462 "]}," +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000463 "{@type=korap:token, wrap={@type=korap:term, key=kommt, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000464 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000465 ct = new CosmasTree(query);
466 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000467 assertEquals(beg2.replaceAll(" ", ""), map.replaceAll(" ", ""));
468
469 query="#END(der /w3:5 Mann)";
470 String end1 =
Joachim Bingelcd7b7252014-02-13 08:49:14 +0000471 "{@type=korap:group, operation=operation:submatch, spanRef=[-1,1], operands=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000472 "{@type=korap:group, operation=operation:sequence, inOrder=false, distances=[" +
473 "{@type=korap:distance, key=w, min=3, max=5}" +
Joachim Bingelba9a0ab2014-01-29 10:12:25 +0000474 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000475 "operands = [" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000476 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
477 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
Joachim Bingel87480d02014-01-17 14:07:46 +0000478 "]}" +
479 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000480 ct = new CosmasTree(query);
481 map = ct.getRequestMap().get("query").toString();
Joachim Bingel87480d02014-01-17 14:07:46 +0000482 assertEquals(end1.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000483 }
Joachim Bingeld5161a12014-01-08 11:15:49 +0000484
485
486 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000487 public void testELEM() throws QueryException {
Joachim Bingeld5161a12014-01-08 11:15:49 +0000488 // http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/elem.html
Joachim Bingeleecc7652014-01-11 17:21:07 +0000489 query="#ELEM(S)";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000490 String elem1 = "{@type=korap:span, key=s}";
491 ct = new CosmasTree(query);
492 map = ct.getRequestMap().get("query").toString();
Joachim Bingeleecc7652014-01-11 17:21:07 +0000493 assertEquals(elem1.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingeld5161a12014-01-08 11:15:49 +0000494 }
495
496 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000497 public void testOPALL() throws QueryException {
Joachim Bingel89cceac2014-01-08 15:51:08 +0000498 query="#ALL(gehen /w1:10 voran)";
Joachim Bingele98d0882014-01-21 12:58:54 +0000499 String all1 =
Joachim Bingel2daf9862014-02-12 10:18:54 +0000500 "{@type=korap:group, operation=operation:sequence, inOrder=false, " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000501 "distances=[" +
Joachim Bingel2daf9862014-02-12 10:18:54 +0000502 "{@type=korap:distance, key=w, min=1, max=10}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000503 "], " +
Joachim Bingel11d5b152014-02-11 21:33:47 +0000504 "operands=[" +
Joachim Bingelee3b21d2014-02-12 12:34:59 +0000505 "{@type=korap:token, wrap={@type=korap:term, key=gehen, layer=orth, match=match:eq}}," +
506 "{@type=korap:token, wrap={@type=korap:term, key=voran, layer=orth, match=match:eq}}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000507 "]" +
508 "}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000509 ct = new CosmasTree(query);
510 map = ct.getRequestMap().get("query").toString();
Joachim Bingel89cceac2014-01-08 15:51:08 +0000511 assertEquals(all1.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingeld5161a12014-01-08 11:15:49 +0000512 }
513
Joachim Bingel36233b52014-02-13 10:48:24 +0000514 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000515 public void testOPNHIT() throws QueryException {
Joachim Bingel89cceac2014-01-08 15:51:08 +0000516 query="#NHIT(gehen /w1:10 voran)";
517 String nhit1 =
Joachim Bingel36233b52014-02-13 10:48:24 +0000518 "{@type=korap:group, operation=operation:submatch, classRef=[1,2], classRefOp=classRefOp:intersection, operands=[" +
519 "{@type=korap:group, operation=operation:sequence, inOrder=false, " +
520 "distances=[" +
521 "{@type=korap:distance, key=w, min=1, max=10}" +
522 "], " +
523 "operands=[" +
524 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
525 "{@type=korap:token, wrap={@type=korap:term, key=gehen, layer=orth, match=match:eq}}" +
526 "]}," +
527 "{@type=korap:group, operation=operation:class, class=2, operands=[" +
528 "{@type=korap:token, wrap={@type=korap:term, key=voran, layer=orth, match=match:eq}}" +
529 "]}" +
530 "]" +
531 "}" +
532 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000533 ct = new CosmasTree(query);
534 map = ct.getRequestMap().get("query").toString();
Joachim Bingel89cceac2014-01-08 15:51:08 +0000535 assertEquals(nhit1.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingeld5161a12014-01-08 11:15:49 +0000536 }
537
538 @Test
Joachim Bingel87480d02014-01-17 14:07:46 +0000539 public void testOPBED() throws QueryException {
Joachim Bingeleecc7652014-01-11 17:21:07 +0000540 query = "#BED(der , sa)";
541 String bed1 =
Joachim Bingelcd7b7252014-02-13 08:49:14 +0000542 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands= [" +
543 "{@type=korap:group, operation=operation:position, frame=frame:startswith, operands=[" +
544 "{@type=korap:span, key=s}," +
545 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
546 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}" +
547 "]}" +
548 "]}" +
Joachim Bingeleecc7652014-01-11 17:21:07 +0000549 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000550 ct = new CosmasTree(query);
551 map = ct.getRequestMap().get("query").toString();
Joachim Bingeleecc7652014-01-11 17:21:07 +0000552 assertEquals(bed1.replaceAll(" ", ""), map.replaceAll(" ", ""));
553
554 query = "#BED(der Mann , +pe)";
555 String bed2 =
Joachim Bingel36233b52014-02-13 10:48:24 +0000556 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands= [" +
557 "{@type=korap:group, operation=operation:position, frame=frame:endswith, operands=[" +
558 "{@type=korap:span, key=p}," +
559 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
560 "{@type=korap:group, operation=operation:sequence, operands=[" +
561 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
562 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
563 "]}" +
564 "]}" +
565 "]}" +
566 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000567 ct = new CosmasTree(query);
568 map = ct.getRequestMap().get("query").toString();
Joachim Bingel36233b52014-02-13 10:48:24 +0000569 assertEquals(bed2.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000570
571 query = "#BED(der Mann , sa,-pa)";
572 String bed3 =
Joachim Bingel36233b52014-02-13 10:48:24 +0000573 "{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
574 "{@type=korap:group, operation=operation:sequence, distances=[" +
575 "{@type=korap:distance, key=w, min=0, max=0}" +
576 "], operands=[" +
577 "{@type=korap:group, operation=operation:position, frame=frame:startswith, operands=[" +
578 "{@type=korap:span, key=s}," +
579 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
580 "{@type=korap:group, operation=operation:sequence, operands=[" +
581 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
582 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
583 "]}" +
584 "]}" +
585 "]}," +
586 "{@type=korap:group, operation=operation:position, frame=frame:startswith, exclude=true, operands=[" +
587 "{@type=korap:span, key=p}," +
588 "{@type=korap:group, operation=operation:class, class=1, operands=[" +
589 "{@type=korap:group, operation=operation:sequence, operands=[" +
590 "{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
591 "{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
592 "]}" +
593 "]}" +
Joachim Bingel3f0850c2014-01-17 16:50:10 +0000594 "]}" +
595 "]}" +
596 "]}";
Joachim Bingel2daf9862014-02-12 10:18:54 +0000597 ct = new CosmasTree(query);
598 map = ct.getRequestMap().get("query").toString();
Joachim Bingel36233b52014-02-13 10:48:24 +0000599 assertEquals(bed3.replaceAll(" ", ""), map.replaceAll(" ", ""));
Joachim Bingeld5161a12014-01-08 11:15:49 +0000600 }
601
Joachim Bingelb5f7bf02014-01-07 16:36:54 +0000602}
603