jvnsegmenter
Class LexiconContextGenerator

java.lang.Object
  extended by jvntextpro.data.ContextGenerator
      extended by jvnsegmenter.BasicContextGenerator
          extended by jvnsegmenter.LexiconContextGenerator

public class LexiconContextGenerator
extends BasicContextGenerator

The Class LexiconContextGenerator.


Constructor Summary
LexiconContextGenerator(org.w3c.dom.Element node)
          Instantiates a new lexicon context generator.
 
Method Summary
 java.lang.String[] getContext(Sentence sent, int pos)
          Gets the context.
static boolean inVietnameseDict(java.lang.String word)
          In vietnamese dict.
static boolean inViFamilyNameList(java.lang.String word)
          In vi family name list.
static boolean inViLastNameList(java.lang.String word)
          In vi last name list.
static boolean inViLocations(java.lang.String word)
          In vi locations.
static boolean inViMiddleNameList(java.lang.String word)
          In vi middle name list.
static void loadVietnameseDict(java.lang.String filename)
          Load vietnamese dict.
static void loadViLocationList(java.lang.String filename)
          Load vi location list.
static void loadViPersonalNames(java.lang.String filename)
          Load vi personal names.
 
Methods inherited from class jvnsegmenter.BasicContextGenerator
readFeatureNodes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexiconContextGenerator

public LexiconContextGenerator(org.w3c.dom.Element node)
Instantiates a new lexicon context generator.

Parameters:
node - the node
Method Detail

getContext

public java.lang.String[] getContext(Sentence sent,
                                     int pos)
Description copied from class: ContextGenerator
Gets the context.

Specified by:
getContext in class ContextGenerator
Parameters:
sent - the sent
pos - the pos
Returns:
the context

inVietnameseDict

public static boolean inVietnameseDict(java.lang.String word)
In vietnamese dict.

Parameters:
word - the word
Returns:
true, if successful

inViFamilyNameList

public static boolean inViFamilyNameList(java.lang.String word)
In vi family name list.

Parameters:
word - the word
Returns:
true, if successful

inViMiddleNameList

public static boolean inViMiddleNameList(java.lang.String word)
In vi middle name list.

Parameters:
word - the word
Returns:
true, if successful

inViLastNameList

public static boolean inViLastNameList(java.lang.String word)
In vi last name list.

Parameters:
word - the word
Returns:
true, if successful

inViLocations

public static boolean inViLocations(java.lang.String word)
In vi locations.

Parameters:
word - the word
Returns:
true, if successful

loadVietnameseDict

public static void loadVietnameseDict(java.lang.String filename)
Load vietnamese dict.

Parameters:
filename - the filename

loadViPersonalNames

public static void loadViPersonalNames(java.lang.String filename)
Load vi personal names.

Parameters:
filename - the filename

loadViLocationList

public static void loadViLocationList(java.lang.String filename)
Load vi location list.

Parameters:
filename - the filename