de.spieleck.app.cngram
Class NGramProfiles
java.lang.Object
de.spieleck.app.cngram.NGramProfiles
public class NGramProfiles
- extends java.lang.Object
Manage a set of profiles and determine "most similar" ones
to a given profile. Allows access to the complete results of
previous last ranking. Note this uses a competetive ranking
approach, which is memory efficient, time efficient for not
too many languages and provides contextual scoring of ngrams.
- Version:
- $Revision: 2 $ $Date: 2006-03-27 23:00:21 +0200 (Mo, 27 Mrz 2006) $ $Author: nestefan $
- Author:
- frank nestel, $Author: nestefan $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOLANGNAME
public static final java.lang.String NOLANGNAME
- See Also:
- Constant Field Values
END_CHAR
public static final char END_CHAR
- See Also:
- Constant Field Values
DF
public static final java.text.DecimalFormat DF
LOWSTATSAFETY
public static final double LOWSTATSAFETY
- See Also:
- Constant Field Values
NGramProfiles
public NGramProfiles()
throws java.io.IOException
- Throws:
java.io.IOException
NGramProfiles
public NGramProfiles(int mode)
throws java.io.IOException
- Throws:
java.io.IOException
NGramProfiles
public NGramProfiles(java.io.BufferedReader br)
throws java.io.IOException
- Throws:
java.io.IOException
init
protected void init(java.io.BufferedReader br)
throws java.io.IOException
- Throws:
java.io.IOException
info
public void info()
check
public static void check(NGramProfiles.Ranker r,
java.lang.CharSequence seq)
getRanker
public NGramProfiles.Ranker getRanker()
modeTrans
public double modeTrans(double x,
int l)
getProfileName
public java.lang.String getProfileName(int i)
isSeparator
public static boolean isSeparator(char ch)
reverse
public static java.lang.String reverse(java.lang.CharSequence seq)
charAt
public static final char charAt(java.lang.CharSequence cs,
int pos)
sc
public static char sc(char c)
rank
public NGramProfiles.RankResult rank(NGramMetric metric,
NGramProfile profile)
- Note this class returns a complete match result, for the
sake of thread safety!
getProfileCount
public int getProfileCount()
getAllNGrams
public java.util.Set getAllNGrams()