Package nltk_lite :: Package contrib :: Module lex
[hide private]
[frames] | no frames]

Module lex

source code

Ewan Klein, March 2007

Experimental module to provide support for implementing English morphology by feature unification.

Main challenge is to find way of encoding morphosyntactic rules. Current idea is to let a concatenated form such as 'walk + s' be encoded as a dictionary 'stem': 'walk', 'affix': 's'. This allows the morpho-phonological representation to undergo unification in the normal way.

Classes [hide private]
  Phon
A Phon object is just a stem and an affix.
Functions [hide private]
 
phon_representer(dumper, data)
Output 'phon' values in 'stem + affix' notation.
source code
 
normalize(s)
Turn input into non-Unicode strings without spaces.
source code
 
phon_constructor(loader, node)
Recognize 'stem + affix' as Phon objects in YAML.
source code
 
test()
Run unit tests on unification.
source code
Function Details [hide private]

normalize(s)

source code 

Turn input into non-Unicode strings without spaces. Return a Variable if input is of the form '?name'.