blob: 9decc2b8e2f6e0dda3c18febeaefada4847da7df [file] [log] [blame]
margaretha61eb20e2015-05-07 11:53:01 +02001package de.ids_mannheim.korap.index;
2
3import static de.ids_mannheim.korap.TestSimple.getJSONQuery;
4import static org.junit.Assert.assertEquals;
5
6import java.io.IOException;
7
8import org.apache.lucene.index.Term;
9import org.apache.lucene.search.spans.SpanQuery;
10import org.apache.lucene.search.spans.SpanTermQuery;
11import org.junit.Test;
12
13import de.ids_mannheim.korap.KrillIndex;
14import de.ids_mannheim.korap.query.DistanceConstraint;
15import de.ids_mannheim.korap.query.SpanClassQuery;
16import de.ids_mannheim.korap.query.SpanDistanceQuery;
17import de.ids_mannheim.korap.query.SpanElementQuery;
18import de.ids_mannheim.korap.query.SpanFocusQuery;
19import de.ids_mannheim.korap.query.SpanNextQuery;
20import de.ids_mannheim.korap.query.SpanReferenceQuery;
21import de.ids_mannheim.korap.query.SpanRelationMatchQuery;
22import de.ids_mannheim.korap.query.SpanRelationQuery;
23import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
margaretha8c0782b2016-02-01 13:12:25 +010024import de.ids_mannheim.korap.response.Match;
margaretha61eb20e2015-05-07 11:53:01 +020025import de.ids_mannheim.korap.response.Result;
26import de.ids_mannheim.korap.util.QueryException;
27
28public class TestReferenceIndex {
29 private KrillIndex ki;
30 private Result kr;
31
Akronbb5d1732015-06-22 01:22:40 +020032
margaretha61eb20e2015-05-07 11:53:01 +020033 @Test
34 public void testCase1 () throws IOException {
35 ki = new KrillIndex();
36 ki.addDoc(TestRelationIndex.createFieldDoc2());
37 ki.commit();
38
39 SpanTermQuery seq1 = new SpanTermQuery(new Term("base", "pos:V"));
40 SpanElementQuery seq2 = new SpanElementQuery("base", "np");
41 SpanClassQuery scq1 = new SpanClassQuery(seq1, (byte) 1);
42 SpanClassQuery scq2 = new SpanClassQuery(seq2, (byte) 2);
43 SpanNextQuery snq1 = new SpanNextQuery(scq1, scq2);
44
45 SpanFocusQuery sfq1 = new SpanFocusQuery(snq1, (byte) 2);
46
47 SpanRelationQuery srq = new SpanRelationQuery(new SpanTermQuery(
48 new Term("base", "<:child-of")), true);
49 // SpanSegmentQuery ssq = new SpanSegmentQuery(srq, sfq1,
50 // true);
51 // SpanFocusQuery sfq2 = new SpanFocusQuery(ssq, (byte) 1);
52 // sfq2.setSorted(false);
53 // sfq2.setMatchTemporaryClass(false);
54
55 SpanElementQuery seq3 = new SpanElementQuery("base", "pp");
56 SpanClassQuery scq3 = new SpanClassQuery(seq3, (byte) 3);
57 // SpanSegmentQuery ssq2 = new SpanSegmentQuery(sfq2, scq3,
58 // true);
59
Akronbb5d1732015-06-22 01:22:40 +020060 SpanRelationMatchQuery rq = new SpanRelationMatchQuery(srq, sfq1, scq3,
61 true);
margaretha61eb20e2015-05-07 11:53:01 +020062
63 // System.out.println(rq.toString());
64 SpanFocusQuery sfq3 = new SpanFocusQuery(rq, (byte) 1);
65
66 DistanceConstraint constraint = new DistanceConstraint(3, 3, true,
67 false);
68 SpanDistanceQuery sdq = new SpanDistanceQuery(sfq3, scq3, constraint,
69 true);
70
71 SpanReferenceQuery ref = new SpanReferenceQuery(sdq, (byte) 3, true);
72 // System.out.println(ref.toString());
73
Akron42993552016-02-04 13:24:24 +010074 kr = ki.search(ref, (short) 10);
Akron499c94c2016-02-04 13:13:43 +010075 /*
Akron42993552016-02-04 13:24:24 +010076 for (Match km : kr.getMatches()) {
Akron499c94c2016-02-04 13:13:43 +010077
Akron42993552016-02-04 13:24:24 +010078 System.out.println(km.getStartPos() + "," + km.getEndPos() + " "
79 + km.getSnippetBrackets());
80 }
81 System.out.println(kr.getTotalResults());
Akron499c94c2016-02-04 13:13:43 +010082 */
margaretha61eb20e2015-05-07 11:53:01 +020083 assertEquals(
84 "spanReference(spanDistance(focus(1: focus(#[1,2]spanSegment("
85 + "focus(#1: spanSegment(spanRelation(base:<:child-of), focus(2: spanNext("
86 + "{1: base:pos:V}, {2: <base:np />})))), {3: <base:pp />}))), "
87 + "{3: <base:pp />}, [(w[3:3], ordered, notExcluded)]), 3)",
88 ref.toString());
89
90 assertEquals(1, kr.getMatch(0).getStartPos());
91 assertEquals(7, kr.getMatch(0).getEndPos());
92 }
93
Akronbb5d1732015-06-22 01:22:40 +020094
margaretha61eb20e2015-05-07 11:53:01 +020095 @Test
Akronbb5d1732015-06-22 01:22:40 +020096 public void testCase2 () throws IOException, QueryException {
margaretha61eb20e2015-05-07 11:53:01 +020097
98 String filepath = getClass().getResource(
99 "/queries/reference/distance-reference.jsonld").getFile();
100 SpanQueryWrapper sqwi = getJSONQuery(filepath);
101 SpanQuery sq = sqwi.toQuery();
102
103 // cat="vb" & cat="prp" & cat="nn" & #1 .notordered #2 & #1
104 // .{0,2} #3 & #3 -> #2
105
106 assertEquals(
Akronbb5d1732015-06-22 01:22:40 +0200107 "spanReference(focus(#[1,2]spanSegment(focus(#2: "
108 + "spanSegment(spanRelation(tokens:>:stanford/d:tag), "
109 + "focus(3: spanDistance(focus(1: spanDistance({1: <tokens:vb />}, "
110 + "{2: <tokens:prp />}, [(w[0:1], notOrdered, notExcluded)])), "
111 + "{3: <tokens:nn />}, [(w[0:2], notOrdered, notExcluded)])))), "
112 + "{2: <tokens:prp />})), 2)", sq.toString());
margaretha61eb20e2015-05-07 11:53:01 +0200113
114 SpanElementQuery seq1 = new SpanElementQuery("tokens", "vb");
115 // new SpanTermQuery(new Term("tokens", "c:vb"));
116 SpanElementQuery seq2 = new SpanElementQuery("tokens", "prp");
117 // new SpanTermQuery(new Term("tokens", "c:prp"));
118 SpanElementQuery seq3 = new SpanElementQuery("tokens", "nn");
119 // new SpanTermQuery(new Term("tokens", "c:nn"));
120 SpanClassQuery scq1 = new SpanClassQuery(seq1, (byte) 1);
121 SpanClassQuery scq2 = new SpanClassQuery(seq2, (byte) 2);
122 SpanClassQuery scq3 = new SpanClassQuery(seq3, (byte) 3);
123
124 // vb .{0,1} prp
125 SpanDistanceQuery sdq1 = new SpanDistanceQuery(scq1, scq2,
126 new DistanceConstraint(0, 1, false, false), true);
127 SpanFocusQuery sfq1 = new SpanFocusQuery(sdq1, (byte) 1);
128
129 // vb .{0,2} nn
130 SpanDistanceQuery sdq2 = new SpanDistanceQuery(sfq1, scq3,
131 new DistanceConstraint(0, 2, false, false), true);
132 SpanFocusQuery sfq2 = new SpanFocusQuery(sdq2, (byte) 3);
133
134 // nn -> prp
135 SpanRelationQuery srq = new SpanRelationQuery(new SpanTermQuery(
136 new Term("tokens", ">:stanford/d:tag")), true);
137 SpanRelationMatchQuery rq = new SpanRelationMatchQuery(srq, sfq2, scq2,
138 true);
139
140 SpanReferenceQuery ref = new SpanReferenceQuery(rq, (byte) 2, true);
141
142 ki = new KrillIndex();
143 ki.addDoc(createFieldDoc0());
144 ki.commit();
145
146 kr = ki.search(ref, (short) 10);
147 // for (Match km : kr.getMatches()) {
148 // System.out.println(km.getStartPos() + "," + km.getEndPos()
149 // + " "
150 // + km.getSnippetBrackets());
151 // }
152
153 assertEquals(sq.toString(), ref.toString());
154 assertEquals(2, kr.getMatch(0).getStartPos());
155 assertEquals(4, kr.getMatch(0).getEndPos());
156 assertEquals(5, kr.getMatch(1).getStartPos());
157 assertEquals(9, kr.getMatch(1).getEndPos());
158 assertEquals(11, kr.getMatch(2).getStartPos());
159 assertEquals(13, kr.getMatch(2).getEndPos());
160
161 // multiple references
162
163 SpanFocusQuery sfq3 = new SpanFocusQuery(ref, (byte) 1);
164 // vp -> nn
165 SpanRelationMatchQuery rq2 = new SpanRelationMatchQuery(srq, sfq3,
166 scq3, true);
167
168 SpanReferenceQuery ref2 = new SpanReferenceQuery(rq2, (byte) 3, true);
169
170 kr = ki.search(ref2, (short) 10);
171 assertEquals(1, kr.getMatch(0).getStartPos());
172 assertEquals(4, kr.getMatch(0).getEndPos());
173 assertEquals(10, kr.getMatch(1).getStartPos());
174 assertEquals(13, kr.getMatch(1).getEndPos());
175
176 // for (Match km : kr.getMatches()) {
177 // System.out.println(km.getStartPos() + "," + km.getEndPos()
178 // + " "
179 // + km.getSnippetBrackets());
180 // }
181 }
182
Akronbb5d1732015-06-22 01:22:40 +0200183
margaretha61eb20e2015-05-07 11:53:01 +0200184 // multiple references
185 @Test
Akronbb5d1732015-06-22 01:22:40 +0200186 public void testCase3 () throws IOException, QueryException {
margaretha61eb20e2015-05-07 11:53:01 +0200187 ki = new KrillIndex();
188 ki.addDoc(createFieldDoc0());
189 ki.commit();
190
191 String filepath = getClass().getResource(
192 "/queries/reference/distance-multiple-references.jsonld")
193 .getFile();
194 SpanQueryWrapper sqwi = getJSONQuery(filepath);
195 SpanQuery sq = sqwi.toQuery();
196
197 // 'cat="vb" & cat="prp" & cat="nn" & #1 .{0,1} #2 & #1 .{0,2}
198 // #3 & #3 ->stanford/d #2 & #1 ->stanford #3' annis
199 // without layer=c and + relation key
200 assertEquals(
201 "spanReference(focus(#[1,2]spanSegment(focus(#2: spanSegment(spanRelation(tokens:>:stanford/d:tag), "
202 + "focus(1: spanReference(focus(#[1,2]spanSegment(focus(#2: spanSegment(spanRelation(tokens:>:stanford/d:tag), "
203 + "focus(3: spanDistance(focus(1: spanDistance({1: <tokens:vb />}, {2: <tokens:prp />}, "
204 + "[(w[0:1], notOrdered, notExcluded)])), {3: <tokens:nn />}, [(w[0:2], notOrdered, notExcluded)])))), "
205 + "{2: <tokens:prp />})), 2)))), {3: <tokens:nn />})), 3)",
206 sq.toString());
207 kr = ki.search(sq, (short) 10);
208 // for (Match km : kr.getMatches()) {
209 // System.out.println(km.getStartPos() + "," + km.getEndPos()
210 // + " "
211 // + km.getSnippetBrackets());
212 // }
213 assertEquals(1, kr.getMatch(0).getStartPos());
214 assertEquals(4, kr.getMatch(0).getEndPos());
215 assertEquals(10, kr.getMatch(1).getStartPos());
216 assertEquals(13, kr.getMatch(1).getEndPos());
217 }
218
Akronbb5d1732015-06-22 01:22:40 +0200219
margaretha61eb20e2015-05-07 11:53:01 +0200220 // multiple document
221 @Test
Akronbb5d1732015-06-22 01:22:40 +0200222 public void testCase4 () throws Exception {
margaretha61eb20e2015-05-07 11:53:01 +0200223 ki = new KrillIndex();
224 ki.addDoc(createFieldDoc0());
225 ki.addDoc(createFieldDoc1());
226 ki.commit();
227
228 String filepath = getClass().getResource(
Akronbb5d1732015-06-22 01:22:40 +0200229 "/queries/reference/distance-reference.jsonld").getFile();
margaretha61eb20e2015-05-07 11:53:01 +0200230 SpanQueryWrapper sqwi = getJSONQuery(filepath);
231 SpanQuery sq = sqwi.toQuery();
232
233 kr = ki.search(sq, (short) 10);
234
235 assertEquals(4, kr.getTotalResults());
236 assertEquals("doc-1", kr.getMatch(3).getDocID());
237 assertEquals(2, kr.getMatch(3).getStartPos());
238 assertEquals(4, kr.getMatch(3).getEndPos());
239 }
240
Akronbb5d1732015-06-22 01:22:40 +0200241
242 public static FieldDocument createFieldDoc1 () {
margaretha61eb20e2015-05-07 11:53:01 +0200243 FieldDocument fd = new FieldDocument();
244 fd.addString("ID", "doc-1");
245 fd.addTV(
246 "tokens",
247 "Frankenstein, treat my daughter well. She is the one that saved your master who you hold so dear.",
248
Akron42993552016-02-04 13:24:24 +0100249 "[(0-12)s:Frankenstein|_0$<i>0<i>12|"
250 + "<>:nn$<b>64<i>0<i>12<i>1<b>0<s>3|"
251 + "<>:np$<b>64<i>0<i>13<i>1<b>0<s>2|"
252 + "<>:s$<b>64<i>0<i>37<i>4<b>0<s>1|"
253 + "<:stanford/d:tag$<b>32<i>1<s>3<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200254
Akron42993552016-02-04 13:24:24 +0100255 + "[(14-19)s:treat|_1$<i>14<i>19|"
256 + "<>:vb$<b>64<i>14<i>19<i>2<b>0<s>1|"
margaretha10da63e2015-12-18 15:42:52 +0100257 + "<>:vp$<b>64<i>14<i>36<i>4<b>0<s>2|"
Akron42993552016-02-04 13:24:24 +0100258 + ">:stanford/d:tag$<b>32<i>0<s>1<s>3|"
259 + ">:stanford/d:tag$<b>32<i>3<s>1<s>1|"
260 + ">:stanford/d:tag$<b>32<i>4<s>1<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200261
Akron42993552016-02-04 13:24:24 +0100262 + "[(20-22)s:my|_2$<i>20<i>22|"
263 + "<>:prp$<b>64<i>20<i>22<i>3<b>0<s>1|"
264 + "<>:np$<b>64<i>20<i>31<i>3<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200265
Akron42993552016-02-04 13:24:24 +0100266 + "[(23-31)s:daughter|_3$<i>23<i>31|"
267 + "<>:nn$<b>64<i>23<i>31<i>4<b>0<s>1|"
268 + ">:stanford/d:tag$<b>32<i>2<s>1<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200269
Akron42993552016-02-04 13:24:24 +0100270 + "[(32-36)s:well|_4$<i>32<i>36|"
271 + "<>:rb$<b>64<i>32<i>36<i>5<b>0<s>1|"
272 + "<>:advp$<b>64<i>32<i>36<i>4<b>0<s>2]");
margaretha61eb20e2015-05-07 11:53:01 +0200273 return fd;
274 }
275
Akronbb5d1732015-06-22 01:22:40 +0200276
margaretha61eb20e2015-05-07 11:53:01 +0200277 public static FieldDocument createFieldDoc0 () {
278 FieldDocument fd = new FieldDocument();
279 fd.addString("ID", "doc-0");
280 fd.addTV(
281 "tokens",
282 "Frankenstein, treat my daughter well. She is the one that saved your master who you hold so dear.",
Akronbb5d1732015-06-22 01:22:40 +0200283
Akron42993552016-02-04 13:24:24 +0100284 "[(0-12)s:Frankenstein|_0$<i>0<i>12|"
285 + "<>:nn$<b>64<i>0<i>12<i>1<b>0<s>3|"
286 + "<>:np$<b>64<i>0<i>13<i>1<b>0<s>2|"
margaretha4f995582015-12-14 14:14:34 +0100287 + "<>:s$<b>64<i>0<i>37<i>5<b>0<s>1|"
Akron42993552016-02-04 13:24:24 +0100288 + "<:stanford/d:tag$<b>32<i>1<s>3<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200289
Akron42993552016-02-04 13:24:24 +0100290 + "[(14-19)s:treat|_1$<i>14<i>19|"
291 + "<>:vb$<b>64<i>14<i>19<i>2<b>0<s>1|"
292 + "<>:vp$<b>64<i>14<i>36<i>5<b>0<s>2|"
293 + ">:stanford/d:tag$<b>32<i>0<s>1<s>2|"
294 + ">:stanford/d:tag$<b>32<i>3<s>1<s>1|"
295 + ">:stanford/d:tag$<b>32<i>4<s>1<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200296
margaretha7ee65952015-12-14 15:39:12 +0100297 + "[(20-22)s:my|_2$<i>20<i>22|"
margaretha10da63e2015-12-18 15:42:52 +0100298 + "<>:prp$<b>64<i>20<i>22<i>3<b>0<s>1|"
Akron42993552016-02-04 13:24:24 +0100299 + "<>:np$<b>64<i>20<i>31<i>4<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200300
Akron42993552016-02-04 13:24:24 +0100301 + "[(23-31)s:daughter|_3$<i>23<i>31|"
302 + "<>:nn$<b>64<i>23<i>31<i>4<b>0<s>1|"
303 + ">:stanford/d:tag$<b>32<i>2<s>21<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200304
margaretha7ee65952015-12-14 15:39:12 +0100305 + "[(32-36)s:well|_4$<i>32<i>36|"
Akron42993552016-02-04 13:24:24 +0100306 + "<>:rb$<b>64<i>32<i>36<i>5<b>0<s>1|"
307 + "<>:advp$<b>64<i>32<i>36<i>5<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200308
Akron42993552016-02-04 13:24:24 +0100309 + "[(38-41)s:She|_5$<i>38<i>41|"
310 + "<>:prp$<b>64<i>38<i>41<i>6<b>0<s>3|"
311 + "<>:np$<b>64<i>38<i>41<i>6<b>0<s>2|"
312 + "<>:s$<b>64<i>38<i>97<i>18<b>0<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200313
Akron42993552016-02-04 13:24:24 +0100314 + "[(42-44)s:is|_6$<i>42<i>44|"
315 + "<>:vb$<b>64<i>42<i>44<i>7<b>0<s>1|"
316 + "<>:vp$<b>64<i>42<i>96<i>18<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200317
Akron42993552016-02-04 13:24:24 +0100318 + "[(45-48)s:the|_7$<i>45<i>48|"
319 + "<>:dt$<b>64<i>45<i>48<i>8<b>0<s>3|"
320 + "<>:np$<b>64<i>45<i>52<i>9<b>0<s>2|"
321 + "<>:np$<b>64<i>45<i>96<i>18<b>0<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200322
Akron42993552016-02-04 13:24:24 +0100323 + "[(49-52)s:one|_8$<i>49<i>52|"
324 + "<>:nn$<b>64<i>49<i>52<i>9<b>0<s>1|"
325 + ">:stanford/d:tag$<b>32<i>5<s>1<s>3|"
326 + ">:stanford/d:tag$<b>32<i>6<s>1<s>1|"
327 + ">:stanford/d:tag$<b>32<i>7<s>1<s>3|"
328 + ">:stanford/d:tag$<b>32<i>10<s>1<s>1]"
Akronbb5d1732015-06-22 01:22:40 +0200329
Akron42993552016-02-04 13:24:24 +0100330 + "[(53-57)s:that|_9$<i>53<i>57|"
331 + "<>:rp$<b>64<i>53<i>57<i>10<b>0<s>1|"
332 + "<>:sb$<b>64<i>53<i>96<i>18<b>0<s>2]"
Akronbb5d1732015-06-22 01:22:40 +0200333
Akron42993552016-02-04 13:24:24 +0100334 + "[(58-63)s:saved|_10$<i>58<i>63|"
335 + "<>:vb$<b>64<i>58<i>63<i>11<b>0<s>1|"
336 + "<>:s$<b>64<i>58<i>96<i>18<b>0<s>2|"
337 + "<>:vp$<b>64<i>58<i>96<i>18<b>0<s>3|"
338 + ">:stanford/d:tag$<b>32<i>9<s>1<s>1|"
339 + ">:stanford/d:tag$<b>32<i>12<s>1<s>1|"
340 + ">:stanford/d:tag$<b>32<i>15<s>1<s>33]"
margaretha61eb20e2015-05-07 11:53:01 +0200341
Akron42993552016-02-04 13:24:24 +0100342 + "[(64-68)s:your|_11$<i>64<i>68|"
343 + "<>:prp$<b>64<i>64<i>68<i>12<b>0<s>1|"
344 + "<>:np$<b>64<i>64<i>75<i>13<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200345
Akron42993552016-02-04 13:24:24 +0100346 + "[(69-75)s:master|_12$<i>69<i>75|"
347 + "<>:nn$<b>64<i>69<i>75<i>13<b>0<s>1|"
348 + ">:stanford/d:tag$<b>32<i>11<s>1<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200349
Akron42993552016-02-04 13:24:24 +0100350 + "[(76-79)s:who|_13$<i>76<i>79|"
351 + "<>:rp$<b>64<i>76<i>79<i>14<b>0<s>1|"
352 + "<>:sb$<b>64<i>76<i>96<i>18<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200353
Akron42993552016-02-04 13:24:24 +0100354 + "[(80-83)s:you|_14$<i>80<i>83|"
355 + "<>:prp$<b>64<i>80<i>83<i>15<b>0<s>3|"
356 + "<>:np$<b>64<i>80<i>83<i>15<b>0<s>2|"
357 + "<>:s$<b>64<i>80<i>96<i>18<b>0<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200358
Akron42993552016-02-04 13:24:24 +0100359 + "[(84-88)s:hold|_15$<i>84<i>88|"
360 + "<>:vb$<b>64<i>84<i>88<i>16<b>0<s>2|"
361 + "<>:vp$<b>64<i>84<i>96<i>18<b>0<s>1|"
362 + ">:stanford/d:tag$<b>32<i>13<s>2<s>1|"
363 + ">:stanford/d:tag$<b>32<i>14<s>2<s>3|"
364 + ">:stanford/d:tag$<b>32<i>17<s>2<s>1]"
margaretha61eb20e2015-05-07 11:53:01 +0200365
Akron42993552016-02-04 13:24:24 +0100366 + "[(89-91)s:so|_16$<i>89<i>91|"
367 + "<>:rb$<b>64<i>89<i>91<i>17<b>0<s>1|"
368 + "<>:adjp$<b>64<i>89<i>96<i>18<b>0<s>2]"
margaretha61eb20e2015-05-07 11:53:01 +0200369
Akron42993552016-02-04 13:24:24 +0100370 + "[(92-96)s:dear|_17$<i>92<i>96|"
371 + "<>:jj$<b>64<i>92<i>96<i>18<b>0<s>1|"
372 + ">:stanford/d:tag$<b>32<i>16<s>1<s>1]");
Akronbb5d1732015-06-22 01:22:40 +0200373
margaretha61eb20e2015-05-07 11:53:01 +0200374 return fd;
375 }
376}