convlab2.nlu.svm package

Submodules

convlab2.nlu.svm.Classifier module

class convlab2.nlu.svm.Classifier.SGD(config)

Bases: object

load(params)
params()
predict(X)
train(X, y)
class convlab2.nlu.svm.Classifier.SVM(config)

Bases: object

load(params)
params()
pickC(X, y)
predict(X)
train(X, y)
class convlab2.nlu.svm.Classifier.classifier(config)

Bases: object

cacheFeature(dw, config=None)
createDictionary()
decode()
decodeToFile(dw, output_fname, config=None)
decode_sent(sentinfo, output_fname, config=None)
export(models_fname, dictionary_fname, config_fname)
extractFeatures(dw, log_input_key='batch')
extractFeatures2(sentinfo, log_input_key='batch')
load(fname)
save(save_fname)
train(dw, config=None)
convlab2.nlu.svm.Classifier.toSparse(baseX, X, dictionary)
convlab2.nlu.svm.Classifier.trainSVMwrapper(X, y)

convlab2.nlu.svm.Features module

class convlab2.nlu.svm.Features.cnNgram(words, logp, delta=0)

Bases: object

logscore()
score()
string_repn()
word_list()
convlab2.nlu.svm.Features.cn_ngram_merge(ngrams)
convlab2.nlu.svm.Features.cn_ngram_prune(ngrams, n)
convlab2.nlu.svm.Features.cn_ngram_replaced(ngram, searchwords, replacement)
class convlab2.nlu.svm.Features.cnet(config)

Bases: object

calculate(log_turn, log_input_key='batch')
tuple_calculate(this_tuple, log_turn, log_input_key='batch')
convlab2.nlu.svm.Features.get_cnngrams(cnet, max_ngrams, max_length)
convlab2.nlu.svm.Features.get_ngrams(sentence, max_length, skip_ngrams=False, add_tags=True)
class convlab2.nlu.svm.Features.lastSys(config)

Bases: object

calculate(log_turn, log_input_key='batch')
tuple_calculate(this_tuple, log_turn, log_input_key='batch')
class convlab2.nlu.svm.Features.nbest(config)

Bases: object

calculate(log_turn, log_input_key='batch')
calculate_sent(log_turn, log_input_key='batch')
tuple_calculate(this_tuple, log_turn, log_input_key='batch')
class convlab2.nlu.svm.Features.nbestLengths(config)

Bases: object

calculate(log_turn, log_input_key='batch')
tuple_calculate(this_tuple, log_turn, log_input_key='batch')
class convlab2.nlu.svm.Features.nbestScores(config)

Bases: object

calculate(log_turn, log_input_key='batch')
tuple_calculate(this_tuple, log_turn, log_input_key='batch')
class convlab2.nlu.svm.Features.valueIdentifying(config)

Bases: object

calculate(log_turn, log_input_key='batch')
tuple_calculate(this_tuple, log_turn, log_input_key='batch')

convlab2.nlu.svm.Tuples module

convlab2.nlu.svm.Tuples.actual_value(value)
class convlab2.nlu.svm.Tuples.genericValue(slot, value=None)

Bases: object

convlab2.nlu.svm.Tuples.generic_to_specific(tup)
convlab2.nlu.svm.Tuples.is_generic(value)
convlab2.nlu.svm.Tuples.makes_valid_act(tuples)
convlab2.nlu.svm.Tuples.tuple_to_act(t)
class convlab2.nlu.svm.Tuples.tuples(config)

Bases: object

activeTuples(log_turn)
activeTuples_sent(log_turn)
distributionToNbest(tuple_distribution)
uactsToTuples(uacts)

convlab2.nlu.svm.dataset_walker module

class convlab2.nlu.svm.dataset_walker.Call(applog_filename, labels_filename)

Bases: object

class convlab2.nlu.svm.dataset_walker.dataset_walker(dataListFile, labels=False, dataroot=None)

Bases: object

convlab2.nlu.svm.sutils module

convlab2.nlu.svm.sutils.import_class(cl)
convlab2.nlu.svm.sutils.powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)
convlab2.nlu.svm.sutils.svm_to_libsvm(model, labels=None)

convlab2.nlu.svm.train module

convlab2.nlu.svm.train.train(config)
convlab2.nlu.svm.train.usage()

Module contents