public class NormApi
extends java.lang.Object
History:
Constructor and Description |
---|
NormApi()
Creates a NormApi object and initiate related data (default).
|
NormApi(java.sql.Connection conn,
RamTrie ramTrieI)
Creates a NormApi object and initiate related data using specified
database connection and persistent trie.
|
NormApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a NormApi object and initiate related data with properties
needs to be overwritten
|
NormApi(java.lang.String configFile)
Creates a NormApi object and initiate related data using a specified
configuration file.
|
NormApi(java.lang.String configFile,
java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a NormApi object and initiate related data using a specified
configuration file with properties to be wverwritten.
|
Modifier and Type | Method and Description |
---|---|
void |
CleanUp()
Close Lvg database connection and persistent tries.
|
Configuration |
GetConfiguration()
A method to get the configuration object
|
java.sql.Connection |
GetConnection()
A method to get the established database connection
|
RamTrie |
GetTrie()
A method to get the persistent trie for inflectional morphology
|
java.util.Vector<LexItem> |
Mutate(LexItem in)
A method to get the normalized strings of an input LexItem
|
java.util.Vector<java.lang.String> |
Mutate(java.lang.String inTerm)
A method to get the normalized strings of an input string
|
java.util.Vector<LexItem> |
Mutate(java.lang.String inTerm,
boolean showDetails)
A method to get the normalized strings of an input string along with
details information of norm operations
|
public NormApi()
CleanUp( ) method must be called to close Db connection after using this object
public NormApi(java.lang.String configFile)
CleanUp( ) method must be called to close Db connection after using this object
configFile
- the absolute path of the configuration filepublic NormApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
CleanUp( ) method must be called to close Db connection after using this object
properties
- properties to be overwritten in configpublic NormApi(java.lang.String configFile, java.util.Hashtable<java.lang.String,java.lang.String> properties)
CleanUp( ) method must be called to close Db connection after using this object
configFile
- the absolute path of the configuration fileproperties
- properties to be overwritten in configpublic NormApi(java.sql.Connection conn, RamTrie ramTrieI)
CleanUp( ) method must be called to close Db connection after using this object
conn
- database connectionramTrieI
- persistent trie for inflectional morphologypublic java.util.Vector<LexItem> Mutate(LexItem in) throws java.lang.Exception
in
- an input LexItem to be mutatedjava.lang.Exception
- if exception caughtpublic java.util.Vector<java.lang.String> Mutate(java.lang.String inTerm) throws java.lang.Exception
inTerm
- an input term in a string format to be mutatedjava.lang.Exception
- if exception caughtpublic java.util.Vector<LexItem> Mutate(java.lang.String inTerm, boolean showDetails) throws java.lang.Exception
inTerm
- an input term in a string format to be mutatedshowDetails
- a boolean flag of showing detailsjava.lang.Exception
- if exception caughtpublic void CleanUp()
public Configuration GetConfiguration()
public java.sql.Connection GetConnection()
public RamTrie GetTrie()