com.sun.labs.minion.lexmorph
Class Lexicon

java.lang.Object
  extended by com.sun.labs.minion.lexmorph.Lexicon

public class Lexicon
extends java.lang.Object

The Lexicon class definition follows:


Field Summary
protected  Word abbreviationWord
           
protected  Category adjAdvAnyNVCategory
           
protected  Category adjCategory
           
protected  Category advCategory
           
protected  com.sun.labs.minion.lexmorph.Atom agrAtom
           
protected  Category alphanumCategory
           
protected  Category anynCategory
           
protected  Category anyncCategory
           
static boolean authorFlag
          For debugging.
 java.io.RandomAccessFile binLexRAF
           
protected  com.sun.labs.minion.lexmorph.Atom comparativeAtom
           
protected  Category compoundableCats
           
protected  com.sun.labs.minion.lexmorph.Atom compoundOfAtom
           
static boolean debug
           
protected  com.sun.labs.minion.lexmorph.Atom derivationAtom
           
protected  com.sun.labs.minion.lexmorph.Atom entailedbyAtom
           
protected  com.sun.labs.minion.lexmorph.Atom entailsAtom
           
protected  com.sun.labs.minion.lexmorph.Atom falseRootAtom
           
protected  com.sun.labs.minion.lexmorph.Atom formAtom
           
protected  com.sun.labs.minion.lexmorph.Atom formsAtom
           
protected  com.sun.labs.minion.lexmorph.Atom guessedAtom
           
protected  com.sun.labs.minion.lexmorph.Atom hasDashPrefixAtom
           
protected  com.sun.labs.minion.lexmorph.Atom hasDashSuffixAtom
           
protected  com.sun.labs.minion.lexmorph.Atom icAtom
           
protected  com.sun.labs.minion.lexmorph.Atom icodesAtom
           
protected  com.sun.labs.minion.lexmorph.Atom iioAtom
           
protected  com.sun.labs.minion.lexmorph.Atom ikoAtom
           
protected  int IndexWordLimit
           
protected  Word integerWord
           
protected  com.sun.labs.minion.lexmorph.Atom lcAtom
           
 java.lang.String letterOrder
           
protected static java.lang.String logTag
           
 int madeWordEntries
           
protected  com.sun.labs.minion.lexmorph.Atom massAtom
           
protected  com.sun.labs.minion.lexmorph.Atom mcAtom
           
protected  Word misspellingWord
           
protected  Word modifiedByWord
           
protected  Category monosyllabicCategory
           
protected  Category nameCategory
           
protected  Category ncCategory
           
protected  Word nicknameWord
           
protected  Category nmCategory
           
protected  Category nnCategory
           
protected  Category nonnameCats
           
protected  Category not13sgCategory
           
protected  Category not3sgCategory
           
protected  Category nounCategory
           
protected  Category nplCategory
           
protected  Category nprCategory
           
protected  Category nsgCategory
           
protected  Category nspCategory
           
protected  com.sun.labs.minion.lexmorph.Atom numberAtom
           
protected  com.sun.labs.minion.lexmorph.Atom one3SAtom
           
protected  com.sun.labs.minion.lexmorph.Atom one3SgAtom
           
protected  com.sun.labs.minion.lexmorph.Atom one3SingAtom
           
protected  com.sun.labs.minion.lexmorph.Atom oneSAtom
           
protected  com.sun.labs.minion.lexmorph.Atom oneSgAtom
           
protected  com.sun.labs.minion.lexmorph.Atom oneSingAtom
           
protected  Category ordinalCategory
           
protected  com.sun.labs.minion.lexmorph.Atom pastAtom
           
protected  Category pastCategory
           
protected  com.sun.labs.minion.lexmorph.Atom pastDashPartAtom
           
protected  com.sun.labs.minion.lexmorph.Atom pastpartAtom
           
protected  Category pastpartCategory
           
protected  com.sun.labs.minion.lexmorph.Atom penaltiesAtom
           
protected  com.sun.labs.minion.lexmorph.Atom penaltyAtom
           
protected  Word personWord
           
protected  com.sun.labs.minion.lexmorph.Atom plAtom
           
protected  com.sun.labs.minion.lexmorph.Atom pncodeAtom
           
protected  Category polysyllabicCategory
           
protected  Category pppCategory
           
protected  com.sun.labs.minion.lexmorph.Atom prefixAtom
           
protected  Category prefixCategory
           
protected  Category prepCategory
           
protected  com.sun.labs.minion.lexmorph.Atom presDashPartAtom
           
protected  com.sun.labs.minion.lexmorph.Atom presentAtom
           
protected  com.sun.labs.minion.lexmorph.Atom prespartAtom
           
protected  Category prespartCategory
           
protected  Category proCategory
           
 boolean productionFlag
           
protected  Category properCats
           
protected  com.sun.labs.minion.lexmorph.Atom relationAtom
           
 int reloadedBitBuffers
           
 int reloadedWordEntries
           
protected  com.sun.labs.minion.lexmorph.Atom rootAtom
           
protected  com.sun.labs.minion.lexmorph.Atom scalarAtom
           
protected  com.sun.labs.minion.lexmorph.Atom senseofAtom
           
protected  com.sun.labs.minion.lexmorph.Atom sgSlashPlAtom
           
