public class TrieSymbolTable extends java.lang.Object implements SymbolTable
BOOLEAN, categories, INPUT, INTEGER, NA, OUTPUT, REAL, STRING, types
Constructor and Description |
---|
TrieSymbolTable(java.lang.String _name,
Trie trie) |
TrieSymbolTable(java.lang.String _name,
Trie _trie,
int _category,
java.lang.String nullValueStrategy) |
Modifier and Type | Method and Description |
---|---|
int |
addSymbol(java.lang.String symbol) |
void |
clearTmpStorage() |
boolean |
equals(java.lang.Object obj) |
int |
getCategory() |
java.util.Set<java.lang.Integer> |
getCodes() |
java.util.SortedMap<java.lang.Integer,TrieNode> |
getCodeTable() |
java.lang.String |
getName() |
int |
getNullValueCode(NullValues.NullValueId nullValueIdentifier) |
java.lang.String |
getNullValueStrategy() |
java.lang.String |
getNullValueSymbol(NullValues.NullValueId nullValueIdentifier) |
java.lang.String |
getSymbolCodeToString(int code) |
int |
getSymbolStringToCode(java.lang.String symbol) |
double |
getSymbolStringToValue(java.lang.String symbol) |
protected Trie |
getTrie() |
int |
getValueCounter() |
int |
hashCode() |
protected int |
increaseValueCounter() |
boolean |
isNullValue(int code) |
boolean |
isNullValue(java.lang.String symbol) |
void |
load(java.io.BufferedReader in) |
void |
save(java.io.BufferedWriter out) |
void |
saveHeader(java.io.BufferedWriter out) |
int |
size() |
java.lang.String |
toString() |
protected void |
updateValueCounter(int code) |
public TrieSymbolTable(java.lang.String _name, Trie _trie, int _category, java.lang.String nullValueStrategy) throws MaltChainedException
MaltChainedException
public TrieSymbolTable(java.lang.String _name, Trie trie)
public int addSymbol(java.lang.String symbol) throws MaltChainedException
addSymbol
in interface Table
MaltChainedException
public java.lang.String getSymbolCodeToString(int code) throws MaltChainedException
getSymbolCodeToString
in interface Table
MaltChainedException
public int getSymbolStringToCode(java.lang.String symbol) throws MaltChainedException
getSymbolStringToCode
in interface Table
MaltChainedException
public double getSymbolStringToValue(java.lang.String symbol) throws MaltChainedException
getSymbolStringToValue
in interface Table
MaltChainedException
public void clearTmpStorage()
public java.lang.String getNullValueStrategy()
public int getCategory()
public void saveHeader(java.io.BufferedWriter out) throws MaltChainedException
MaltChainedException
public void save(java.io.BufferedWriter out) throws MaltChainedException
save
in interface SymbolTable
MaltChainedException
public void load(java.io.BufferedReader in) throws MaltChainedException
load
in interface SymbolTable
MaltChainedException
public int getValueCounter()
getValueCounter
in interface SymbolTable
protected void updateValueCounter(int code)
protected int increaseValueCounter()
public int getNullValueCode(NullValues.NullValueId nullValueIdentifier) throws MaltChainedException
getNullValueCode
in interface SymbolTable
MaltChainedException
public java.lang.String getNullValueSymbol(NullValues.NullValueId nullValueIdentifier) throws MaltChainedException
getNullValueSymbol
in interface SymbolTable
MaltChainedException
public boolean isNullValue(java.lang.String symbol) throws MaltChainedException
isNullValue
in interface SymbolTable
MaltChainedException
public boolean isNullValue(int code) throws MaltChainedException
isNullValue
in interface SymbolTable
MaltChainedException
public java.util.SortedMap<java.lang.Integer,TrieNode> getCodeTable()
public java.util.Set<java.lang.Integer> getCodes()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.