org.jbox.textCutter.util
Class Dict

java.lang.Object
  extended by org.jbox.textCutter.util.Dict

public class Dict
extends java.lang.Object

A class representing a dictionary file.

Dict is used in NoiseFilter and SimpleCJKCutter.

Version:
1.0
Author:
YiBin.H
See Also:
NoiseFilter, SimpleCJKCutter

Constructor Summary
Dict(java.lang.String path)
          Constructs a new Dict by the specified path.
 
Method Summary
 boolean isExist(java.lang.String word)
          Checked if there is a string in the dictionary as same as the specified word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dict

public Dict(java.lang.String path)
Constructs a new Dict by the specified path.

Parameters:
path - the path of dictionary file or directory.
Throws:
DictInitException - if failt to load dict file.
Method Detail

isExist

public boolean isExist(java.lang.String word)
Checked if there is a string in the dictionary as same as the specified word.

Parameters:
word - a string to check.
Returns:
true if exist a string in the dictionary as same as the specified word, or false otherwise.