protected  int ShrinkLexLimit
           
protected  Word[] smallIntegers
           
protected  com.sun.labs.minion.lexmorph.Atom starIcodeAtom
           
protected  com.sun.labs.minion.lexmorph.Atom suffixAtom
           
protected  Category suffixCategory
           
protected  com.sun.labs.minion.lexmorph.Atom superlativeAtom
           
protected  Category syllabicCategory
           
protected  com.sun.labs.minion.lexmorph.Atom takesObjAtom
           
protected  com.sun.labs.minion.lexmorph.Atom tenseAtom
           
protected  Word thingWord
           
protected  com.sun.labs.minion.lexmorph.Atom threeSAtom
           
protected  com.sun.labs.minion.lexmorph.Atom threeSgAtom
           
protected  com.sun.labs.minion.lexmorph.Atom threeSingAtom
           
protected  com.sun.labs.minion.lexmorph.Atom tnsAtom
           
protected  com.sun.labs.minion.lexmorph.Atom trueAtom
           
protected  com.sun.labs.minion.lexmorph.Atom twoSAtom
           
protected  com.sun.labs.minion.lexmorph.Atom twoSgAtom
           
protected  com.sun.labs.minion.lexmorph.Atom twoSingAtom
           
protected  com.sun.labs.minion.lexmorph.Atom ucAtom
           
protected  com.sun.labs.minion.lexmorph.Atom untensedAtom
           
protected  Category v13sgCategory
           
protected  Category v1sgCategory
           
protected  Category v2sgCategory
           
protected  Category v3sgCategory
           
protected  Category verbCategory
           
protected  Category viCategory
           
protected  Category vpast2sgCategory
           
protected  Category vpast3sgCategory
           
protected  Category vtCategory
           
protected  Word word_0
           
protected  Word word_1
           
protected  Word word_2
           
protected  Word word_3
           
protected  Category wordCategory
           
static boolean wordTrace
           
 
Constructor Summary
Lexicon()
           
Lexicon(int startWordSize)
           
