Jacson

de.spieleck.app.ngramj.phoner
Class Phoner

java.lang.Object
  extended by de.spieleck.app.ngramj.phoner.Phoner
All Implemented Interfaces:
java.util.Comparator

public class Phoner
extends java.lang.Object
implements java.util.Comparator

Mini-Application to create a "useful" word from a phonenumber.

This uses a brute force approach to evaluate various options to convert a number in a dialable string. To make bf feasible, one had to be slightly careful...


Field Summary
protected  int count
           
static java.lang.String DEF_RESOURCE
           
static int LIMIT
           
protected  double max
           
protected  double min
           
protected  PriorityQueue order
           
protected  java.lang.String pnumber
           
static java.util.Comparator wrongComp
           
 
Constructor Summary
Phoner(IterableProfile prof, java.lang.String pnumber)
           
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
           
 double deltaRank(IterableProfile prof1, Profile prof2)
           
 double getMax()
           
 double getMin()
           
static void main(java.lang.String[] args)
          Sample commandline implementation
 void show()
           
 void show(java.io.PrintWriter pw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

LIMIT

public static final int LIMIT
See Also:
Constant Field Values

DEF_RESOURCE

public static final java.lang.String DEF_RESOURCE
See Also:
Constant Field Values

pnumber

protected java.lang.String pnumber

order

protected PriorityQueue order

min

protected double min

max

protected double max

count

protected int count

wrongComp

public static java.util.Comparator wrongComp
Constructor Detail

Phoner

public Phoner(IterableProfile prof,
              java.lang.String pnumber)
       throws java.io.IOException,
              NGramException
Throws:
java.io.IOException
NGramException
Method Detail

show

public void show()

show

public void show(java.io.PrintWriter pw)

deltaRank

public double deltaRank(IterableProfile prof1,
                        Profile prof2)

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
Specified by:
compare in interface java.util.Comparator

getMin

public double getMin()

getMax

public double getMax()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Sample commandline implementation

Throws:
java.lang.Exception

spieleck.de