Module l555 :: Class Lexicon
[show private | hide private]
[frames | no frames]

Class Lexicon


An object which represents a lexicon. The lexicon is structured as a dictionary of dictionaries. Entries in the lexicon are listed by their orthographic transcription. Each entry has several statistics as well, such as frequency, familiarity, and phonetic transcription


Method Summary
  lookup(self, word)
returns the statistics for a given word as a dictionary
  printDict(self, file)
print out the entire dictionary to a file
  printHeaders(self, file)
print the headers to a file.
  printWord(self, word, file)
print one word to a file.
  readFile(self, fileName)
fill up the lexicon from a file
  sorted(self, keys, reverse)
returns a list of lists sorted by particular keys.

Method Details

lookup(self, word)

returns the statistics for a given word as a dictionary

printDict(self, file=<epydoc.imports._DevNull instance at 0x2aaaaea28998>)

print out the entire dictionary to a file

printHeaders(self, file=<epydoc.imports._DevNull instance at 0x2aaaaea28998>)

print the headers to a file.

printWord(self, word, file=<epydoc.imports._DevNull instance at 0x2aaaaea28998>)

print one word to a file. The word should be given as a string

readFile(self, fileName)

fill up the lexicon from a file

sorted(self, keys=[], reverse=True)

returns a list of lists sorted by particular keys. The last item in each sublist is the primaryKey, which can be used for printing out the dictionary


Generated by Epydoc 2.1 on Mon Nov 10 14:13:13 2008 http://epydoc.sf.net