Lexicon(int startWordSize, int startAtomSize)
           
 
Method Summary
 int assignAdditionalIndexNumbers()
           
 void assignIndexNumbers()
           
 int atomSize()
           
 void clear()
           
 void clearIndex()
           
 void clearIndex(int nSize)
           
 void closeBinLexRAF()
           
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 int compare(Word word1, Word word2)
          Method for testing if two words are in alphabetical order.
 int compareChars(char char1, char char2)
          Method for comparing two chars for alphabetical order.
 int compareStrings(java.lang.String string1, java.lang.String string2)
          Method for comparing two strings for human-friendly alphabetical order.
 int crushLex()
           
 com.sun.labs.minion.lexmorph.Atom decodeAtom(BitBuffer bb, int idx)
           
 com.sun.labs.minion.lexmorph.Atom decodeAtomP(BitBuffer bb)
           
 com.sun.labs.minion.lexmorph.Atom[] decodeAtoms(BitBuffer bb)
           
 Category[] decodeCategories(BitBuffer bb)
           
 Category decodeCategory(BitBuffer bb, int idx)
           
 Category decodeCategoryP(BitBuffer bb)
           
 com.sun.labs.minion.lexmorph.List decodeList(BitBuffer bb)
           
 java.lang.Number decodeNumber(BitBuffer bb)
           
 Value decodeValue(BitBuffer bb)
           
 java.util.concurrent.ConcurrentHashMap decodeValueHash(BitBuffer bb)
           
 Value[] decodeValues(BitBuffer bb)
           
 Word decodeWord(BitBuffer bb, int idx, int unpackAct)
           
 Word decodeWordP(BitBuffer bb)
           
 Word[] decodeWords(BitBuffer bb)
           
 int dumpBinaryLexicon(java.lang.String blName)
           
 void dumpHistory(java.lang.String hist, java.lang.String fname)
           
 int dumpLex(java.lang.String binLexOutStr)
           
 int dumpLexIndex(java.lang.String binLexOutStr)
           
 boolean equals(java.lang.Object obj)
           
 int fastPreserveParents()
           
 java.util.HashMap findEquivs()
           
 Word findOrMakeScratchWord(java.lang.String str, java.util.Hashtable morphCache)
           
 void fixWordIndex(int bigger)
           
 int forgetMorphWords(int tooHiWord)
           
 com.sun.labs.minion.lexmorph.Atom getAtom(java.lang.String namestring)
           
 Category[] getCategories(java.lang.String catString, java.lang.String breakChars)
           
 Category getCategory(java.lang.String nameString)
           
 int getHighWordIndex()
           
 Word getOrGuessWord(java.lang.String wordstr)
           
 Word getOrMakeOrdinal(java.lang.String numOrdStr, java.lang.Double doubVal)
           
 Word getOrMakeOrdinal(java.lang.String numOrdStr, java.lang.Integer intVal)
           
 Word getWord(int num)
           
 Word getWord(java.lang.Number num)
           
 Word getWord(java.lang.String wordstring)
           
 Word getWord(WordToken t)
           
 Word guessWordAttributes(Word lexWord)
           
 void incFixWordIndex()
           
 Word innerMakeWord(java.lang.String str)
           
 Word innerMakeWord(java.lang.String str, java.util.Hashtable morphCache)
           
 Word[] innerMakeWordSet(java.lang.String sepWordString, java.lang.String sepChars)
           
 Word[] innerMakeWordSet(java.lang.String sepWordString, java.lang.String sepChars, java.util.Hashtable morphCache)
           
 int innerShrinkLex()
           
 Word installWord(Word val, java.lang.String str)
           
 boolean isFormOfCat(java.lang.String wordstr, java.lang.String cat)
           
 boolean isKnownWord(java.lang.String str)
           
 boolean isKnownWord(Word w)
           
 boolean isKnownWord(WordToken t)
           
 boolean isWordProp(java.lang.String attrString)
           
 Word knownOrScratchWord(java.lang.String str)
           
 Word knownOrScratchWord(java.lang.String str, java.util.Hashtable morphCache)
           
 com.sun.labs.minion.lexmorph.List listAppend(com.sun.labs.minion.lexmorph.List l1, com.sun.labs.minion.lexmorph.List l2)
           
 int loadCoreLex(java.lang.String binLexInStr)
           
 boolean loadFile(java.lang.String filename)
           
 int loadLex(java.lang.String binLexInStr)
           
 int loadLex(java.lang.String binLexInStr, int highLoadIndex, int unpackAct)
           
 int loadLexIndex(java.lang.String binLexOutStr)
           
 int loadPackedLex(java.lang.String binLexInStr)
           
 com.sun.labs.minion.lexmorph.Atom makeAtom(int intVal)
           
 com.sun.labs.minion.lexmorph.Atom makeAtom(java.lang.Number num)
           
 com.sun.labs.minion.lexmorph.Atom makeAtom(java.lang.String namestring)
           
 Value makeCapcode(java.lang.String key)
           
 Category makeCategory(java.lang.String namestring)
           
 Word makeEntry(java.lang.String entryString)
           
 Word makeGuessedWord(java.lang.String str)
           
 Word makeGuessedWord(Word lexWord)
           
 com.sun.labs.minion.lexmorph.List makeList(java.util.ArrayList input)
           
 com.sun.labs.minion.lexmorph.List makeList(Value input)
           
 com.sun.labs.minion.lexmorph.List makeList(Value[] input)
           
 com.sun.labs.minion.lexmorph.List makeList(java.util.Vector vinput)
           
 com.sun.labs.minion.lexmorph.List makeListOfAtoms(java.lang.String input)
           
 com.sun.labs.minion.lexmorph.List makeListOfAtoms(java.lang.String input, java.lang.String breakChars)
           
 com.sun.labs.minion.lexmorph.List makeListOfWords(Word w1)
           
 com.sun.labs.minion.lexmorph.List makeListOfWords(Word w1, Word w2)
           
 com.sun.labs.minion.lexmorph.List makeListOfWords(Word w1, Word w2, Word w3)
           
 com.sun.labs.minion.lexmorph.List makeModifierList(Word mod, Word root)
           
 com.sun.labs.minion.lexmorph.List makeModifierList(Word mod, Word prepWord, Word root)
           
 Word makeOrdinalWord(double doubOrdinal)
           
 Word makeOrdinalWord(int intOrdinal)
           
 Word makeOrdinalWord(long longOrdinal)
           
 Word makePhraseWord(Word[] pwords)
           
 Word makeScratchWord(java.lang.String str)
           
 Word makeScratchWord(java.lang.String str, java.util.Hashtable morphCache)
           
 Word makeSenseWordIfNeeded(Category c, java.lang.String qstr)
           
 Word[] makeSpaceWordSet(java.lang.String spaceSepWordString)
           
 Word makeStructuredConcept(Category cat, com.sun.labs.minion.lexmorph.List cstruct)
           
 Word makeStructuredConcept(java.lang.String str, Category cat, com.sun.labs.minion.lexmorph.List cstruct)
           
 Word makeStructuredConcept(Word swd, Category cat, com.sun.labs.minion.lexmorph.List cstruct)
           
 Word[] makeTabWordSequence(java.lang.String tabSepWordString)
           
 Word[] makeTabWordSet(java.lang.String tabSepWordString)
           
 Word makeWord(java.util.ArrayList wdAL)
           
 Word makeWord(int num)
           
 Word makeWord(com.sun.labs.minion.lexmorph.List wdList)
           
 Word makeWord(java.lang.Number num)
           
 Word makeWord(java.lang.String wordstring)
           
 Word makeWord(java.lang.String wordstring, java.util.Hashtable morphCache)
           
 Word makeWord(java.util.Vector wdVect)
           
 Word makeWord(Word[] pwords)
           
 Word makeWord(WordToken t)
           
 Word[] makeWordSet(java.lang.String slashSepWordString)
           
 Word[] makeWordSet(java.lang.String sepWordString, java.lang.String sep)
           
 Word[] makeWordSet(java.lang.String sepWordString, java.lang.String sep, java.util.Hashtable morphCache)
           
 Word[] mapWordAttrp(com.sun.labs.minion.lexmorph.Atom attr)
           
 Word[] mapWordAttrp(java.lang.String strattr)
           
 Word[] mapWordAttrs(com.sun.labs.minion.lexmorph.Atom attr, com.sun.labs.minion.lexmorph.Atom val)
           
 Word[] mapWordAttrs(java.lang.String attrStr, java.lang.String valStr)
           
 Word[] mapWordAuthor(com.sun.labs.minion.lexmorph.Atom val)
           
 Word[] mapWordAuthor(java.lang.String sval)
           
 com.sun.labs.minion.lexmorph.List mergeLists(com.sun.labs.minion.lexmorph.List l1, com.sun.labs.minion.lexmorph.List l2)
           
 Value mergeValues(Value v1, Value v2)
           
 boolean morphAsVerbForm(Word wd)
           
 boolean morphPluralTest(Word wd)
           
 java.io.RandomAccessFile openBinLexRAF(java.lang.String rafName)
           
 Word packLex(java.lang.String s)
           
 Word packLex(java.lang.String s1, java.lang.String s2)
           
 Word packLex(java.lang.String s1, java.lang.String s2, java.lang.String s3)
           
 Word packLex(java.lang.String s1, java.lang.String s2, java.lang.String s3, java.lang.String s4)
           
 int preserveParents()
           
 int preserveWords()
           
 void printAtoms()
           
 int purgeWords()
           
 Value reloadBinObj(int idx)
           
 Value reloadBinObj(int idx, java.io.RandomAccessFile binLexRaf)
           
 void reloadDeferredEntries()
           
 Value restoreBBObj(BitBuffer tempBB, int idx, int unpackAct)
           
 java.lang.String restoreHistory(java.lang.String fname)
           
 void restoreIndexNumbers()
           
 void saveFile(java.lang.String filename)
           
 void saveFile(java.lang.String filename, com.sun.labs.minion.lexmorph.Atom authorAtom)
           
 void saveFile(java.lang.String filename, java.lang.String authorStr)
           
 void saveFileWithProp(java.lang.String filename, com.sun.labs.minion.lexmorph.Atom propAtom)
           
 void saveFileWithProp(java.lang.String filename, java.lang.String prop)
           
 void saveMorphWords(int tooHiWord, java.lang.String fname)
           
 Category[] setCategories(java.lang.String catString)
           
 int setCategoryBits()
           
 void setSize(int size)
           
 Category[] setSubcategories(java.lang.String catname, java.lang.String subcats)
           
 Category[] setTestCategories(java.lang.String catString)
           
 void showCategories()
           
 int shrinkLex()
           
 int shrinkLexSize()
           
 int size()
           
