Module Expr Str ImportFrom alias alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Index Num attr Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Index Num attr If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Num If BoolOpAnd AttributeLoad NameLoad attr CompareEq NameLoad Str body Assign NameStore Dict Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body Assign NameStore AttributeLoad Call NameLoad NameLoad ListLoad Str Str attr If CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr GeneratorExp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr GeneratorExp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr ListComp Dict NameLoad Num comprehension NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call SubscriptLoad NameLoad Index NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Dict Str AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr orelse If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr orelse If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
Script that converts feature files from one format to another

:author: Nitin Madnani (nmadnani@ets.org)
:date: September 2013
 __future__ print_function unicode_literals N/A argparse N/A logging N/A os N/A sys bs4 UnicodeDammit six PY2 skll.data.dict_vectorizer DictVectorizer skll.data.readers EXT_TO_READER skll.data.writers ARFFWriter DelimitedFileWriter LibSVMWriter EXT_TO_WRITER skll.version __version__ _pair_to_dict_tuple N/A N/A pair N/A N/A N/A 
    Little helper method for constructing mappings from feature/class names to
    numbers.
     N/A N/A number name N/A N/A pair split = N/A PY2 N/A N/A name N/A N/A name encode utf-8 N/A number N/A int number N/A N/A name number N/A main N/A N/A argv N/A None N/A N/A 
    Handles command line arguments and gets things started.

    :param argv: List of arguments, as if specified on the command-line.
                 If None, ``sys.argv[1:]`` is used instead.
    :type argv: list of str
     N/A parser N/A N/A argparse ArgumentParser description Takes an input feature file and converts it to another                      format. Formats are determined automatically from file                      extensions. formatter_class N/A argparse ArgumentDefaultsHelpFormatter N/A N/A N/A parser add_argument infile help input feature file (ends in .arff, .csv,                               .jsonlines, .libsvm, .megam, .ndj, or .tsv) N/A N/A N/A parser add_argument outfile help output feature file (ends in .arff, .csv,                               .jsonlines, .libsvm, .megam, .ndj, or .tsv) N/A N/A N/A parser add_argument -i --id_col help Name of the column which contains the instance                               IDs in ARFF, CSV, or TSV files. default id N/A N/A N/A parser add_argument -l --label_col help Name of the column which contains the class                               labels in ARFF, CSV, or TSV files. For ARFF                               files, this must be the final column to count as                              the label. default y N/A N/A N/A parser add_argument -q --quiet help Suppress printing of "Loading..." messages. action store_true N/A N/A N/A parser add_argument --arff_regression help Create ARFF files for regression, not                               classification. action store_true N/A N/A N/A parser add_argument --arff_relation help Relation name to use for ARFF file. default skll_relation N/A N/A N/A parser add_argument --reuse_libsvm_map help If you want to output multiple files that use                               the same mapping from labels and features to                               numbers when writing libsvm files, you can                               specify an existing .libsvm file to reuse the                               mapping from. type N/A N/A argparse FileType rb N/A N/A N/A parser add_argument --version action version version N/A N/A %(prog)s {0} format __version__ N/A args N/A N/A parser parse_args argv N/A N/A N/A logging captureWarnings True N/A N/A N/A logging basicConfig format %(asctime)s - %(name)s - %(levelname)s - %(message)s N/A logger N/A N/A logging getLogger __name__ N/A input_extension N/A N/A N/A N/A N/A N/A os path splitext N/A args infile N/A 1 lower N/A output_extension N/A N/A N/A N/A N/A N/A os path splitext N/A args outfile N/A 1 lower N/A N/A input_extension EXT_TO_READER N/A N/A N/A N/A logger error N/A N/A Input file must be in either .arff, .csv, .jsonlines, .libsvm, .megam, .ndj, or .tsv format. You specified: {} format input_extension N/A N/A N/A sys exit 1 N/A N/A N/A args reuse_libsvm_map N/A output_extension .libsvm N/A N/A feat_map N/A N/A label_map N/A N/A line N/A args reuse_libsvm_map N/A N/A line N/A N/A UnicodeDammit line N/A utf-8 windows-1252 unicode_markup N/A N/A # line N/A N/A N/A N/A logger error The LibSVM file you want to reuse the map from was not created by SKLL and does not actually contain the necessary mapping info. N/A N/A N/A sys exit 1 N/A comments N/A N/A N/A line split # N/A 1 N/A N/A _ label_map_str feat_map_str N/A N/A comments split | N/A N/A N/A feat_map update N/A N/A _pair_to_dict_tuple pair N/A pair N/A N/A N/A N/A feat_map_str strip split N/A N/A N/A label_map update N/A N/A _pair_to_dict_tuple pair N/A pair N/A N/A N/A N/A label_map_str strip split N/A feat_vectorizer N/A DictVectorizer N/A N/A N/A feat_vectorizer fit N/A N/A name 1 N/A name feat_map N/A N/A feat_vectorizer vocabulary_ feat_map N/A N/A feat_vectorizer None N/A label_map None N/A reader N/A N/A EXT_TO_READER N/A input_extension N/A args infile quiet N/A args quiet label_col N/A args label_col id_col N/A args id_col N/A feature_set N/A N/A reader read N/A writer_type N/A EXT_TO_WRITER N/A output_extension N/A writer_args N/A quiet N/A args quiet N/A N/A writer_type DelimitedFileWriter N/A N/A N/A writer_args N/A label_col N/A args label_col N/A N/A writer_args N/A id_col N/A args id_col N/A N/A N/A writer_type ARFFWriter N/A N/A N/A writer_args N/A label_col N/A args label_col N/A N/A writer_args N/A id_col N/A args id_col N/A N/A writer_args N/A regression N/A args arff_regression N/A N/A writer_args N/A relation N/A args arff_relation N/A N/A N/A writer_type LibSVMWriter N/A N/A N/A writer_args N/A label_map label_map N/A writer N/A writer_type N/A args outfile feature_set writer_args N/A N/A N/A writer write N/A N/A N/A __name__ __main__ N/A N/A N/A main