Package nltk :: Package classify :: Module tadm
[hide private]
[frames] | no frames]

Module tadm

source code

Functions [hide private]
 
config_tadm(bin=None) source code
 
write_tadm_file(train_toks, encoding, stream)
Generate an input file for tadm based on the given corpus of classified tokens.
source code
 
parse_tadm_weights(paramfile)
Given the stdout output generated by tadm when training a model, return a numpy array containing the corresponding weight vector.
source code
 
call_tadm(args)
Call the tadm binary with the given arguments.
source code
 
names_demo() source code
 
encoding_demo() source code
Variables [hide private]
  _tadm_bin = None
Function Details [hide private]

write_tadm_file(train_toks, encoding, stream)

source code 

Generate an input file for tadm based on the given corpus of classified tokens.

Parameters:
  • train_toks (list of tuples of (dict, str)) - Training data, represented as a list of pairs, the first member of which is a feature dictionary, and the second of which is a classification label.
  • encoding (TadmEventMaxentFeatureEncoding) - A feature encoding, used to convert featuresets into feature vectors.
  • stream (stream) - The stream to which the tadm input file should be written.