static void startDebug()
           
static void stopDebug()
           
 int trimWords()
           
 Value[] valuesFromString(java.lang.String input, boolean makeWordFlag)
           
 Value[] valuesFromString(java.lang.String input, int vtype)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IndexWordLimit

protected int IndexWordLimit

ShrinkLexLimit

protected int ShrinkLexLimit

productionFlag

public boolean productionFlag

ordinalCategory

protected Category ordinalCategory

compoundableCats

protected Category compoundableCats

properCats

protected Category properCats

nonnameCats

protected Category nonnameCats

prepCategory

protected Category prepCategory

proCategory

protected Category proCategory

verbCategory

protected Category verbCategory

viCategory

protected Category viCategory

vtCategory

protected Category vtCategory

pastCategory

protected Category pastCategory

pastpartCategory

protected Category pastpartCategory

pppCategory

protected Category pppCategory

not3sgCategory

protected Category not3sgCategory

not13sgCategory

protected Category not13sgCategory

v3sgCategory

protected Category v3sgCategory

vpast3sgCategory

protected Category vpast3sgCategory

v2sgCategory

protected Category v2sgCategory

vpast2sgCategory

protected Category vpast2sgCategory

v1sgCategory

protected Category v1sgCategory

v13sgCategory

protected Category v13sgCategory

prespartCategory

protected Category prespartCategory

nameCategory

protected Category nameCategory

anyncCategory

protected Category anyncCategory

ncCategory

protected Category ncCategory

anynCategory

protected Category anynCategory

nounCategory

protected Category nounCategory

nmCategory

protected Category nmCategory

nnCategory

protected Category nnCategory

nspCategory

protected Category nspCategory

nsgCategory

protected Category nsgCategory

nplCategory

protected Category nplCategory

nprCategory

protected Category nprCategory

alphanumCategory

protected Category alphanumCategory

syllabicCategory

protected Category syllabicCategory

prefixCategory

protected Category prefixCategory

suffixCategory

protected Category suffixCategory

polysyllabicCategory

protected Category polysyllabicCategory

monosyllabicCategory

protected Category monosyllabicCategory

adjCategory

protected Category adjCategory

adjAdvAnyNVCategory

protected Category adjAdvAnyNVCategory

advCategory

protected Category advCategory

wordCategory

protected Category wordCategory

icAtom

protected com.sun.labs.minion.lexmorph.Atom icAtom

lcAtom

protected com.sun.labs.minion.lexmorph.Atom lcAtom

mcAtom

protected com.sun.labs.minion.lexmorph.Atom mcAtom

ucAtom

protected com.sun.labs.minion.lexmorph.Atom ucAtom

agrAtom

protected com.sun.labs.minion.lexmorph.Atom agrAtom

comparativeAtom

protected com.sun.labs.minion.lexmorph.Atom comparativeAtom

