Package org.apache.tika.language
Class LanguageProfile
- java.lang.Object
-
- org.apache.tika.language.LanguageProfile
-
@Deprecated public class LanguageProfile extends java.lang.Object
Deprecated.Language profile based on ngram counts.- Since:
- Apache Tika 0.5
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_NGRAM_LENGTH
Deprecated.static boolean
useInterleaved
Deprecated.
-
Constructor Summary
Constructors Constructor Description LanguageProfile()
Deprecated.LanguageProfile(int length)
Deprecated.LanguageProfile(java.lang.String content)
Deprecated.LanguageProfile(java.lang.String content, int length)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(java.lang.String ngram)
Deprecated.Adds a single occurrence of the given ngram to this profile.void
add(java.lang.String ngram, long count)
Deprecated.Adds multiple occurrences of the given ngram to this profile.double
distance(LanguageProfile that)
Deprecated.Calculates the geometric distance between this and the given other language profile.long
getCount()
Deprecated.long
getCount(java.lang.String ngram)
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Field Detail
-
DEFAULT_NGRAM_LENGTH
public static final int DEFAULT_NGRAM_LENGTH
Deprecated.- See Also:
- Constant Field Values
-
useInterleaved
public static boolean useInterleaved
Deprecated.
-
-
Constructor Detail
-
LanguageProfile
public LanguageProfile(int length)
Deprecated.
-
LanguageProfile
public LanguageProfile()
Deprecated.
-
LanguageProfile
public LanguageProfile(java.lang.String content, int length)
Deprecated.
-
LanguageProfile
public LanguageProfile(java.lang.String content)
Deprecated.
-
-
Method Detail
-
getCount
public long getCount()
Deprecated.
-
getCount
public long getCount(java.lang.String ngram)
Deprecated.
-
add
public void add(java.lang.String ngram)
Deprecated.Adds a single occurrence of the given ngram to this profile.- Parameters:
ngram
- the ngram
-
add
public void add(java.lang.String ngram, long count)
Deprecated.Adds multiple occurrences of the given ngram to this profile.- Parameters:
ngram
- the ngramcount
- number of occurrences to add
-
distance
public double distance(LanguageProfile that)
Deprecated.Calculates the geometric distance between this and the given other language profile.- Parameters:
that
- the other language profile- Returns:
- distance between the profiles
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-