jmaxent
Class Dictionary

java.lang.Object
  extended by jmaxent.Dictionary

public class Dictionary
extends java.lang.Object

The Class Dictionary.


Field Summary
 Data data
          The data.
 java.util.Map dict
          The dict.
 Option option
          The option.
 
Constructor Summary
Dictionary()
          Instantiates a new dictionary.
Dictionary(Option option, Data data)
          Instantiates a new dictionary.
 
Method Summary
 void addDict(int cp, int label, int count)
          Adds the dict.
 void generateDict()
          Generate dict.
 void readDict(java.io.BufferedReader fin)
          Read dict.
 int size()
          Size.
 void writeDict(java.io.PrintWriter fout)
          Write dict.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dict

public java.util.Map dict
The dict.


option

public Option option
The option.


data

public Data data
The data.

Constructor Detail

Dictionary

public Dictionary()
Instantiates a new dictionary.


Dictionary

public Dictionary(Option option,
                  Data data)
Instantiates a new dictionary.

Parameters:
option - the option
data - the data
Method Detail

readDict

public void readDict(java.io.BufferedReader fin)
              throws java.io.IOException
Read dict.

Parameters:
fin - the fin
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

writeDict

public void writeDict(java.io.PrintWriter fout)
               throws java.io.IOException
Write dict.

Parameters:
fout - the fout
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

addDict

public void addDict(int cp,
                    int label,
                    int count)
Adds the dict.

Parameters:
cp - the cp
label - the label
count - the count

generateDict

public void generateDict()
Generate dict.


size

public int size()
Size.

Returns:
the int