compoundOfAtom

protected com.sun.labs.minion.lexmorph.Atom compoundOfAtom

derivationAtom

protected com.sun.labs.minion.lexmorph.Atom derivationAtom

entailsAtom

protected com.sun.labs.minion.lexmorph.Atom entailsAtom

entailedbyAtom

protected com.sun.labs.minion.lexmorph.Atom entailedbyAtom

falseRootAtom

protected com.sun.labs.minion.lexmorph.Atom falseRootAtom

formAtom

protected com.sun.labs.minion.lexmorph.Atom formAtom

formsAtom

protected com.sun.labs.minion.lexmorph.Atom formsAtom

guessedAtom

protected com.sun.labs.minion.lexmorph.Atom guessedAtom

hasDashPrefixAtom

protected com.sun.labs.minion.lexmorph.Atom hasDashPrefixAtom

hasDashSuffixAtom

protected com.sun.labs.minion.lexmorph.Atom hasDashSuffixAtom

icodesAtom

protected com.sun.labs.minion.lexmorph.Atom icodesAtom

iioAtom

protected com.sun.labs.minion.lexmorph.Atom iioAtom

ikoAtom

protected com.sun.labs.minion.lexmorph.Atom ikoAtom

massAtom

protected com.sun.labs.minion.lexmorph.Atom massAtom

numberAtom

protected com.sun.labs.minion.lexmorph.Atom numberAtom

oneSAtom

protected com.sun.labs.minion.lexmorph.Atom oneSAtom

oneSgAtom

protected com.sun.labs.minion.lexmorph.Atom oneSgAtom

oneSingAtom

protected com.sun.labs.minion.lexmorph.Atom oneSingAtom

one3SAtom

protected com.sun.labs.minion.lexmorph.Atom one3SAtom

one3SgAtom

protected com.sun.labs.minion.lexmorph.Atom one3SgAtom

one3SingAtom

protected com.sun.labs.minion.lexmorph.Atom one3SingAtom

pastpartAtom

protected com.sun.labs.minion.lexmorph.Atom pastpartAtom

pastDashPartAtom

protected com.sun.labs.minion.lexmorph.Atom pastDashPartAtom

penaltyAtom

protected com.sun.labs.minion.lexmorph.Atom penaltyAtom

penaltiesAtom

protected com.sun.labs.minion.lexmorph.Atom penaltiesAtom

plAtom

protected com.sun.labs.minion.lexmorph.Atom plAtom

pncodeAtom

protected com.sun.labs.minion.lexmorph.Atom pncodeAtom

prefixAtom

protected com.sun.labs.minion.lexmorph.Atom prefixAtom

prespartAtom

protected com.sun.labs.minion.lexmorph.Atom prespartAtom

presDashPartAtom

protected com.sun.labs.minion.lexmorph.Atom presDashPartAtom

presentAtom

protected com.sun.labs.minion.lexmorph.Atom presentAtom

pastAtom

protected com.sun.labs.minion.lexmorph.Atom pastAtom

relationAtom

protected com.sun.labs.minion.lexmorph.Atom relationAtom

rootAtom

protected com.sun.labs.minion.lexmorph.Atom rootAtom

scalarAtom

protected com.sun.labs.minion.lexmorph.Atom scalarAtom

senseofAtom

protected com.sun.labs.minion.lexmorph.Atom senseofAtom

sgSlashPlAtom

protected com.sun.labs.minion.lexmorph.Atom sgSlashPlAtom

suffixAtom

protected com.sun.labs.minion.lexmorph.Atom suffixAtom

starIcodeAtom

protected com.sun.labs.minion.lexmorph.Atom starIcodeAtom

superlativeAtom

protected com.sun.labs.minion.lexmorph.Atom superlativeAtom

takesObjAtom

protected com.sun.labs.minion.lexmorph.Atom takesObjAtom

tenseAtom

protected com.sun.labs.minion.lexmorph.Atom tenseAtom

tnsAtom

protected com.sun.labs.minion.lexmorph.Atom tnsAtom

threeSAtom

protected com.sun.labs.minion.lexmorph.Atom threeSAtom

threeSgAtom

protected com.sun.labs.minion.lexmorph.Atom threeSgAtom

threeSingAtom

protected com.sun.labs.minion.lexmorph.Atom threeSingAtom

trueAtom

protected com.sun.labs.minion.lexmorph.Atom trueAtom

twoSAtom

protected com.sun.labs.minion.lexmorph.Atom twoSAtom

twoSgAtom

protected com.sun.labs.minion.lexmorph.Atom twoSgAtom

twoSingAtom

protected com.sun.labs.minion.lexmorph.Atom twoSingAtom

untensedAtom

protected com.sun.labs.minion.lexmorph.Atom untensedAtom

abbreviationWord

protected Word abbreviationWord

integerWord

protected Word integerWord

misspellingWord

protected Word misspellingWord

modifiedByWord

protected Word modifiedByWord

nicknameWord

protected Word nicknameWord

personWord

protected Word personWord

thingWord

protected Word thingWord

word_0

protected Word word_0

word_1

protected Word word_1

word_2

protected Word word_2

word_3

protected Word word_3

smallIntegers

protected Word[] smallIntegers

