Skip to content

Commit 091bfcf

Browse files
committed
Test for matching from multiple entries in one or more lists
1 parent a17454b commit 091bfcf

6 files changed

Lines changed: 176 additions & 0 deletions

File tree

tests/multimatch.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
multimatch1.lst:multimatch:list1:en
2+
multimatch2.lst:multimatch:list2:en
3+
multimatch3.lst:multimatch:list3:en

tests/multimatch.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
From the first list: fromlist1 (2 entries), alsolist1 (1), anotherlist1 (1)
2+
From the second list: fromlist2 (2 entries), alsolist2 (1), anotherlist2 (1)
3+
From the third: fromlist3 (2 entries), alsolist3 (1), anotherlist3 (1)
4+
From the first and second: fromlist12 (2 entries)
5+
From all three lists: fromlist123 (1)

tests/multimatch.xgapp

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<gate.util.persistence.GateApplication>
2+
<urlList class="gate.util.persistence.CollectionPersistence">
3+
<localList>
4+
<gate.creole.Plugin-Maven>
5+
<group>uk.ac.gate.plugins</group>
6+
<artifact>annie</artifact>
7+
<version>8.6-SNAPSHOT</version>
8+
<downloadListeners/>
9+
</gate.creole.Plugin-Maven>
10+
<gate.creole.Plugin-Maven>
11+
<group>uk.ac.gate.plugins</group>
12+
<artifact>stringannotation</artifact>
13+
<version>4.1</version>
14+
<downloadListeners/>
15+
</gate.creole.Plugin-Maven>
16+
</localList>
17+
<collectionType>java.util.Collections$UnmodifiableSet</collectionType>
18+
</urlList>
19+
<application class="gate.util.persistence.ConditionalSerialAnalyserControllerPersistence">
20+
<corpus class="gate.util.persistence.CorpusPersistence">
21+
<docList>
22+
<gate.util.persistence.LRPersistence>
23+
<resourceType>gate.corpora.DocumentImpl</resourceType>
24+
<resourceName>multimatch.txt_00010</resourceName>
25+
<initParams class="gate.util.persistence.MapPersistence">
26+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
27+
<localMap>
28+
<entry>
29+
<string>encoding</string>
30+
<string>UTF-8</string>
31+
</entry>
32+
<entry>
33+
<string>sourceUrl</string>
34+
<gate.util.persistence.PersistenceManager-URLHolder>
35+
<urlString>$relpath$multimatch.txt</urlString>
36+
</gate.util.persistence.PersistenceManager-URLHolder>
37+
</entry>
38+
<entry>
39+
<string>stringContent</string>
40+
<string></string>
41+
</entry>
42+
</localMap>
43+
</initParams>
44+
</gate.util.persistence.LRPersistence>
45+
</docList>
46+
<resourceType>gate.corpora.CorpusImpl</resourceType>
47+
<resourceName>GATE Corpus_0000F</resourceName>
48+
<initParams class="gate.util.persistence.MapPersistence">
49+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
50+
<localMap/>
51+
</initParams>
52+
</corpus>
53+
<strategiesList class="gate.util.persistence.CollectionPersistence">
54+
<localList>
55+
<gate.util.persistence.AnalyserRunningStrategyPersistence>
56+
<runMode>1</runMode>
57+
<featureName></featureName>
58+
<featureValue></featureValue>
59+
<pr class="gate.util.persistence.LanguageAnalyserPersistence">
60+
<runtimeParams class="gate.util.persistence.MapPersistence">
61+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
62+
<localMap/>
63+
</runtimeParams>
64+
<resourceType>gate.creole.annotdelete.AnnotationDeletePR</resourceType>
65+
<resourceName>Document Reset PR 0000A</resourceName>
66+
<initParams class="gate.util.persistence.MapPersistence">
67+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
68+
<localMap/>
69+
</initParams>
70+
<features class="gate.util.persistence.MapPersistence">
71+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
72+
<localMap/>
73+
</features>
74+
</pr>
75+
</gate.util.persistence.AnalyserRunningStrategyPersistence>
76+
<gate.util.persistence.AnalyserRunningStrategyPersistence>
77+
<runMode>1</runMode>
78+
<featureName></featureName>
79+
<featureValue></featureValue>
80+
<pr class="gate.util.persistence.LanguageAnalyserPersistence">
81+
<runtimeParams class="gate.util.persistence.MapPersistence">
82+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
83+
<localMap/>
84+
</runtimeParams>
85+
<resourceType>gate.creole.tokeniser.DefaultTokeniser</resourceType>
86+
<resourceName>ANNIE English Tokeniser 0000B</resourceName>
87+
<initParams class="gate.util.persistence.MapPersistence">
88+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
89+
<localMap/>
90+
</initParams>
91+
<features class="gate.util.persistence.MapPersistence">
92+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
93+
<localMap/>
94+
</features>
95+
</pr>
96+
</gate.util.persistence.AnalyserRunningStrategyPersistence>
97+
<gate.util.persistence.AnalyserRunningStrategyPersistence>
98+
<runMode>1</runMode>
99+
<pr class="gate.util.persistence.LanguageAnalyserPersistence">
100+
<runtimeParams class="gate.util.persistence.MapPersistence">
101+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
102+
<localMap/>
103+
</runtimeParams>
104+
<resourceType>com.jpetrak.gate.stringannotation.extendedgazetteer.ExtendedGazetteer</resourceType>
105+
<resourceName>Extended Gazetteer 0000E</resourceName>
106+
<initParams class="gate.util.persistence.MapPersistence">
107+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
108+
<localMap>
109+
<entry>
110+
<string>caseSensitive</string>
111+
<boolean>false</boolean>
112+
</entry>
113+
<entry>
114+
<string>configFileURL</string>
115+
<gate.util.persistence.PersistenceManager-RRPersistence>
116+
<uriString>$relpath$multimatch.def</uriString>
117+
</gate.util.persistence.PersistenceManager-RRPersistence>
118+
</entry>
119+
</localMap>
120+
</initParams>
121+
<features class="gate.util.persistence.MapPersistence">
122+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
123+
<localMap/>
124+
</features>
125+
</pr>
126+
</gate.util.persistence.AnalyserRunningStrategyPersistence>
127+
</localList>
128+
<collectionType>java.util.ArrayList</collectionType>
129+
</strategiesList>
130+
<prList class="gate.util.persistence.CollectionPersistence">
131+
<localList>
132+
<gate.util.persistence.LanguageAnalyserPersistence reference="../../../strategiesList/localList/gate.util.persistence.AnalyserRunningStrategyPersistence/pr"/>
133+
<gate.util.persistence.LanguageAnalyserPersistence reference="../../../strategiesList/localList/gate.util.persistence.AnalyserRunningStrategyPersistence[2]/pr"/>
134+
<gate.util.persistence.LanguageAnalyserPersistence reference="../../../strategiesList/localList/gate.util.persistence.AnalyserRunningStrategyPersistence[3]/pr"/>
135+
</localList>
136+
<collectionType>java.util.ArrayList</collectionType>
137+
</prList>
138+
<resourceType>gate.creole.ConditionalSerialAnalyserController</resourceType>
139+
<resourceName>multimatch.xgapp</resourceName>
140+
<initParams class="gate.util.persistence.MapPersistence">
141+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
142+
<localMap/>
143+
</initParams>
144+
<features class="gate.util.persistence.MapPersistence">
145+
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
146+
<localMap/>
147+
</features>
148+
</application>
149+
</gate.util.persistence.GateApplication>

tests/multimatch1.lst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fromlist1 f=first
2+
fromlist1 f=second
3+
alsolist1 f=first
4+
fromlist12 f=first
5+
anotherlist1 f=first
6+
fromlist12 f=second
7+
fromlist123

tests/multimatch2.lst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fromlist2 f=first
2+
fromlist2 f=second
3+
alsolist2 f=first
4+
fromlist12 f=first
5+
anotherlist2 f=first
6+
fromlist12 f=second
7+
fromlist123

tests/multimatch3.lst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fromlist3 f=first
2+
fromlist3 f=second
3+
alsolist3 f=first
4+
anotherlist3 f=first
5+
fromlist123

0 commit comments

Comments
 (0)