|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectConversionDictionary
public class ConversionDictionary
This class represents the dictionary generated by DicExtractor and handed on to Replacer for conversion
Constructor Summary | |
---|---|
ConversionDictionary()
create a new conversion dictionary to store masking information sorted by POS classes |
Method Summary | |
---|---|
void |
addEntry(java.lang.String pos,
java.lang.String orth,
java.lang.String conv)
add a new entry (= the information from one leaf) |
java.lang.String |
getConv(java.lang.String pos,
java.lang.String orth)
retrieve the replace token for an original token |
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> |
getMap()
used by the morphology analyzer to get more direct access to the dictionary |
static ConversionDictionary |
read(java.io.File keyFile)
read a dictionary from a file as generated by writeToFile() |
static ConversionDictionary |
readReverse(java.io.File keyFile)
read a dictionary in reverse from a file as generated by writeToFile() dictionary is then in the correct format to be used for demasking |
void |
writeToFile(java.io.File outputFile)
simply print out list sorted according to POS tags: POS original replacement |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConversionDictionary()
Method Detail |
---|
public void addEntry(java.lang.String pos, java.lang.String orth, java.lang.String conv)
pos
- - the new entry's POS classpos
- - the new entry's original versionconv
- - the new entry's masked versionpublic java.lang.String getConv(java.lang.String pos, java.lang.String orth)
pos
- - the token's POS classorth
- - the token
public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> getMap()
public void writeToFile(java.io.File outputFile) throws java.io.IOException, java.lang.NullPointerException
-
- the file to write the dictionary to
java.io.IOException
java.lang.NullPointerException
public static ConversionDictionary read(java.io.File keyFile)
-
- the file to write the dictionary topublic static ConversionDictionary readReverse(java.io.File keyFile)
-
- the file to write the dictionary to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |