Re: [Zorba-coders] [Merge] lp:zorba/info-extraction-module into lp:zorba

2012-11-28 Thread Chris Hillery
You can't merge a non-core module to lp:zorba.
-- 
https://code.launchpad.net/~zorba-coders/zorba/info-extraction-module/+merge/111723
Your team Zorba Coders is requested to review the proposed merge of 
lp:zorba/info-extraction-module into lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:zorba/info-extraction-module into lp:zorba

2012-11-28 Thread Chris Hillery
The proposal to merge lp:zorba/info-extraction-module into lp:zorba has been 
updated.

Status: Needs review => Rejected

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/info-extraction-module/+merge/111723
-- 
https://code.launchpad.net/~zorba-coders/zorba/info-extraction-module/+merge/111723
Your team Zorba Coders is requested to review the proposed merge of 
lp:zorba/info-extraction-module into lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:zorba/info-extraction-module into lp:zorba

2012-06-23 Thread Pedro Miguel Antunes
Pedro Miguel Antunes has proposed merging lp:zorba/info-extraction-module into 
lp:zorba.

Requested reviews:
  Zorba Coders (zorba-coders)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/info-extraction-module/+merge/111723

CMakelists.txt has been added for the project and I have managed to build the 
module separately and together with Zorba.
The test directories have been fixed, and the results now have the appropriate 
.xml.res extension.
The test queries have been fixed and no longer have references to a folder in 
my computer.
The .DS_Store files have been removed from the branch.
-- 
https://code.launchpad.net/~zorba-coders/zorba/info-extraction-module/+merge/111723
Your team Zorba Coders is requested to review the proposed merge of 
lp:zorba/info-extraction-module into lp:zorba.
=== added file 'CMakeLists.txt'
--- CMakeLists.txt	1970-01-01 00:00:00 +
+++ CMakeLists.txt	2012-06-23 18:55:25 +
@@ -0,0 +1,29 @@
+# Copyright 2006-2010 The FLWOR Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
+
+PROJECT (zorba_info_extraction_module)
+
+ENABLE_TESTING ()
+INCLUDE (CTest)
+
+FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
+INCLUDE ("${Zorba_USE_FILE}")
+
+ADD_SUBDIRECTORY("src")
+
+ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
+
+DONE_DECLARING_ZORBA_URIS ()

=== renamed file 'CMakeLists.txt' => 'CMakeLists.txt.moved'
=== added directory 'src'
=== renamed directory 'src' => 'src.moved'
=== added file 'src/CMakeLists.txt'
--- src/CMakeLists.txt	1970-01-01 00:00:00 +
+++ src/CMakeLists.txt	2012-06-23 18:55:25 +
@@ -0,0 +1,17 @@
+# Copyright 2006-2008 The FLWOR Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/info-extraction-module"; FILE "info-extraction-module.xq")
+
+DECLARE_ZORBA_SCHEMA (URI "http://www.zorba-xquery.com/modules/info-extraction-module"; FILE "info-extraction-module.xsd")

=== added file 'src/info-extraction-module.xq'
--- src/info-extraction-module.xq	1970-01-01 00:00:00 +
+++ src/info-extraction-module.xq	2012-06-23 18:55:25 +
@@ -0,0 +1,193 @@
+xquery version "3.0";
+
+(:
+ : Copyright 2006-2009 The FLWOR Foundation.
+ :
+ : Licensed under the Apache License, Version 2.0 (the "License");
+ : you may not use this file except in compliance with the License.
+ : You may obtain a copy of the License at
+ :
+ : http://www.apache.org/licenses/LICENSE-2.0
+ :
+ : Unless required by applicable law or agreed to in writing, software
+ : distributed under the License is distributed on an "AS IS" BASIS,
+ : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ : See the License for the specific language governing permissions and
+ : limitations under the License.
+ :)
+ 
+(:~
+ : This library module provides data extraction functions that return a list  
+ : of entities, relations, categories and concepts present in a given text.
+ :
+ : @author Pedro Antunes
+ : @project information extraction
+ :)
+
+module namespace ex = "http://www.zorba-xquery.com/modules/info-extraction-module";;
+
+declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+
+declare namespace yahoo = "urn:yahoo:cap";
+
+import module namespace http = "http://www.zorba-xquery.com/modules/http-client";;
+
+(:~
+ : Uses Yahoo's Content Analysis webservice to return a list of entities 
+ : encountered in the xml or text supplied as input.
+ :
+ : @param $text XML entity or a string to be analyzed
+ : @return XML document with a list of entities recognized
+ : @example test/Queries/entities.xq
+ :)
+declare %ann:sequential function ex:entities($text as xs:string){
+let $uri := concat("http://query.yahooapis.com/v1/public/yql?q=";, 
+encode-for-uri(concat("select * from contentanalysis.analyze where text=", concat('"', concat($text, '"')
+let $response := http:post($uri,"")[2]
+let $entities := $