binLexRAF

public java.io.RandomAccessFile binLexRAF

madeWordEntries

public int madeWordEntries

reloadedWordEntries

public int reloadedWordEntries

reloadedBitBuffers

public int reloadedBitBuffers

letterOrder

public java.lang.String letterOrder

authorFlag

public static final boolean authorFlag
For debugging.

See Also:
Constant Field Values

debug

public static boolean debug

wordTrace

public static boolean wordTrace

logTag

protected static java.lang.String logTag
Constructor Detail

Lexicon

public Lexicon()

Lexicon

public Lexicon(int startWordSize)

Lexicon

public Lexicon(int startWordSize,
               int startAtomSize)
Method Detail

knownOrScratchWord

public Word knownOrScratchWord(java.lang.String str)

knownOrScratchWord

public Word knownOrScratchWord(java.lang.String str,
                               java.util.Hashtable morphCache)

findOrMakeScratchWord

public Word findOrMakeScratchWord(java.lang.String str,
                                  java.util.Hashtable morphCache)

makeScratchWord

public Word makeScratchWord(java.lang.String str)

makeScratchWord

public Word makeScratchWord(java.lang.String str,
                            java.util.Hashtable morphCache)

makeWord

public Word makeWord(java.lang.String wordstring)

makeWord

public Word makeWord(java.lang.String wordstring,
                     java.util.Hashtable morphCache)

makeWord

public Word makeWord(WordToken t)

makeSenseWordIfNeeded

public Word makeSenseWordIfNeeded(Category c,
                                  java.lang.String qstr)

makePhraseWord

public Word makePhraseWord(Word[] pwords)

installWord

public Word installWord(Word val,
                        java.lang.String str)

innerMakeWord

public Word innerMakeWord(java.lang.String str)

innerMakeWord

public Word innerMakeWord(java.lang.String str,
                          java.util.Hashtable morphCache)

makeWord

public Word makeWord(int num)

makeWord

public Word makeWord(java.lang.Number num)

makeWord

public Word makeWord(Word[] pwords)

makeWord

public Word makeWord(com.sun.labs.minion.lexmorph.List wdList)

makeWord

public Word makeWord(java.util.Vector wdVect)

makeWord

public Word makeWord(java.util.ArrayList wdAL)

makeOrdinalWord

public Word makeOrdinalWord(int intOrdinal)

makeOrdinalWord

public Word makeOrdinalWord(double doubOrdinal)

makeOrdinalWord

public Word makeOrdinalWord(long longOrdinal)

getOrMakeOrdinal

public Word getOrMakeOrdinal(java.lang.String numOrdStr,
                             java.lang.Integer intVal)

getOrMakeOrdinal

public Word getOrMakeOrdinal(java.lang.String numOrdStr,
                             java.lang.Double doubVal)

makeWordSet

public Word[] makeWordSet(java.lang.String slashSepWordString)

makeSpaceWordSet

public Word[] makeSpaceWordSet(java.lang.String spaceSepWordString)

makeTabWordSet

public Word[] makeTabWordSet(java.lang.String tabSepWordString)

makeTabWordSequence

public Word[] makeTabWordSequence(java.lang.String tabSepWordString)

makeWordSet

public Word[] makeWordSet(java.lang.String sepWordString,
                          java.lang.String sep)

makeWordSet

public Word[] makeWordSet(java.lang.String sepWordString,
                          java.lang.String sep,
                          java.util.Hashtable morphCache)

innerMakeWordSet

public Word[] innerMakeWordSet(java.lang.String sepWordString,
                               java.lang.String sepChars)

innerMakeWordSet

public Word[] innerMakeWordSet(java.lang.String sepWordString,
                               java.lang.String sepChars,
                               java.util.Hashtable morphCache)

getWord

public Word getWord(java.lang.String wordstring)

getWord

public Word getWord(WordToken t)

getWord

public Word getWord(int num)

getWord

public Word getWord(java.lang.Number num)

getOrGuessWord

public Word getOrGuessWord(java.lang.String wordstr)

makeGuessedWord

public Word makeGuessedWord(java.lang.String str)

makeGuessedWord

public Word makeGuessedWord(Word lexWord)

guessWordAttributes

public Word guessWordAttributes(Word lexWord)

makeModifierList

public com.sun.labs.minion.lexmorph.List makeModifierList(Word mod,
                                                          Word prepWord,
                                                          Word root)

makeModifierList

public com.sun.labs.minion.lexmorph.List makeModifierList(Word mod,
                                                          Word root)

makeStructuredConcept

public Word makeStructuredConcept(Word swd,
                                  Category cat,
                                  com.sun.labs.minion.lexmorph.List cstruct)

makeStructuredConcept

public Word makeStructuredConcept(java.lang.String str,
                                  Category cat,
                                  com.sun.labs.minion.lexmorph.List cstruct)

makeStructuredConcept

public Word makeStructuredConcept(Category cat,
                                  com.sun.labs.minion.lexmorph.List cstruct)

findEquivs

public java.util.HashMap findEquivs()

preserveWords

public int preserveWords()

preserveParents

public int preserveParents()

fastPreserveParents

public int fastPreserveParents()

trimWords

public int trimWords()

purgeWords

public int purgeWords()

clearIndex

