Merge lp:~zorba-coders/zorba/update3.0_info-extraction-module into lp:zorba/info-extraction-module
- update3.0_info-extraction-module
- Merge into info-extraction-module
Proposed by
Juan Zacarias
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 23 | ||||
Proposed branch: | lp:~zorba-coders/zorba/update3.0_info-extraction-module | ||||
Merge into: | lp:zorba/info-extraction-module | ||||
Diff against target: |
304 lines (+52/-52) 9 files modified
src/CMakeLists.txt (+2/-2) src/info-extraction-module.xq (+23/-23) src/info-extraction-module.xsd (+2/-2) test/Queries/categories.xq (+5/-5) test/Queries/concepts-inline.xq (+2/-2) test/Queries/concepts.xq (+4/-4) test/Queries/entities-inline.xq (+3/-3) test/Queries/entities.xq (+7/-7) test/Queries/relations.xq (+4/-4) |
||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/update3.0_info-extraction-module | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juan Zacarias | Approve | ||
Chris Hillery | Approve | ||
Review via email: mp+170463@code.launchpad.net |
Commit message
Update to 3.0
Description of the change
Update to 3.0
To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) : | # |
review:
Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting criteria failed for the following merge proposals:
https:/
Votes: {'Approve': 1}
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue result for https:/
Stage "CommitZorba" failed.
Check console output at http://
Revision history for this message
Juan Zacarias (juan457) : | # |
review:
Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for the following merge proposals:
https:/
Progress dashboard at http://
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue succeeded - proposal merged!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/CMakeLists.txt' |
2 | --- src/CMakeLists.txt 2012-07-03 20:02:52 +0000 |
3 | +++ src/CMakeLists.txt 2013-06-19 22:53:34 +0000 |
4 | @@ -12,6 +12,6 @@ |
5 | # See the License for the specific language governing permissions and |
6 | # limitations under the License. |
7 | |
8 | -DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/info-extraction" FILE "info-extraction-module.xq") |
9 | +DECLARE_ZORBA_MODULE (URI "http://zorba.io/modules/info-extraction" FILE "info-extraction-module.xq") |
10 | |
11 | -DECLARE_ZORBA_SCHEMA (URI "http://www.zorba-xquery.com/modules/info-extraction" FILE "info-extraction-module.xsd") |
12 | +DECLARE_ZORBA_SCHEMA (URI "http://zorba.io/modules/info-extraction" FILE "info-extraction-module.xsd") |
13 | |
14 | === modified file 'src/info-extraction-module.xq' |
15 | --- src/info-extraction-module.xq 2013-06-15 19:42:23 +0000 |
16 | +++ src/info-extraction-module.xq 2013-06-19 22:53:34 +0000 |
17 | @@ -17,14 +17,14 @@ |
18 | :) |
19 | |
20 | (:~ |
21 | - : This library module provides data extraction functions that return a list |
22 | - : of entities, relations, categories and concepts present in a given text. |
23 | + : <p>This library module provides data extraction functions that return a list |
24 | + : of entities, relations, categories and concepts present in a given text.</p> |
25 | : |
26 | : @author Pedro Antunes |
27 | : @project Zorba/Data Cleaning/Info Extraction |
28 | :) |
29 | |
30 | -module namespace ex = "http://www.zorba-xquery.com/modules/info-extraction"; |
31 | +module namespace ex = "http://zorba.io/modules/info-extraction"; |
32 | |
33 | declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
34 | |
35 | @@ -35,9 +35,9 @@ |
36 | import schema namespace h = "http://expath.org/ns/http-client"; |
37 | |
38 | (:~ |
39 | - : Uses Yahoo's Content Analysis webservice to return a list of entities |
40 | - : encountered in the text supplied as input. |
41 | - : See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information. |
42 | + : <p>Uses Yahoo's Content Analysis webservice to return a list of entities |
43 | + : encountered in the text supplied as input.</p> |
44 | + : <p>See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.</p> |
45 | : |
46 | : @param $text String to be analyzed |
47 | : @return Sequence of recognized entities |
48 | @@ -60,9 +60,9 @@ |
49 | }; |
50 | |
51 | (:~ |
52 | - : Uses Yahoo's Content Analysis webservice to return a list of categories (topics) related |
53 | - : to the text supplied as input. |
54 | - : See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information. |
55 | + : <p>Uses Yahoo's Content Analysis webservice to return a list of categories (topics) related |
56 | + : to the text supplied as input.</p> |
57 | + : <p>See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.</p> |
58 | : |
59 | : @param $text String to be analyzed |
60 | : @return Sequence of recognized categories |
61 | @@ -78,9 +78,9 @@ |
62 | }; |
63 | |
64 | (:~ |
65 | - : Uses Yahoo's Content Analysis webservice to return a list of relations (entities found and related wikipedia links) |
66 | - : encountered in the text supplied as input. |
67 | - : See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information. |
68 | + : <p>Uses Yahoo's Content Analysis webservice to return a list of relations (entities found and related wikipedia links) |
69 | + : encountered in the text supplied as input.</p> |
70 | + : <p>See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.</p> |
71 | : |
72 | : @param $text String to be analyzed |
73 | : @return Sequence of recognized relations |
74 | @@ -107,9 +107,9 @@ |
75 | }; |
76 | |
77 | (:~ |
78 | - : Uses Yahoo's Content Analysis webservice to return a list of concepts (entity found and the corresponding wikipedia link) |
79 | - : encountered in the text supplied as input. |
80 | - : See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information. |
81 | + : <p>Uses Yahoo's Content Analysis webservice to return a list of concepts (entity found and the corresponding wikipedia link) |
82 | + : encountered in the text supplied as input.</p> |
83 | + : <p>See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.</p> |
84 | : |
85 | : @param $text String to be analyzed |
86 | : @return Sequence of recognized concepts |
87 | @@ -136,8 +136,8 @@ |
88 | }; |
89 | |
90 | (:~ |
91 | - : Uses Yahoo's Content Analysis webservice to return the text supplied as input |
92 | - : together with entities recognized annotated as xml elements in the text. |
93 | + : <p>Uses Yahoo's Content Analysis webservice to return the text supplied as input |
94 | + : together with entities recognized annotated as xml elements in the text.</p> |
95 | : |
96 | : @param $text String to be analyzed |
97 | : @return Mixed sequence of strings and <ex:entity> elements |
98 | @@ -148,9 +148,9 @@ |
99 | }; |
100 | |
101 | (:~ |
102 | - : Uses Yahoo's Content Analysis webservice to return the text supplied as input |
103 | + : <p>Uses Yahoo's Content Analysis webservice to return the text supplied as input |
104 | : together with concepts (entities with corresponding wikipedia link) annotated |
105 | - : as xml elements in the text. |
106 | + : as xml elements in the text.</p> |
107 | : |
108 | : @param $text String to be analyzed |
109 | : @return Mixed sequence of strings and <ex:concept> elements |
110 | @@ -161,7 +161,7 @@ |
111 | }; |
112 | |
113 | (:~ |
114 | - : Creates entities inline annotations in a given string |
115 | + : <p>Creates entities inline annotations in a given string</p> |
116 | : |
117 | : @param $text String to be analyzed |
118 | : @param $entities list of entities found in the given string |
119 | @@ -178,7 +178,7 @@ |
120 | }; |
121 | |
122 | (:~ |
123 | - : Creates concepts inline annotations in a given string |
124 | + : <p>Creates concepts inline annotations in a given string</p> |
125 | : |
126 | : @param $text String to be analyzed |
127 | : @param $concepts list of concepts found in the given string |
128 | @@ -189,13 +189,13 @@ |
129 | if ( count($concepts) = 0 ) then $text |
130 | else(substring($text, 0, ($concepts[1]/ex:entity/@start) +1 -$size), |
131 | if ( count( $concepts[1]/ex:wikipedia_url ) >= 1 ) |
132 | - then <ex:concept xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="{$concepts[1]/ex:entity/@start}" end="{$concepts[1]/ex:entity/@end}" url="{$concepts[1]/ex:wikipedia_url[1]/text()}">{$concepts[1]/ex:entity/text()}</ex:concept> |
133 | + then <ex:concept xmlns:ex="http://zorba.io/modules/info-extraction" start="{$concepts[1]/ex:entity/@start}" end="{$concepts[1]/ex:entity/@end}" url="{$concepts[1]/ex:wikipedia_url[1]/text()}">{$concepts[1]/ex:entity/text()}</ex:concept> |
134 | else $concepts[1]/ex:entity, |
135 | ex:concept-inline-annotation(substring($text, ($concepts[1]/ex:entity/@end) +2 -$size), $concepts[position() >1], ($concepts[1]/ex:entity/@end) +1)) |
136 | }; |
137 | |
138 | (:~ |
139 | - : Establishes connection with the Yahoo Server |
140 | + : <p>Establishes connection with the Yahoo Server</p> |
141 | : |
142 | : @param $text String to be analyzed |
143 | : @return XML document returned by the Yahoo Server |
144 | |
145 | === modified file 'src/info-extraction-module.xsd' |
146 | --- src/info-extraction-module.xsd 2012-11-26 16:30:10 +0000 |
147 | +++ src/info-extraction-module.xsd 2013-06-19 22:53:34 +0000 |
148 | @@ -1,7 +1,7 @@ |
149 | <?xml version="1.0" encoding="UTF-8"?> |
150 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
151 | - xmlns="http://www.zorba-xquery.com/modules/info-extraction" |
152 | - targetNamespace="http://www.zorba-xquery.com/modules/info-extraction" |
153 | + xmlns="http://zorba.io/modules/info-extraction" |
154 | + targetNamespace="http://zorba.io/modules/info-extraction" |
155 | elementFormDefault="qualified"> |
156 | |
157 | <xs:element name="wikipedia_url" type="xs:string"/> |
158 | |
159 | === modified file 'test/Queries/categories.xq' |
160 | --- test/Queries/categories.xq 2012-11-26 16:30:10 +0000 |
161 | +++ test/Queries/categories.xq 2013-06-19 22:53:34 +0000 |
162 | @@ -1,6 +1,6 @@ |
163 | -import module namespace ex = 'http://www.zorba-xquery.com/modules/info-extraction'; |
164 | +import module namespace ex = 'http://zorba.io/modules/info-extraction'; |
165 | |
166 | -import schema namespace schema = 'http://www.zorba-xquery.com/modules/info-extraction'; |
167 | +import schema namespace schema = 'http://zorba.io/modules/info-extraction'; |
168 | |
169 | let $result := ex:categories("President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance.") |
170 | |
171 | @@ -10,8 +10,8 @@ |
172 | |
173 | <?xml version="1.0" encoding="UTF-8"?> |
174 | <!-- The ex:categories function should return the following list of results for the input provided in the example --> |
175 | -<ex:category xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction">Politics & Government</ex:category> |
176 | -<ex:category xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction">Budget, Tax & Economy</ex:category> |
177 | -<ex:category xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction">Government</ex:category> |
178 | +<ex:category xmlns:ex="http://zorba.io/modules/info-extraction">Politics & Government</ex:category> |
179 | +<ex:category xmlns:ex="http://zorba.io/modules/info-extraction">Budget, Tax & Economy</ex:category> |
180 | +<ex:category xmlns:ex="http://zorba.io/modules/info-extraction">Government</ex:category> |
181 | |
182 | :) |
183 | |
184 | === modified file 'test/Queries/concepts-inline.xq' |
185 | --- test/Queries/concepts-inline.xq 2012-11-26 16:30:10 +0000 |
186 | +++ test/Queries/concepts-inline.xq 2013-06-19 22:53:34 +0000 |
187 | @@ -1,6 +1,6 @@ |
188 | -import module namespace ex = 'http://www.zorba-xquery.com/modules/info-extraction'; |
189 | +import module namespace ex = 'http://zorba.io/modules/info-extraction'; |
190 | |
191 | -import schema namespace schema = 'http://www.zorba-xquery.com/modules/info-extraction'; |
192 | +import schema namespace schema = 'http://zorba.io/modules/info-extraction'; |
193 | |
194 | let $result := ex:concepts-inline("President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance.") |
195 | |
196 | |
197 | === modified file 'test/Queries/concepts.xq' |
198 | --- test/Queries/concepts.xq 2012-11-26 16:30:10 +0000 |
199 | +++ test/Queries/concepts.xq 2013-06-19 22:53:34 +0000 |
200 | @@ -1,6 +1,6 @@ |
201 | -import module namespace ex = 'http://www.zorba-xquery.com/modules/info-extraction'; |
202 | +import module namespace ex = 'http://zorba.io/modules/info-extraction'; |
203 | |
204 | -import schema namespace schema = 'http://www.zorba-xquery.com/modules/info-extraction'; |
205 | +import schema namespace schema = 'http://zorba.io/modules/info-extraction'; |
206 | |
207 | let $result := ex:concepts("President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance.") |
208 | |
209 | @@ -10,11 +10,11 @@ |
210 | |
211 | <?xml version="1.0" encoding="UTF-8"?> |
212 | <!-- The ex:concepts function should return the following list of results for the input provided in the example --> |
213 | -<ex:concept xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction"> |
214 | +<ex:concept xmlns:ex="http://zorba.io/modules/info-extraction"> |
215 | <ex:entity start="0" end="14">President Obama</ex:entity> |
216 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/Barack_Obama</ex:wikipedia_url> |
217 | </ex:concept> |
218 | -<ex:concept xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction"> |
219 | +<ex:concept xmlns:ex="http://zorba.io/modules/info-extraction"> |
220 | <ex:entity start="36" end="43"> |
221 | <ex:type>organization</ex:type>Congress</ex:entity> |
222 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/United_States_Congress</ex:wikipedia_url> |
223 | |
224 | === modified file 'test/Queries/entities-inline.xq' |
225 | --- test/Queries/entities-inline.xq 2012-11-26 16:30:10 +0000 |
226 | +++ test/Queries/entities-inline.xq 2013-06-19 22:53:34 +0000 |
227 | @@ -1,6 +1,6 @@ |
228 | -import module namespace ex = 'http://www.zorba-xquery.com/modules/info-extraction'; |
229 | +import module namespace ex = 'http://zorba.io/modules/info-extraction'; |
230 | |
231 | -import schema namespace schema = 'http://www.zorba-xquery.com/modules/info-extraction'; |
232 | +import schema namespace schema = 'http://zorba.io/modules/info-extraction'; |
233 | |
234 | let $result := ex:entities-inline("President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance.") |
235 | |
236 | @@ -10,6 +10,6 @@ |
237 | |
238 | <?xml version="1.0" encoding="UTF-8"?> |
239 | <!-- The ex:entities-inline function should return the following list of results for the input provided in the example --> |
240 | -<ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="0" end="14">President Obama</ex:entity> called Wednesday on <ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="36" end="43" type="organization">Congress</ex:entity> to extend a <ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="57" end="65">tax break</ex:entity> for students included in last year's <ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="104" end="128">economic stimulus package</ex:entity>, arguing that the policy provides more <ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="169" end="187">generous assistance</ex:entity>. |
241 | +<ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="0" end="14">President Obama</ex:entity> called Wednesday on <ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="36" end="43" type="organization">Congress</ex:entity> to extend a <ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="57" end="65">tax break</ex:entity> for students included in last year's <ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="104" end="128">economic stimulus package</ex:entity>, arguing that the policy provides more <ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="169" end="187">generous assistance</ex:entity>. |
242 | |
243 | :) |
244 | |
245 | === modified file 'test/Queries/entities.xq' |
246 | --- test/Queries/entities.xq 2012-11-26 16:30:10 +0000 |
247 | +++ test/Queries/entities.xq 2013-06-19 22:53:34 +0000 |
248 | @@ -1,6 +1,6 @@ |
249 | -import module namespace ex = 'http://www.zorba-xquery.com/modules/info-extraction'; |
250 | +import module namespace ex = 'http://zorba.io/modules/info-extraction'; |
251 | |
252 | -import schema namespace schema = 'http://www.zorba-xquery.com/modules/info-extraction'; |
253 | +import schema namespace schema = 'http://zorba.io/modules/info-extraction'; |
254 | |
255 | let $result := ex:entities("President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance.") |
256 | |
257 | @@ -10,11 +10,11 @@ |
258 | |
259 | <?xml version="1.0" encoding="UTF-8"?> |
260 | <!-- The ex:entities function should return the following list of results for the input provided in the example --> |
261 | -<ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="0" end="14">President Obama</ex:entity> |
262 | -<ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="36" end="43"> |
263 | +<ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="0" end="14">President Obama</ex:entity> |
264 | +<ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="36" end="43"> |
265 | <ex:type>organization</ex:type>Congress</ex:entity> |
266 | -<ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="57" end="65">tax break</ex:entity> |
267 | -<ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="104" end="128">economic stimulus package</ex:entity> |
268 | -<ex:entity xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction" start="169" end="187">generous assistance</ex:entity> |
269 | +<ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="57" end="65">tax break</ex:entity> |
270 | +<ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="104" end="128">economic stimulus package</ex:entity> |
271 | +<ex:entity xmlns:ex="http://zorba.io/modules/info-extraction" start="169" end="187">generous assistance</ex:entity> |
272 | |
273 | :) |
274 | |
275 | === modified file 'test/Queries/relations.xq' |
276 | --- test/Queries/relations.xq 2012-11-26 16:30:10 +0000 |
277 | +++ test/Queries/relations.xq 2013-06-19 22:53:34 +0000 |
278 | @@ -1,6 +1,6 @@ |
279 | -import module namespace ex = 'http://www.zorba-xquery.com/modules/info-extraction'; |
280 | +import module namespace ex = 'http://zorba.io/modules/info-extraction'; |
281 | |
282 | -import schema namespace schema = 'http://www.zorba-xquery.com/modules/info-extraction'; |
283 | +import schema namespace schema = 'http://zorba.io/modules/info-extraction'; |
284 | |
285 | let $result := ex:relations("President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance.") |
286 | |
287 | @@ -10,7 +10,7 @@ |
288 | |
289 | <?xml version="1.0" encoding="UTF-8"?> |
290 | <!-- The ex:relations function should return the following list of results for the input provided in the example --> |
291 | -<ex:relation xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction"> |
292 | +<ex:relation xmlns:ex="http://zorba.io/modules/info-extraction"> |
293 | <ex:entity start="0" end="14">President Obama</ex:entity> |
294 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/Gabrielle_Giffords</ex:wikipedia_url> |
295 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/2011_Tucson_shooting</ex:wikipedia_url> |
296 | @@ -18,7 +18,7 @@ |
297 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/White_House</ex:wikipedia_url> |
298 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/Recall_%28memory%29</ex:wikipedia_url> |
299 | </ex:relation> |
300 | -<ex:relation xmlns:ex="http://www.zorba-xquery.com/modules/info-extraction"> |
301 | +<ex:relation xmlns:ex="http://zorba.io/modules/info-extraction"> |
302 | <ex:entity start="36" end="43"> |
303 | <ex:type>organization</ex:type>Congress</ex:entity> |
304 | <ex:wikipedia_url>http://en.wikipedia.com/wiki/Republican_Party_%28United_States%29</ex:wikipedia_url> |
Validation queue starting for the following merge proposals: /code.launchpad .net/~zorba- coders/ zorba/update3. 0_info- extraction- module/ +merge/ 170463
https:/
Progress dashboard at http:// jenkins. lambda. nu/view/ ValidationQueue