http://zorba.io/modules/info-extraction

View as XML or JSON.

This library module provides data extraction functions that return a list of entities, relations, categories and concepts present in a given text.

Function Summary

categories ($text) as element(ex:category)*

Uses Yahoo's Content Analysis webservice to return a list of categories (topics) related to the text supplied as input.

concepts-inline ($text) as item()*

Uses Yahoo's Content Analysis webservice to return the text supplied as input together with concepts (entities with corresponding wikipedia link) annotated as xml elements in the text.

concepts ($text) as element(ex:concept)*

Uses Yahoo's Content Analysis webservice to return a list of concepts (entity found and the corresponding wikipedia link) encountered in the text supplied as input.

entities-inline ($text) as item()*

Uses Yahoo's Content Analysis webservice to return the text supplied as input together with entities recognized annotated as xml elements in the text.

entities ($text as xs:string) as element(ex:entity)*

Uses Yahoo's Content Analysis webservice to return a list of entities encountered in the text supplied as input.

relations ($text) as element(ex:relation)*

Uses Yahoo's Content Analysis webservice to return a list of relations (entities found and related wikipedia links) encountered in the text supplied as input.

Functions

categories#1

declare  %ann:sequential function ex:categories($text) as element(ex:category)*

Uses Yahoo's Content Analysis webservice to return a list of categories (topics) related to the text supplied as input.

See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.

Parameters

text as
String to be analyzed

Returns

element(ex:category)*
Sequence of recognized categories

concepts-inline#1

declare  %ann:sequential function ex:concepts-inline($text) as item()*

Uses Yahoo's Content Analysis webservice to return the text supplied as input together with concepts (entities with corresponding wikipedia link) annotated as xml elements in the text.

Parameters

text as
String to be analyzed

Returns

item()*
Mixed sequence of strings and <ex:concept> elements

concepts#1

declare  %ann:sequential function ex:concepts($text) as element(ex:concept)*

Uses Yahoo's Content Analysis webservice to return a list of concepts (entity found and the corresponding wikipedia link) encountered in the text supplied as input.

See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.

Parameters

text as
String to be analyzed

Returns

element(ex:concept)*
Sequence of recognized concepts

entities-inline#1

declare  %ann:sequential function ex:entities-inline($text) as item()*

Uses Yahoo's Content Analysis webservice to return the text supplied as input together with entities recognized annotated as xml elements in the text.

Parameters

text as
String to be analyzed

Returns

item()*
Mixed sequence of strings and <ex:entity> elements

entities#1

declare  %ann:sequential function ex:entities($text as xs:string) as element(ex:entity)*

Uses Yahoo's Content Analysis webservice to return a list of entities encountered in the text supplied as input.

See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.

Parameters

text as xs:string
String to be analyzed

Returns

element(ex:entity)*
Sequence of recognized entities

relations#1

declare  %ann:sequential function ex:relations($text) as element(ex:relation)*

Uses Yahoo's Content Analysis webservice to return a list of relations (entities found and related wikipedia links) encountered in the text supplied as input.

See http://developer.yahoo.com/search/content/V2/contentAnalysis.html for more information.

Parameters

text as
String to be analyzed

Returns

element(ex:relation)*
Sequence of recognized relations