public class MergeSpellingData
extends java.lang.Object
Usage:
java edu.northwestern.at.morphadorner.tools.mergespellingdata.MergeSpellingData output.tab input.tab input2.tab ...
output.tab -- output merged word spelling data file.
input*.tab -- input tab-delimited files containing spelling maps to be merged.
Each input spelling map is a utf-8 file containing two fields separated by a tab character. The first field is a variant spelling. The second field is the standardized spelling for the variant.
The output file is a utf-8 text file containing the merged spelling maps from the input files. When a given variant appears more than once with different standardized spellings in the input files, the last mapping encountered is the one written to the output file.
Modifier | Constructor and Description |
---|---|
protected |
MergeSpellingData()
Allow overrides but not instantiation.
|
Modifier and Type | Method and Description |
---|---|
static void |
getAlternateSpellings(java.io.Reader reader,
java.util.Map<java.lang.String,java.lang.String> map,
java.util.Set<java.lang.String> set)
Get map of alternative : canonical spelling pairs from a reader.
|
protected static boolean |
isDBNull(java.lang.String s)
Check if a string represents a database null value.
|
static void |
main(java.lang.String[] args)
Main program for merge spelling data.
|
protected static void |
mergeSpellingData(java.lang.String[] args)
Merge the spelling data.
|
protected MergeSpellingData()
public static void main(java.lang.String[] args)
protected static boolean isDBNull(java.lang.String s)
s
- String to check for null value.protected static void mergeSpellingData(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public static void getAlternateSpellings(java.io.Reader reader, java.util.Map<java.lang.String,java.lang.String> map, java.util.Set<java.lang.String> set) throws java.io.IOException
reader
- The reader.java.io.IOException