public void clearIndex()

clearIndex

public void clearIndex(int nSize)

incFixWordIndex

public void incFixWordIndex()

fixWordIndex

public void fixWordIndex(int bigger)

assignAdditionalIndexNumbers

public int assignAdditionalIndexNumbers()

assignIndexNumbers

public void assignIndexNumbers()

getHighWordIndex

public int getHighWordIndex()

restoreIndexNumbers

public void restoreIndexNumbers()

shrinkLexSize

public int shrinkLexSize()

forgetMorphWords

public int forgetMorphWords(int tooHiWord)

saveMorphWords

public void saveMorphWords(int tooHiWord,
                           java.lang.String fname)

shrinkLex

public int shrinkLex()

innerShrinkLex

public int innerShrinkLex()

dumpBinaryLexicon

public int dumpBinaryLexicon(java.lang.String blName)

dumpLex

public int dumpLex(java.lang.String binLexOutStr)

loadLex

public int loadLex(java.lang.String binLexInStr)

loadPackedLex

public int loadPackedLex(java.lang.String binLexInStr)

loadCoreLex

public int loadCoreLex(java.lang.String binLexInStr)

loadLex

public int loadLex(java.lang.String binLexInStr,
                   int highLoadIndex,
                   int unpackAct)

crushLex

public int crushLex()

dumpLexIndex

public int dumpLexIndex(java.lang.String binLexOutStr)

loadLexIndex

public int loadLexIndex(java.lang.String binLexOutStr)

openBinLexRAF

public java.io.RandomAccessFile openBinLexRAF(java.lang.String rafName)

closeBinLexRAF

public void closeBinLexRAF()

reloadBinObj

public Value reloadBinObj(int idx)

reloadBinObj

public Value reloadBinObj(int idx,
                          java.io.RandomAccessFile binLexRaf)

restoreBBObj

public Value restoreBBObj(BitBuffer tempBB,
                          int idx,
                          int unpackAct)

morphPluralTest

public boolean morphPluralTest(Word wd)

morphAsVerbForm

public boolean morphAsVerbForm(Word wd)

isFormOfCat

public boolean isFormOfCat(java.lang.String wordstr,
                           java.lang.String cat)

size

public int size()

atomSize

public int atomSize()

isKnownWord

public boolean isKnownWord(java.lang.String str)

isKnownWord

public boolean isKnownWord(WordToken t)

isKnownWord

public boolean isKnownWord(Word w)

mapWordAttrs

public Word[] mapWordAttrs(java.lang.String attrStr,
                           java.lang.String valStr)

mapWordAttrs

public Word[] mapWordAttrs(com.sun.labs.minion.lexmorph.Atom attr,
                           com.sun.labs.minion.lexmorph.Atom val)

mapWordAttrp

public Word[] mapWordAttrp(java.lang.String strattr)

mapWordAttrp

public Word[] mapWordAttrp(com.sun.labs.minion.lexmorph.Atom attr)

mapWordAuthor

public Word[] mapWordAuthor(java.lang.String sval)

mapWordAuthor

public Word[] mapWordAuthor(com.sun.labs.minion.lexmorph.Atom val)

printAtoms

public void printAtoms()

packLex

public Word packLex(java.lang.String s)

packLex

public Word packLex(java.lang.String s1,
                    java.lang.String s2)

packLex

public Word packLex(java.lang.String s1,
                    java.lang.String s2,
                    java.lang.String s3)

packLex

public Word packLex(java.lang.String s1,
                    java.lang.String s2,
                    java.lang.String s3,
                    java.lang.String s4)

makeEntry

public Word makeEntry(java.lang.String entryString)

isWordProp

public boolean isWordProp(java.lang.String attrString)

loadFile

public boolean loadFile(java.lang.String filename)

reloadDeferredEntries

public void reloadDeferredEntries()

dumpHistory

public void dumpHistory(java.lang.String hist,
                        java.lang.String fname)

restoreHistory

public java.lang.String restoreHistory(java.lang.String fname)

saveFile

public void saveFile(java.lang.String filename)

saveFile

public void saveFile(java.lang.String filename,
                     java.lang.String authorStr)

saveFile

public void saveFile(java.lang.String filename,
                     com.sun.labs.minion.lexmorph.Atom authorAtom)

saveFileWithProp

public void saveFileWithProp(java.lang.String filename,
                             java.lang.String prop)

saveFileWithProp

public void saveFileWithProp(java.lang.String filename,
                             com.sun.labs.minion.lexmorph.Atom propAtom)

clear

public void clear()

setSize

public void setSize(int size)

makeAtom

public com.sun.labs.minion.lexmorph.Atom makeAtom(java.lang.String namestring)

makeAtom

public com.sun.labs.minion.lexmorph.Atom makeAtom(java.lang.Number num)

makeAtom

public com.sun.labs.minion.lexmorph.Atom makeAtom(int intVal)

getAtom

public com.sun.labs.minion.lexmorph.Atom getAtom(java.lang.String namestring)

makeCategory

public Category makeCategory(java.lang.String namestring)

getCategory

public Category getCategory(java.lang.String nameString)

getCategories

public Category[] getCategories(java.lang.String catString,
                                java.lang.String breakChars)

setCategories

