Stanbol
  1. Stanbol
  2. STANBOL-500

LDPath Repository wrapper over ContentItem

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0-incubating
    • Component/s: Contenthub, Enhancer
    • Labels:
      None

      Description

      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
          1. 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.

        1. 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}

        /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/

        Issue Links

          Activity

          Hide
          Rupert Westenthaler added a comment -

          Implemented with #1294113

          Show
          Rupert Westenthaler added a comment - Implemented with #1294113
          Hide
          Rupert Westenthaler added a comment -

          This wrapper will be used by SemanticIndex implementations based on LDPath

          Show
          Rupert Westenthaler added a comment - This wrapper will be used by SemanticIndex implementations based on LDPath

            People

            • Assignee:
              Rupert Westenthaler
              Reporter:
              Rupert Westenthaler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development