Jacson

de.spieleck.app.cngram
Class NGramProfiles

java.lang.Object
  extended by 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 $

Nested Class Summary
static interface NGramProfiles.Ranker
           
static interface NGramProfiles.RankResult
           
 
Field Summary
static java.text.DecimalFormat DF
           
static char END_CHAR
           
static double LOWSTATSAFETY
           
static java.lang.String NOLANGNAME
           
 
Constructor Summary
NGramProfiles()
           
NGramProfiles(java.io.BufferedReader br)
           
NGramProfiles(int mode)
           
 
Method Summary
static char charAt(java.lang.CharSequence cs, int pos)
           
static void check(NGramProfiles.Ranker r, java.lang.CharSequence seq)
           
 java.util.Set getAllNGrams()
           
 int getProfileCount()
           
 java.lang.String getProfileName(int i)
           
 NGramProfiles.Ranker getRanker()
           
 void info()
           
protected  void init(java.io.BufferedReader br)
           
static boolean isSeparator(char ch)
           
 double modeTrans(double x, int l)
           
 NGramProfiles.RankResult rank(NGramMetric metric, NGramProfile profile)
          Note this class returns a complete match result, for the sake of thread safety!
static java.lang.String reverse(java.lang.CharSequence seq)
           
static char sc(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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()

spieleck.de