Class LanguageDetection.DetectionResult

java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.LanguageDetection.DetectionResult
All Implemented Interfaces:
Serializable
Enclosing class:
LanguageDetection

public static class LanguageDetection.DetectionResult extends BaseAttribute
A single result from language detection. Typically, the language identifier produces multiple results with different confidence values.
See Also:
  • Constructor Details

    • DetectionResult

      protected DetectionResult(com.basistech.util.LanguageCode language, String encoding, com.basistech.util.ISO15924 script, Double confidence, Map<String,Object> extendedProperties)
  • Method Details

    • getLanguage

      public com.basistech.util.LanguageCode getLanguage()
      Returns the detected language.
      Returns:
      the detected language
    • getEncoding

      public String getEncoding()
      Returns the detected encoding.
      Returns:
      the detected encoding, or null if none was detected
    • getScript

      public com.basistech.util.ISO15924 getScript()
      Returns the script.
      Returns:
      the script, or null of none was detected
    • getConfidence

      public Double getConfidence()
      Returns the confidence of this detection.
      Returns:
      the confidence of this detection alternative, or null if not available.
    • toStringHelper

      protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
      Overrides:
      toStringHelper in class BaseAttribute