ValidateContentFromTextFile
- Descriptions:
Validate the contents of lexical records from a text file. It validates contents in a single lexical record (no cross-reference check among lexical records):
- Check Reg (glreg & regd):
- Check inflection rules on glreg for nouns
- Check inflection rules on regd for verbs and adjs
- Check/fix duplicated terms:
- Check duplicated base & spelling variants
- Check duplicated acronyms
- Check duplicated abbreviations
- Check duplicated nominalizations in noun, verb, adj
- Check duplicated variant (irreg) in noun, verb, adj, adv, etc.
- Usage:
shell>ValidateContentFromTextFile <inFile> <outFile> <prepositions.data> <particles.data> <irregExpFile> <-v>
- inFile: lexical record in text format
- outFile: auto-fixed lexical record in text format
- prepositionFile: the preposition file
default: use the prepositions.data included in the lexCheck${YEAR}api.jar or lexCheck${YEAR}dist.jar
=> prepositions are used in the class of Compl.CheckPreposition.java
- particleFile: the particle file
default: use the particles.data included in the lexCheck${YEAR}api.jar or lexCheck${YEAR}dist.jar
=> particles are used in the class of Compl.CheckParticle.java
- irregExpFile: the irregExceptions.data file, if the specified file does not exist, use the default irregExceptions.data in lexCheck${YEAR}api.jar or lexCheck${YEAR}dist.jar
- -v: set verbose to true, default: fault
- Outputs:
- On screen message:
- Confirmed message if records are valid.
- Otherwise, error message
- outFile: Auto-fixed Lexicon (remove duplicates)
- Notes:
- Must include:
- lexCheck${YEAR}dist.jar (for LVG APIs)
or
- lexCheck${YEAR}api.jar and lvg${YEAR}api.jar
- Benchmark run time for Lexicon to generate both Lexicon and inflVars: 10 ~ 15 sec.
- Examples:
shell> ValidateContentFromTextFile lexicon.txt lexicon.fixed ./data/Files/prepositions.data ./data/Files/particles.data ./data/Files/irregExceptions.data -v
shell> ValidateContentFromTextFile lexicon.txt lexicon.fixed ./data/Files/prepositions.data ./data/Files/particles.data ./data/Files/irregExceptions.data