Module Import alias ImportFrom alias Import alias identifier ImportFrom alias alias If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Lambda arguments args NameParam defaults ListComp Call AttributeLoad Call AttributeLoad NameLoad attr attr Str comprehension NameStore NameLoad orelse Assign NameStore Lambda arguments args NameParam defaults ListComp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr BinOpDiv Call AttributeLoad CompareEq NameLoad Num attr Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Print BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr BinOpDiv Call AttributeLoad CompareEq NameLoad Num attr Call NameLoad Call NameLoad NameLoad
N/A N/A argparse collections defaultdict N/A numpy np glove Glove metrics N/A N/A __name__ __main__ N/A N/A parser N/A N/A argparse ArgumentParser description Evaluate a trained GloVe model on an analogy task. N/A N/A N/A parser add_argument --test -t action store required True help The filename of the analogy test set. N/A N/A N/A parser add_argument --model -m action store required True help The filename of the stored GloVe model. N/A N/A N/A parser add_argument --encode -e action store_true default False help If True, words from the evaluation set will be utf-8 encoded before looking them up in the model dictionary N/A N/A N/A parser add_argument --parallelism -p action store default 1 help Number of parallel threads to use N/A args N/A N/A parser parse_args N/A glove N/A N/A Glove load N/A args model N/A N/A args encode N/A N/A encode N/A N/A N/A words N/A N/A N/A N/A N/A N/A x lower encode utf-8 N/A x words N/A N/A encode N/A N/A N/A words N/A N/A N/A unicode N/A N/A x lower N/A x words N/A sections N/A defaultdict list N/A evaluation_words N/A N/A N/A N/A sections N/A section append N/A encode words N/A N/A section words N/A N/A metrics read_analogy_file N/A args test N/A section_ranks N/A N/A N/A section words N/A N/A sections items N/A N/A evaluation_ids N/A N/A metrics construct_analogy_test_set words N/A glove dictionary ignore_missing True N/A ranks N/A N/A metrics analogy_rank_score evaluation_ids N/A glove word_vectors no_threads N/A int N/A args parallelism N/A N/A N/A section_ranks append ranks N/A N/A Section %s mean rank: %s, accuracy: %s N/A section N/A N/A ranks mean N/A N/A N/A N/A ranks 0 sum N/A float N/A len ranks N/A ranks N/A N/A np hstack section_ranks N/A N/A Overall rank: %s, accuracy: %s N/A N/A N/A ranks mean N/A N/A N/A N/A ranks 0 sum N/A float N/A len ranks