Class LangID

java.lang.Object
org.opensextant.extractors.langid.LangID
All Implemented Interfaces:
Comparable<LangID>

public class LangID extends Object implements Comparable<LangID>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    boolean
     
    double
     
    int
    On a scale of 0 to 100, where 100 = 100% confident, how would you score this language identity? It is easier to compare scores 55 == 55, vs.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LangID(String l, double prob, boolean isFirstChoice)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    If THIS langID score is less than argument, return -1 If THIS langID score is greater than argument, return 1
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • langid

      public String langid
    • probability

      public double probability
    • score

      public int score
      On a scale of 0 to 100, where 100 = 100% confident, how would you score this language identity? It is easier to compare scores 55 == 55, vs. 0.550 to 0.550.... in the decimal space. Errors out 3 significant figures is not useful for comparison.
    • primary

      public boolean primary
  • Constructor Details

    • LangID

      public LangID(String l, double prob, boolean isFirstChoice)
  • Method Details

    • compareTo

      public int compareTo(LangID o)
      If THIS langID score is less than argument, return -1 If THIS langID score is greater than argument, return 1
      Specified by:
      compareTo in interface Comparable<LangID>
      Parameters:
      o -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object