org.maltparser.core.symbol.trie
Class TrieSymbolTable
java.lang.Object
   org.maltparser.core.symbol.trie.TrieSymbolTable
org.maltparser.core.symbol.trie.TrieSymbolTable
- All Implemented Interfaces: 
- SymbolTable, Table
- public class TrieSymbolTable 
- extends Object- implements SymbolTable
- Since:
- 1.0
- Author:
- Johan Hall
 
 
 
TrieSymbolTable
public TrieSymbolTable(String name,
                       Trie trie,
                       int columnCategory,
                       String nullValueStrategy)
                throws MaltChainedException
- Throws:
- MaltChainedException
TrieSymbolTable
public TrieSymbolTable(String name,
                       Trie trie,
                       int columnCategory,
                       String nullValueStrategy,
                       String rootLabel)
                throws MaltChainedException
- Throws:
- MaltChainedException
TrieSymbolTable
public TrieSymbolTable(String name,
                       Trie trie)
addSymbol
public int addSymbol(String symbol)
              throws MaltChainedException
- 
- Specified by:
- addSymbolin interface- Table
 
- 
- Throws:
- MaltChainedException
 
addSymbol
public int addSymbol(StringBuilder symbol)
              throws MaltChainedException
- 
- Specified by:
- addSymbolin interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
getSymbolCodeToString
public String getSymbolCodeToString(int code)
                             throws MaltChainedException
- 
- Specified by:
- getSymbolCodeToStringin interface- Table
 
- 
- Throws:
- MaltChainedException
 
getSymbolStringToCode
public int getSymbolStringToCode(String symbol)
                          throws MaltChainedException
- 
- Specified by:
- getSymbolStringToCodein interface- Table
 
- 
- Throws:
- MaltChainedException
 
getNullValueStrategy
public String getNullValueStrategy()
- 
 
- 
 
getColumnCategory
public int getColumnCategory()
- 
 
- 
 
getKnown
public boolean getKnown(int code)
- 
- Specified by:
- getKnownin interface- SymbolTable
 
- 
 
getKnown
public boolean getKnown(String symbol)
- 
- Specified by:
- getKnownin interface- SymbolTable
 
- 
 
makeKnown
public void makeKnown(int code)
- 
- Specified by:
- makeKnownin interface- SymbolTable
 
- 
 
printSymbolTable
public void printSymbolTable(org.apache.log4j.Logger logger)
                      throws MaltChainedException
- 
- Specified by:
- printSymbolTablein interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
saveHeader
public void saveHeader(BufferedWriter out)
                throws MaltChainedException
- 
 
- 
- Throws:
- MaltChainedException
 
size
public int size()
- 
- Specified by:
- sizein interface- Table
 
- 
 
save
public void save(BufferedWriter out)
          throws MaltChainedException
- 
- Specified by:
- savein interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
load
public void load(BufferedReader in)
          throws MaltChainedException
- 
- Specified by:
- loadin interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
getName
public String getName()
- 
- Specified by:
- getNamein interface- Table
 
- 
 
getValueCounter
public int getValueCounter()
- 
- Specified by:
- getValueCounterin interface- SymbolTable
 
- 
 
updateValueCounter
protected void updateValueCounter(int code)
- 
 
- 
 
increaseValueCounter
protected int increaseValueCounter()
- 
 
- 
 
getNullValueCode
public int getNullValueCode(NullValues.NullValueId nullValueIdentifier)
                     throws MaltChainedException
- 
- Specified by:
- getNullValueCodein interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
getNullValueSymbol
public String getNullValueSymbol(NullValues.NullValueId nullValueIdentifier)
                          throws MaltChainedException
- 
- Specified by:
- getNullValueSymbolin interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
isNullValue
public boolean isNullValue(String symbol)
                    throws MaltChainedException
- 
- Specified by:
- isNullValuein interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
isNullValue
public boolean isNullValue(int code)
                    throws MaltChainedException
- 
- Specified by:
- isNullValuein interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
copy
public void copy(SymbolTable fromTable)
          throws MaltChainedException
- 
- Specified by:
- copyin interface- SymbolTable
 
- 
- Throws:
- MaltChainedException
 
getCodeTable
public SortedMap<Integer,TrieNode> getCodeTable()
- 
 
- 
 
getCodes
public Set<Integer> getCodes()
- 
- Specified by:
- getCodesin interface- SymbolTable
 
- 
 
getTrie
protected Trie getTrie()
- 
 
- 
 
equals
public boolean equals(Object obj)
- 
- Overrides:
- equalsin class- Object
 
- 
 
hashCode
public int hashCode()
- 
- Overrides:
- hashCodein class- Object
 
- 
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.