| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 1 | package de.ids_mannheim.korap.query; |
| 2 | |
| Akron | d6f5f59 | 2018-06-19 15:58:16 +0200 | [diff] [blame] | 3 | import static de.ids_mannheim.korap.TestSimple.*; |
| Eliza Margaretha | 369e756 | 2015-02-09 17:36:24 +0000 | [diff] [blame] | 4 | import static org.junit.Assert.assertEquals; |
| 5 | import static org.junit.Assert.assertTrue; |
| 6 | import static org.junit.Assert.fail; |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 7 | |
| Eliza Margaretha | 369e756 | 2015-02-09 17:36:24 +0000 | [diff] [blame] | 8 | import org.apache.lucene.search.spans.SpanQuery; |
| 9 | import org.junit.Test; |
| 10 | import org.junit.runner.RunWith; |
| 11 | import org.junit.runners.JUnit4; |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 12 | |
| 13 | import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper; |
| 14 | import de.ids_mannheim.korap.util.QueryException; |
| 15 | |
| Nils Diewald | 0cc4f2e | 2015-01-30 20:13:08 +0000 | [diff] [blame] | 16 | /** |
| 17 | * @author diewald |
| 18 | */ |
| 19 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 20 | @RunWith(JUnit4.class) |
| 21 | public class TestSpanSequenceQueryJSON { |
| 22 | |
| 23 | static String path = "/queries/sequence/"; |
| 24 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 25 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 26 | // Test Extensions |
| 27 | |
| 28 | @Test |
| 29 | public void queryJSONseqEmpty () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 30 | SpanQueryWrapper sqwi = jsonQueryFile("empty.jsonld"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 31 | |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 32 | // [] |
| 33 | assertTrue(sqwi.isEmpty()); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 36 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 37 | @Test |
| 38 | public void queryJSONseqEmptyEnd () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 39 | SpanQueryWrapper sqwi = jsonQueryFile("empty-last.jsonld"); |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 40 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 41 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 44 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 45 | @Test |
| 46 | public void queryJSONseqEmptyEndClass () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 47 | SpanQueryWrapper sqwi = jsonQueryFile("empty-last-class.jsonld"); |
| 48 | // der{3:[]} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 49 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 50 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right, class:3)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 51 | }; |
| 52 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 53 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 54 | @Test |
| 55 | public void queryJSONseqEmptyEndRepetition () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 56 | SpanQueryWrapper sqwi = jsonQueryFile("empty-last-repetition.jsonld"); |
| 57 | // der[]{3,5} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 58 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 59 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{3, 5}, right)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 60 | }; |
| 61 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 62 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 63 | @Test |
| 64 | public void queryJSONseqEmptyStart () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 65 | SpanQueryWrapper sqwi = jsonQueryFile("empty-first.jsonld"); |
| 66 | // [][tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 67 | assertEquals(sqwi.toQuery().toString(), |
| 68 | "spanExpansion(tokens:tt/p:NN, []{1, 1}, left)"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 69 | }; |
| 70 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 71 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 72 | @Test |
| 73 | public void queryJSONseqEmptyStartClass () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 74 | SpanQueryWrapper sqwi = jsonQueryFile("empty-first-class.jsonld"); |
| 75 | // {2:[]}[tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 76 | assertEquals(sqwi.toQuery().toString(), |
| 77 | "spanExpansion(tokens:tt/p:NN, []{1, 1}, left, class:2)"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 78 | }; |
| 79 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 80 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 81 | @Test |
| 82 | public void queryJSONseqEmptyStartRepetition () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 83 | SpanQueryWrapper sqwi = jsonQueryFile("empty-first-repetition.jsonld"); |
| 84 | // []{2,7}[tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 85 | assertEquals(sqwi.toQuery().toString(), |
| 86 | "spanExpansion(tokens:tt/p:NN, []{2, 7}, left)"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 87 | }; |
| 88 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 89 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 90 | @Test |
| 91 | public void queryJSONseqEmptyStartRepetition2 () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 92 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 93 | "empty-first-repetition-2.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 94 | // []{0,0}[tt/p=NN] |
| 95 | assertEquals(sqwi.toQuery().toString(), "tokens:tt/p:NN"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 96 | }; |
| 97 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 98 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 99 | @Test |
| 100 | public void queryJSONseqEmptyMiddle () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 101 | SpanQueryWrapper sqwi = jsonQueryFile("empty-middle.jsonld"); |
| 102 | // der[][tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 103 | assertEquals(sqwi.toQuery().toString(), |
| 104 | "spanNext(tokens:s:der, spanExpansion(tokens:tt/p:NN, []{1, 1}, left))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 105 | }; |
| 106 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 107 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 108 | @Test |
| 109 | public void queryJSONseqEmptyMiddleClass () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 110 | SpanQueryWrapper sqwi = jsonQueryFile("empty-middle-class.jsonld"); |
| 111 | // der{1:[]}[tt/p=NN] |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 112 | assertEquals(sqwi.toQuery().toString(), |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 113 | "spanNext(tokens:s:der, spanExpansion(tokens:tt/p:NN, []{1, 1}, left, class:1))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 114 | }; |
| 115 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 116 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 117 | @Test |
| 118 | public void queryJSONseqEmptyMiddleRepetition () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 119 | SpanQueryWrapper sqwi = jsonQueryFile("empty-middle-repetition.jsonld"); |
| 120 | // der[]{4,8}[tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 121 | assertEquals(sqwi.toQuery().toString(), |
| 122 | "spanNext(tokens:s:der, spanExpansion(tokens:tt/p:NN, []{4, 8}, left))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 123 | }; |
| 124 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 125 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 126 | @Test |
| 127 | public void queryJSONseqEmptySurround () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 128 | SpanQueryWrapper sqwi = jsonQueryFile("empty-surround.jsonld"); |
| 129 | // [][tt/p=NN][] |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 130 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 131 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 132 | }; |
| 133 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 134 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 135 | @Test |
| 136 | public void queryJSONseqEmptySurroundClass () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 137 | SpanQueryWrapper sqwi = jsonQueryFile("empty-surround-class.jsonld"); |
| 138 | // [][tt/p=NN]{2:[]} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 139 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 140 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right, class:2)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 141 | }; |
| 142 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 143 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 144 | @Test |
| 145 | public void queryJSONseqEmptySurroundClass2 () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 146 | SpanQueryWrapper sqwi = jsonQueryFile("empty-surround-class-2.jsonld"); |
| 147 | // {3:[]}[tt/p=NN]{2:[]} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 148 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 149 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left, class:3), []{1, 1}, right, class:2)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 150 | }; |
| 151 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 152 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 153 | @Test |
| 154 | public void queryJSONseqEmptySurroundRepetition () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 155 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 156 | "empty-surround-repetition.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 157 | // [][tt/p=NN][]{2,7} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 158 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 159 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{2, 7}, right)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 160 | }; |
| 161 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 162 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 163 | @Test |
| 164 | public void queryJSONseqEmptySurroundRepetition2 () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 165 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 166 | "empty-surround-repetition-2.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 167 | // []{3,5}[tt/p=NN][]{2,7} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 168 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 169 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 5}, left), []{2, 7}, right)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 170 | }; |
| 171 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 172 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 173 | @Test |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 174 | public void queryJSONseqEmptySurroundRepetitionClass () |
| 175 | throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 176 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 177 | "empty-surround-repetition-class.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 178 | // {1:[]}{3,8}[tt/p=NN]{2:[]{2,7}} |
| 179 | // Ist gleichbedeutend mit |
| 180 | // {1:[]{3,8}}[tt/p=NN]{2:[]}{2,7} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 181 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 182 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 8}, left, class:1), []{2, 7}, right, class:2)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 183 | }; |
| 184 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 185 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 186 | @Test |
| 187 | public void queryJSONseqNegative () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 188 | SpanQueryWrapper sqwi = jsonQueryFile("negative.jsonld"); |
| 189 | // [tt/p!=NN] |
| 190 | assertTrue(sqwi.isNegative()); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 191 | }; |
| 192 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 193 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 194 | @Test |
| 195 | public void queryJSONseqNegativeStart () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 196 | SpanQueryWrapper sqwi = jsonQueryFile("negative-first.jsonld"); |
| 197 | // [tt/p!=NN][tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 198 | assertEquals(sqwi.toQuery().toString(), |
| 199 | "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, left)"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 200 | }; |
| 201 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 202 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 203 | @Test |
| 204 | public void queryJSONseqNegativeEnd () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 205 | SpanQueryWrapper sqwi = jsonQueryFile("negative-last.jsonld"); |
| 206 | // [tt/p=NN][tt/p!=NN] |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 207 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 208 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 209 | }; |
| 210 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 211 | |
| Akron | e54600f | 2018-01-04 20:10:31 +0100 | [diff] [blame] | 212 | @Test |
| 213 | public void queryJSONseqNegativeRegexEnd () throws QueryException { |
| 214 | SpanQueryWrapper sqwi = jsonQueryFile("negative-regex.jsonld"); |
| 215 | // [tt/p=NN][tt/p!="NN"] |
| 216 | assertEquals( |
| 217 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !SpanMultiTermQueryWrapper(tokens:/opennlp/p:NN/){1, 1}, right)}))", |
| 218 | sqwi.toQuery().toString() |
| 219 | ); |
| 220 | }; |
| 221 | |
| 222 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 223 | @Test |
| 224 | public void queryJSONseqNegativeStartRepetition () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 225 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 226 | "negative-first-repetition.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 227 | // [tt/p!=NN]{4,5}[tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 228 | assertEquals(sqwi.toQuery().toString(), |
| 229 | "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, left)"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 230 | }; |
| 231 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 232 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 233 | @Test |
| 234 | public void queryJSONseqNegativeStartRepetition2 () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 235 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 236 | "negative-first-repetition-2.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 237 | // [tt/p!=NN]{0,5}[tt/p=NN] |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 238 | assertEquals(sqwi.toQuery().toString(), |
| 239 | "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{0, 5}, left)"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 240 | }; |
| 241 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 242 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 243 | @Test |
| 244 | public void queryJSONseqNegativeStartRepetition3 () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 245 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 246 | "negative-first-repetition-3.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 247 | // [tt/p!=NN]{0,0}[tt/p=NN] |
| 248 | assertEquals(sqwi.toQuery().toString(), "tokens:tt/p:NN"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 249 | }; |
| 250 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 251 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 252 | @Test |
| 253 | public void queryJSONseqNegativeEndClass () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 254 | SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class.jsonld"); |
| 255 | // [tt/p=NN]{2:[tt/p!=NN]} |
| 256 | SpanQuery sq = sqwi.toQuery(); |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 257 | assertEquals(sq.toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 258 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right, class:2)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 259 | }; |
| 260 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 261 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 262 | @Test |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 263 | public void queryJSONseqNegativeEndRepetitionClass () |
| 264 | throws QueryException { |
| 265 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 266 | "negative-last-class-repetition.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 267 | // [tt/p=NN]{2:[tt/p!=NN]{4,5}} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 268 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 269 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 270 | }; |
| 271 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 272 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 273 | @Test |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 274 | public void queryJSONseqNegativeEndRepetitionClass2 () |
| 275 | throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 276 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 277 | "negative-last-class-repetition-2.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 278 | // [tt/p=NN]{2:[tt/p!=NN]}{4,5} |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 279 | assertEquals(sqwi.toQuery().toString(), |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 280 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))"); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 281 | }; |
| 282 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 283 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 284 | @Test |
| margaretha | 7d89c05 | 2017-05-10 19:11:45 +0200 | [diff] [blame] | 285 | public void queryJSONseqNegativelastConstraint () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 286 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 287 | "negative-last-constraint.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 288 | try { |
| 289 | sqwi.toQuery().toString(); |
| 290 | fail("Should throw an exception"); |
| 291 | } |
| 292 | catch (QueryException qe) { |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 293 | assertEquals( |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 294 | "Distance constraints not supported with empty, optional or negative operands", |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 295 | qe.getMessage()); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 296 | }; |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 297 | }; |
| 298 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 299 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 300 | @Test |
| 301 | public void queryJSONseqNegativeEndSequence () throws QueryException { |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 302 | SpanQueryWrapper sqwi = jsonQueryFile("negative-last-sequence.jsonld"); |
| 303 | // [tt/p=NN]([tt/p!=DET][tt/p!=NN]) |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 304 | assertEquals( |
| Akron | a7b936d | 2016-03-04 13:40:54 +0100 | [diff] [blame] | 305 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, !tokens:tt/p:DET{1, 1}, right), !tokens:tt/p:ADJ{1, 1}, right)}))", |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 306 | sqwi.toQuery().toString()); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 307 | }; |
| 308 | |
| Nils Diewald | b84e727 | 2014-11-07 01:27:38 +0000 | [diff] [blame] | 309 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 310 | @Test |
| 311 | public void queryJSONseqNegativeEndSequence2 () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 312 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 313 | "negative-last-sequence-2.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 314 | // [tt/p!=NN]([tt/p!=DET][tt/p=NN]) |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 315 | |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 316 | // spanNext(tokens:tt/p:NN, |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 317 | assertEquals( |
| 318 | "spanExpansion(spanExpansion(tokens:tt/p:ADJ, !tokens:tt/p:DET{1, 1}, left), !tokens:tt/p:NN{1, 1}, left)", |
| 319 | sqwi.toQuery().toString()); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 320 | }; |
| 321 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 322 | |
| Nils Diewald | b84e727 | 2014-11-07 01:27:38 +0000 | [diff] [blame] | 323 | @Test |
| 324 | public void queryJSONseqMultipleDistances () throws QueryException { |
| Akron | 4d5fe19 | 2016-02-16 00:22:14 +0100 | [diff] [blame] | 325 | SpanQueryWrapper sqwi = jsonQueryFile("distance-multiple.jsonld"); |
| Nils Diewald | 5c37570 | 2015-02-09 20:58:24 +0000 | [diff] [blame] | 326 | // er []{,10} kann []{1,10} sagte |
| Nils Diewald | b84e727 | 2014-11-07 01:27:38 +0000 | [diff] [blame] | 327 | |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 328 | assertEquals( |
| 329 | "spanDistance(tokens:s:er, spanDistance(tokens:s:kann, tokens:s:sagte, [(w[2:11], ordered, notExcluded)]), [(w[1:11], ordered, notExcluded)])", |
| 330 | sqwi.toQuery().toString()); |
| Nils Diewald | b84e727 | 2014-11-07 01:27:38 +0000 | [diff] [blame] | 331 | }; |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 332 | |
| Akron | 13db615 | 2016-02-19 14:08:38 +0100 | [diff] [blame] | 333 | |
| Akron | 4d5fe19 | 2016-02-16 00:22:14 +0100 | [diff] [blame] | 334 | @Test |
| 335 | public void queryJSONseqSentenceDistance () throws QueryException { |
| 336 | SpanQueryWrapper sqwi = jsonQueryFile("distance-sentence.jsonld"); |
| 337 | |
| Akron | 13db615 | 2016-02-19 14:08:38 +0100 | [diff] [blame] | 338 | assertEquals( |
| 339 | "spanElementDistance({129: tokens:s:der}, {129: tokens:s:Baum}, [(base/s:s[0:0], notOrdered, notExcluded)])", |
| 340 | sqwi.toQuery().toString()); |
| Akron | 4d5fe19 | 2016-02-16 00:22:14 +0100 | [diff] [blame] | 341 | }; |
| 342 | |
| Akron | 13db615 | 2016-02-19 14:08:38 +0100 | [diff] [blame] | 343 | |
| Akron | 4d5fe19 | 2016-02-16 00:22:14 +0100 | [diff] [blame] | 344 | @Test |
| 345 | public void queryJSONseqSentenceDistanceExcluded () throws QueryException { |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 346 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 347 | "distance-sentence-excluded.jsonld"); |
| Akron | 4d5fe19 | 2016-02-16 00:22:14 +0100 | [diff] [blame] | 348 | |
| Akron | 13db615 | 2016-02-19 14:08:38 +0100 | [diff] [blame] | 349 | assertEquals( |
| 350 | "spanElementDistance({129: tokens:s:der}, {129: tokens:s:Baum}, [(base/s:s[0:0], notOrdered, excluded)])", |
| 351 | sqwi.toQuery().toString()); |
| Akron | 4d5fe19 | 2016-02-16 00:22:14 +0100 | [diff] [blame] | 352 | }; |
| 353 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 354 | |
| Akron | 4e2bc0e | 2016-02-17 12:23:46 +0100 | [diff] [blame] | 355 | @Test |
| 356 | public void queryJSONkoralSimpleDistanceBug () throws QueryException { |
| 357 | SpanQueryWrapper sqwi = jsonQueryFile("distance-simple.jsonld"); |
| 358 | |
| Akron | 13db615 | 2016-02-19 14:08:38 +0100 | [diff] [blame] | 359 | assertEquals( |
| 360 | "spanDistance(tokens:s:der, tokens:s:Baum, [(w[2:2], ordered, notExcluded)])", |
| 361 | sqwi.toQuery().toString()); |
| Akron | 4e2bc0e | 2016-02-17 12:23:46 +0100 | [diff] [blame] | 362 | }; |
| 363 | |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 364 | |
| Akron | 07b727b | 2016-09-29 21:32:46 +0200 | [diff] [blame] | 365 | @Test |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 366 | public void queryJSONkoralOptionalityInDistanceBug () { |
| 367 | try { |
| 368 | // Sonne [] Mond? |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 369 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 370 | "distance-with-optionality.jsonld"); |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 371 | sqwi.toQuery().toString(); |
| 372 | } |
| 373 | catch (QueryException qe) { |
| 374 | assertEquals( |
| 375 | "Distance constraints not supported with empty, optional or negative operands", |
| 376 | qe.getMessage()); |
| 377 | } |
| 378 | // Could also be a distance at the end ... that's a query planner thing. |
| Akron | 07b727b | 2016-09-29 21:32:46 +0200 | [diff] [blame] | 379 | }; |
| 380 | |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 381 | |
| 382 | @Test |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 383 | public void queryJSONkoralOptionalityAfterEmptyBug () |
| 384 | throws QueryException { |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 385 | // Sonne [] Mond? |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 386 | SpanQueryWrapper sqwi = jsonQueryFile( |
| 387 | "empty-followed-by-optionality.jsonld"); |
| Akron | 07b727b | 2016-09-29 21:32:46 +0200 | [diff] [blame] | 388 | assertEquals( |
| Eliza Margaretha | 6f98920 | 2016-10-14 21:48:29 +0200 | [diff] [blame] | 389 | "focus(254: spanContain(<tokens:base/s:t />, {254: spanOr([spanExpansion(tokens:s:Sonne, []{1, 1}, right), spanNext(spanExpansion(tokens:s:Sonne, []{1, 1}, right), tokens:s:Mond)])}))", |
| 390 | sqwi.toQuery().toString()); |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 391 | // Could also be a distance at the end ... that's a query planner thing. |
| Akron | 07b727b | 2016-09-29 21:32:46 +0200 | [diff] [blame] | 392 | }; |
| 393 | |
| Akron | f9def5e | 2016-10-10 21:26:46 +0200 | [diff] [blame] | 394 | |
| Akron | 3fd7ffe | 2017-05-22 20:57:49 +0200 | [diff] [blame] | 395 | @Test |
| 396 | public void queryJSONseqEmptyNegativeOptionalClass () throws QueryException { |
| 397 | SpanQueryWrapper sqwi = jsonQueryFile("empty-negative-optional.jsonld"); |
| 398 | // der {[pos!=ADJA]*} Mann |
| 399 | assertEquals(sqwi.toQuery().toString(),"spanNext(tokens:s:der, spanExpansion(tokens:s:Mann, !tokens:tt/p:ADJA{0, 100}, left, class:1))"); |
| 400 | }; |
| 401 | |
| Akron | 79fa75b | 2017-08-09 12:49:08 +0200 | [diff] [blame] | 402 | @Test |
| 403 | public void queryJSONcosmas2Bug () throws QueryException { |
| 404 | |
| Akron | d6f5f59 | 2018-06-19 15:58:16 +0200 | [diff] [blame] | 405 | SpanQueryWrapper sqwi = getJsonQuery(getClass().getResource("/queries/bugs/cosmas_wildcards.jsonld").getFile()); |
| margaretha | f14f380 | 2017-08-30 16:34:01 +0200 | [diff] [blame] | 406 | SpanQuery sq = sqwi.toQuery(); |
| Akron | 79fa75b | 2017-08-09 12:49:08 +0200 | [diff] [blame] | 407 | // meine* /+w1:2,s0 &Erfahrung |
| margaretha | f14f380 | 2017-08-30 16:34:01 +0200 | [diff] [blame] | 408 | assertEquals(sq.toString(),"spanMultipleDistance({129: SpanMultiTermQueryWrapper(tokens:s:meine*)}, "+ |
| margaretha | 9880aec | 2017-08-31 16:58:07 +0200 | [diff] [blame] | 409 | "{129: tokens:tt/l:Erfahrung}, "+ |
| Akron | 79fa75b | 2017-08-09 12:49:08 +0200 | [diff] [blame] | 410 | "[(w[1:2], ordered, notExcluded), "+ |
| 411 | "(base/s:s[0:0], ordered, notExcluded)])"); |
| 412 | }; |
| 413 | |
| Akron | b8676eb | 2021-03-08 10:57:30 +0100 | [diff] [blame] | 414 | |
| 415 | @Test |
| 416 | public void queryJSONdistanceMultipleOps () throws QueryException { |
| 417 | |
| 418 | SpanQueryWrapper sqwi = getJsonQuery(getClass().getResource("/queries/sequence/distance-with-multiple-ops.jsonld").getFile()); |
| 419 | SpanQuery sq = sqwi.toQuery(); |
| 420 | assertEquals(sq.toString(),"spanDistance(spanDistance(tokens:s:der, tokens:s:alte, [(w[2:2], ordered, notExcluded)]), tokens:s:Baum, [(w[2:2], ordered, notExcluded)])"); |
| 421 | }; |
| 422 | |
| 423 | |
| Akron | 296fb4c | 2020-01-16 18:11:05 +0100 | [diff] [blame] | 424 | @Test |
| 425 | public void queryJSONcosmas2Bug2 () throws QueryException { |
| Akron | 79fa75b | 2017-08-09 12:49:08 +0200 | [diff] [blame] | 426 | |
| Akron | 296fb4c | 2020-01-16 18:11:05 +0100 | [diff] [blame] | 427 | SpanQueryWrapper sqwi = getJsonQuery(getClass().getResource("/queries/bugs/cosmas-exclude.jsonld").getFile()); |
| 428 | |
| 429 | SpanQuery sq = sqwi.toQuery(); |
| 430 | |
| 431 | // (Pop-up OR Pop-ups) %s0 (Internet OR Programm) |
| Akron | 163a04b | 2020-01-20 10:43:04 +0100 | [diff] [blame] | 432 | assertEquals(sq.toString(),"spanElementDistance({129: spanOr([tokens:s:Blatt, tokens:s:Augen])}, {129: spanOr([tokens:s:Wald, tokens:s:Baum])}, [(base/s:s[0:0], notOrdered, excluded)])"); |
| Akron | 296fb4c | 2020-01-16 18:11:05 +0100 | [diff] [blame] | 433 | }; |
| Akron | 79fa75b | 2017-08-09 12:49:08 +0200 | [diff] [blame] | 434 | |
| Akron | 4e2bc0e | 2016-02-17 12:23:46 +0100 | [diff] [blame] | 435 | |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 436 | // get query wrapper based on json file |
| margaretha | 7d89c05 | 2017-05-10 19:11:45 +0200 | [diff] [blame] | 437 | public SpanQueryWrapper jsonQueryFile (String filename) throws QueryException { |
| Akron | d6f5f59 | 2018-06-19 15:58:16 +0200 | [diff] [blame] | 438 | return getJsonQuery(getClass().getResource(path + filename).getFile()); |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 439 | }; |
| 440 | }; |