Module TryExcept body Import alias identifier handlers ExceptHandler body Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body If CompareEq AttributeLoad NameLoad attr Str body AugAssignAdd SubscriptStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index AttributeLoad NameLoad attr Index Call AttributeLoad SubscriptLoad Call AttributeLoad Call NameLoad NameLoad NameLoad Str attr Str Index Num attr Num For NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad attr Num Index Num Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Pass Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad Num For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Num For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Num Assign AttributeStore NameLoad attr Dict For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot CompareIn NameLoad AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Pass
N/A N/A N/A N/A cPickle pickle N/A N/A N/A N/A pickle N/A re feature_extractor FeatureExtractor unidecode unidecode collections defaultdict Counter nltk.util ngrams N/A alphanum N/A N/A re compile [\W_]+ N/A kCLASSIFIER_FIELDS N/A category ans_type gender Classifier N/A FeatureExtractor N/A __init__ N/A N/A self bigram_path question_db N/A N/A N/A N/A self _qdb question_db N/A N/A self _bigrams N/A N/A pickle load N/A open bigram_path rb N/A N/A self _majority N/A N/A N/A self _frequencies N/A defaultdict dict N/A N/A self _cache None N/A N/A self _fv None N/A N/A self _pd None N/A N/A self _classifiers N/A N/A N/A self _name classifier N/A N/A N/A self add_classifier data/classifier/category.pkl category N/A N/A N/A self add_classifier data/classifier/ans_type.pkl ans_type N/A N/A N/A self add_classifier data/classifier/gender.pkl gender N/A N/A N/A self cache_majorities category N/A N/A N/A self cache_majorities ans_type N/A N/A N/A self cache_majorities gender N/A cache_majorities N/A N/A self attribute N/A N/A N/A N/A N/A self _majority N/A attribute N/A defaultdict Counter N/A all_questions N/A N/A N/A self _qdb questions_with_pages N/A page all_questions N/A N/A qq N/A all_questions N/A page N/A N/A N/A N/A qq fold train N/A N/A N/A N/A N/A N/A self _majority N/A attribute N/A N/A qq page N/A N/A N/A N/A N/A N/A N/A getattr qq attribute split : N/A 0 lower 1 N/A page N/A N/A self _majority N/A attribute N/A N/A N/A N/A N/A self _majority N/A attribute N/A page N/A N/A N/A N/A N/A N/A N/A self _majority N/A attribute N/A page most_common 1 N/A 0 N/A 0 N/A add_classifier N/A N/A self classifier_path column N/A N/A N/A N/A N/A self _classifiers N/A column N/A N/A pickle load N/A open classifier_path rb N/A vw_from_title N/A N/A self title text N/A N/A N/A pd N/A N/A self featurize text N/A val N/A |classifier N/A cc N/A self _classifiers N/A N/A majority N/A N/A N/A self _majority N/A cc N/A title N/A pd N/A N/A self _pd N/A cc N/A N/A N/A N/A N/A val append N/A %s_maj:%f N/A cc N/A N/A pd prob majority N/A N/A N/A N/A N/A N/A N/A join val N/A featurize N/A N/A self text N/A N/A N/A N/A N/A hash text N/A self _cache N/A N/A N/A self _cache N/A hash text N/A feats N/A N/A total N/A N/A alphanum sub N/A unidecode N/A N/A text lower N/A total N/A N/A total split N/A bgs N/A set N/A ngrams total 2 N/A bg N/A N/A bgs intersection N/A self _bigrams N/A N/A N/A feats N/A bg 1.0 N/A word total N/A N/A N/A feats N/A word 1.0 N/A N/A self _pd N/A N/A cc N/A self _classifiers N/A N/A N/A N/A self _pd N/A cc N/A N/A N/A N/A self _classifiers N/A cc prob_classify feats N/A N/A self _pd N/A majority N/A N/A self guess N/A N/A N/A N/A N/A guess N/A self _majority N/A N/A cc N/A self _classifiers N/A N/A N/A N/A N/A self _majority N/A guess N/A cc N/A N/A N/A self _qdb majority_frequency guess cc N/A N/A N/A self _majority N/A guess N/A N/A N/A N/A __name__ __main__ N/A N/A