public Category[] setCategories(java.lang.String catString)

setTestCategories

public Category[] setTestCategories(java.lang.String catString)

setSubcategories

public Category[] setSubcategories(java.lang.String catname,
                                   java.lang.String subcats)

setCategoryBits

public int setCategoryBits()

showCategories

public void showCategories()

makeList

public com.sun.labs.minion.lexmorph.List makeList(Value input)

makeList

public com.sun.labs.minion.lexmorph.List makeList(Value[] input)

makeList

public com.sun.labs.minion.lexmorph.List makeList(java.util.Vector vinput)

makeList

public com.sun.labs.minion.lexmorph.List makeList(java.util.ArrayList input)

makeListOfWords

public com.sun.labs.minion.lexmorph.List makeListOfWords(Word w1)

makeListOfWords

public com.sun.labs.minion.lexmorph.List makeListOfWords(Word w1,
                                                         Word w2)

makeListOfWords

public com.sun.labs.minion.lexmorph.List makeListOfWords(Word w1,
                                                         Word w2,
                                                         Word w3)

makeListOfAtoms

public com.sun.labs.minion.lexmorph.List makeListOfAtoms(java.lang.String input)

makeListOfAtoms

public com.sun.labs.minion.lexmorph.List makeListOfAtoms(java.lang.String input,
                                                         java.lang.String breakChars)

valuesFromString

public Value[] valuesFromString(java.lang.String input,
                                boolean makeWordFlag)

valuesFromString

public Value[] valuesFromString(java.lang.String input,
                                int vtype)

decodeAtoms

public com.sun.labs.minion.lexmorph.Atom[] decodeAtoms(BitBuffer bb)

decodeCategories

public Category[] decodeCategories(BitBuffer bb)

decodeWords

public Word[] decodeWords(BitBuffer bb)

decodeList

public com.sun.labs.minion.lexmorph.List decodeList(BitBuffer bb)

decodeValues

public Value[] decodeValues(BitBuffer bb)

decodeAtom

public com.sun.labs.minion.lexmorph.Atom decodeAtom(BitBuffer bb,
                                                    int idx)

decodeCategory

public Category decodeCategory(BitBuffer bb,
                               int idx)

decodeWord

public Word decodeWord(BitBuffer bb,
                       int idx,
                       int unpackAct)

decodeValue

public Value decodeValue(BitBuffer bb)

decodeWordP

public Word decodeWordP(BitBuffer bb)

decodeAtomP

public com.sun.labs.minion.lexmorph.Atom decodeAtomP(BitBuffer bb)

decodeCategoryP

public Category decodeCategoryP(BitBuffer bb)

decodeValueHash

public java.util.concurrent.ConcurrentHashMap decodeValueHash(BitBuffer bb)

decodeNumber

public java.lang.Number decodeNumber(BitBuffer bb)

listAppend

public com.sun.labs.minion.lexmorph.List listAppend(com.sun.labs.minion.lexmorph.List l1,
                                                    com.sun.labs.minion.lexmorph.List l2)

mergeValues

public Value mergeValues(Value v1,
                         Value v2)

mergeLists

public com.sun.labs.minion.lexmorph.List mergeLists(com.sun.labs.minion.lexmorph.List l1,
                                                    com.sun.labs.minion.lexmorph.List l2)

makeCapcode

public Value makeCapcode(java.lang.String key)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)

compare

public int compare(Word word1,
                   Word word2)
Method for testing if two words are in alphabetical order. Lexicon.compare(x y) is a general ordering function for sorting any mixture of numbers and words. It orders things in the way a dictionary might, rather than in their ascii order. Specifically, all numbers come first, ordered by numerical value. Character sequences are ordered so that strings with the same letter sequence but different case (or different accents) will be sorted together. Characters are ordered by a function (compareChars) in which special chars precede digits, which precede alphabetics, and capitals only precede lowercase characters when they are the same letter. A sample of the ordering assigned is: (.2 0.2 2 3.14 20 ! - [ ~ 2A 'A' 'a' A a 'A' 'a' '?' '?' '?' '?' '?' '?' '?' ALPHA Alpha alPha alpha B).

Parameters:
word1 - The putative earlier word in the order.
word2 - The putative later word in the order.

compareStrings

public int compareStrings(java.lang.String string1,
                          java.lang.String string2)
Method for comparing two strings for human-friendly alphabetical order.


compareChars

public int compareChars(char char1,
                        char char2)
Method for comparing two chars for alphabetical order. char-order (x y) is an ordering function for characters used in alphorder. It orders things in the way a dictionary might, rather than in ascii order -- specifically, all special chars come first, followed by digits, followed by alphabetics, and capitals only precede lowercase characters when they are the same letter. Also, accented characters come after the character they accent, with the following collating sequence: A a ? ? ? ? ? ? ? ? ? ? ? ? ? ? B b C c ? ? D d E e ? ? ? ? ? ? ? ? F f I i ? ? ? ? ? ? ? ? J j N n ? ? O o ? ? ? ? ? ? ? ? ? ? ? ? ? ? P p U u ? ? ? ? ? ? ? ? V v Y y ? ? Z z (some of the upper case versions are nonprinting).


startDebug

public static void startDebug()

stopDebug

public static void stopDebug()