intent.scripts.classification package

Submodules

intent.scripts.classification.ctn_to_classifier module

intent.scripts.classification.ctn_to_classifier.eval_classifier(c, inst_list, context_feats=False, posdict=None)[source]
Parameters:
  • c – The classifier
  • inst_list – A list of Igt instances to test against. Must already have POS tags.
intent.scripts.classification.ctn_to_classifier.eval_proj(xc)[source]
intent.scripts.classification.ctn_to_classifier.fix_ctn_gloss_line(inst, tag_method=None)[source]

Given a CTN gloss line, do some specific fixes to attempt to fix the CTN tag mapping.

Parameters:inst

:type inst:RGIgt

intent.scripts.classification.feature_ablation module

Created on Oct 1, 2014

@author: rgeorgi

intent.scripts.classification.feature_ablation.ablation(**c)[source]
intent.scripts.classification.feature_ablation.produce_files(**c)[source]
intent.scripts.classification.feature_ablation.test_feature(**c)[source]
intent.scripts.classification.feature_ablation.test_results(**c)[source]

intent.scripts.classification.test_classifier module

intent.scripts.classification.test_classifier.nfold_xaml()[source]

intent.scripts.classification.xigt_to_classifier module

exception intent.scripts.classification.xigt_to_classifier.ClassifierException[source]

Bases: Exception

intent.scripts.classification.xigt_to_classifier.chunk_to_features(chunk, tag_method=None, posdict=None, context_feats=False)[source]

Method to extract the gloss-line classifier features from a subset of instances. (Useful for parallelizing)

Parameters:
  • inst (RGIgt) –
  • tag_method
  • posdict
  • feat_path
  • context_feats
intent.scripts.classification.xigt_to_classifier.create_dicts(filelist, class_out, **kwargs)[source]

Given a list of XIGT files, extract the gloss POS tags from them, then create a classifier.

Parameters:filelist
intent.scripts.classification.xigt_to_classifier.instances_to_classifier(instances, class_out_path, tag_method=None, posdict=None, feat_path=None, context_feats=False)[source]

Given a list of IGT instances, create a gloss-line classifier from them.

Parameters:
  • instances (list[RGIgt]) –
  • class_out_path (str) –
  • tag_method
  • posdict
  • feat_path – Path to specify where to write out the svmlight-format feature file. If it is none, use a temp file.
intent.scripts.classification.xigt_to_classifier.process_dicts(class_path)[source]

Module contents