Interface TextAnnotation

All Superinterfaces:
XmlElement
All Known Implementing Classes:
TextAnnotationImpl

public interface TextAnnotation extends XmlElement
Base interface for text annotations with relevance and confidence values.
 <complexType name="TextAnnotationType">
   <choice minOccurs="1" maxOccurs="unbounded">
       <element name="FreeTextAnnotation" type="mpeg7:TextualType"/>
       <element name="StructuredAnnotation" type="mpeg7:StructuredAnnotationType"/>
       <element name="DependencyStructure" type="mpeg7:DependencyStructureType"/>
       <element name="KeywordAnnotation" type="mpeg7:KeywordAnnotationType"/>
   </choice>
   <attribute name="relevance" type="mpeg7:zeroToOneType" use="optional"/>
   <attribute name="confidence" type="mpeg7:zeroToOneType" use="optional"/>
   <attribute ref="xml:lang"/>
 </complexType>
 
TODO: How to encode source and version? Maybe use MediaInformation in VideoSegment
  • Method Details

    • getRelevance

      float getRelevance()
      Returns the relevance of this annotation.
      Returns:
      the relevance value
    • getConfidence

      float getConfidence()
      Returns the confidence of the validity of this annotation. The value will be in the range of 0.0 and 1.0. The confidence may vary with the technique that was used to create the annotation. For example, extracting a word using optical character recognition usually has a better confidence value than speech recognition.
      Returns:
      the confidence value
    • getLanguage

      String getLanguage()
      Returns the language of this annotation in ISO represenatation, e. g. en for annotations in English.
      Returns:
      the language
    • addKeywordAnnotation

      void addKeywordAnnotation(KeywordAnnotation keywordAnnotation)
      Adds a new keyword annotation.
      Parameters:
      keywordAnnotation - the annotation
    • addFreeTextAnnotation

      void addFreeTextAnnotation(FreeTextAnnotation freeTextAnnotation)
      Adds a free text annotation.
      Parameters:
      freeTextAnnotation - the annotation
    • keywordAnnotations

      Iterator<KeywordAnnotation> keywordAnnotations()
      Returns an iteration of the keyword annotations.
      Returns:
      the keyword annotations
    • freeTextAnnotations

      Iterator<FreeTextAnnotation> freeTextAnnotations()
      Returns an iteration of the free text annotations.
      Returns:
      the free text annotations