[ 
https://issues.apache.org/jira/browse/STANBOL-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rupert Westenthaler resolved STANBOL-500.
-----------------------------------------

    Resolution: Fixed

Implemented with #1294113
                
> LDPath Repository wrapper over ContentItem
> ------------------------------------------
>
>                 Key: STANBOL-500
>                 URL: https://issues.apache.org/jira/browse/STANBOL-500
>             Project: Stanbol
>          Issue Type: New Feature
>          Components: Content Hub, Enhancer
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> This will allow to access the contents of a ContentItem by LDPath [1] and 
> support
> * Access to the metadata
> * Access to the Content stored in Blobs via the fn:content(String mediaType)
> * Optional access to additional metadata stored in ContentParts with a type 
> compatible to Clerezza TripleCollection
> * support for "shortcuts" to easily access "semantic concpets" defined by the 
> enhancement structure including
> ### Used Namespaces:
>     @prefix fise : <http://fise.iks-project.eu/ontology/> ;
>     @prefix ci : 
> <http://stanbol.apache.org/ontology/enhancer/content-item-ldpath-wrapper#> ;
> The "fise" namepsace represents the currently used Enhnacement Structure. The 
> namespace "ci" does not correspond to any real ontology. It is only used 
> internally by this LDPath wrapper for supported "shortcuts" as described 
> below.
> ## Supported Functions and Shortcuts
> * Content support
>     content = fn:content({content-resource},{media-type},{media-type2},.., 
> {media-typeN})
> This returns the value of the first Blob matching any of the parsed media 
> types. The value of {content-resource} must be the URI of the ContentItem OR 
> the URI of a ContentPart compatible to the Blob interface.
> * extreacted TextAnnotations
>     ci:textAnnotation = ^fise:extractedFrom[rdf:type is fise:TextAnnotation]
> * EntityAnnotations
>     ci:entityAnnotation = ^fise:extractedFrom[rdf:type is 
> fise:EntityAnnotation]
> * EntitySuggestions for TextAnnotations
>     {text-annotation}/ci:suggestion = {text-annotation}/^dc:relation[rdf:type 
> is fise:EntityAnnotation]/fn:sort(fise:confidence,"DESC")
> * Suggested Entities for a given {text-annotation}
>    {text-annotation}/ci:suggestedEntity = 
> {{text-annotation}/^dc:relation[rdf:type is 
> fise:EntityAnnotation]}/fise:entity-reference
> * All extracted Entities
>     ci:extractedEntities = ^fise:extractedFrom[rdf:type is 
> fise:EntityAnnotation]/fise:entity-reference
> or if defined via the above 'ci:entityAnnotation' shorcut
>     
>     ci:extractedEntities = ci:entityAnnotation/fise:entity-reference
> Example of an envisioned LDPath program used to extract knowledge of a 
> ContentItem as  of LDPath Statements
>     text = fn:content(.,"text/plain");
>     personName = (ci:textAnnoation[dc:type is 
> dbpedia:Person]/fise:selectedText) | 
>                               (ci:textAnnoation[dc:type is 
> dbpedia:Person]/ci:sugestion/fise:entity-label) :: xsd:string
>     orgName = (ci:textAnnoation[dc:type is 
> dbpedia:Organisation]/fise:selectedText) | 
>                         (ci:textAnnoation[dc:type is 
> dbpedia:Organisation]/ci:sugestion/fise:entity-label) :: xsd:string
>     placeName = (ci:textAnnoation[dc:type is 
> dbpedia:Place]/fise:selectedText) | 
>                            (ci:textAnnoation[dc:type is 
> dbpedia:Place]/ci:sugestion/fise:entity-label) :: xsd:string
>     personRef = ci:entityAnntotation[fise:entity-type] is 
> dbpedia:Person]/fise:entity-reference :: xsd:anyURI
>     orgRef = ci:entityAnntotation[fise:entity-type] is 
> dbpedia:Organisation]/fise:entity-reference :: xsd:anyURI
>     placeRef = ci:entityAnntotation[fise:entity-type] is 
> dbpedia:Place]/fise:entity-reference :: xsd:anyURI
>     conceptRef = ci:entityAnntotation[fise:entity-type] is 
> skos:Concpet]/fise:entity-reference :: xsd:anyURI
> NOTES:
>  * The "shortcuts" as defined above could be also implemented as function 
> such as 
>      fn:textAnnotation({content-item},[{dc-type}, {dc-type2},...{dc-typeN}])
>      fn:suggestion({text-annotation},[{entity-type}, 
> {entity-type2},...{entity-typeN}])
> this would allow usages such as
>     personName = (fn:textAnnoation(.,dbpedia:Person)/fise:selectedText) | 
>                              
> (fn:textAnnoation[.,dbpedia:Person)/fn:suggestion(.)/fise:entity-label) :: 
> xsd:string
> [1] http://code.google.com/p/ldpath/ 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to