Module Expr Str Import alias Import alias Import alias identifier Import alias identifier Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str FunctionDef arguments args defaults body Expr Str Print Str With Call NameLoad BinOpMod Str NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad BinOpMod Str NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Print Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad keyword Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad keyword Str Print Str Assign TupleStore NameStore NameStore Call NameLoad Print Str Assign NameStore Dict Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Call NameLoad BinOpAdd NameLoad Str Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Num For NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr body Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad BinOpMult Num SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Str Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr body If NameLoad body Print NameLoad Assign NameStore BinOpAdd BinOpDiv Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Num For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Slice NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad BinOpAdd NameLoad Num Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad BinOpAdd NameLoad Num Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Str orelse Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword Str For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad Num body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index SubscriptLoad NameLoad Index NameLoad orelse Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If NameLoad body Assign SubscriptStore NameLoad Index TupleLoad Num NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign SubscriptStore NameLoad Index TupleLoad Num NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad Call AttributeLoad NameLoad attr TupleLoad BinOpAdd Call NameLoad NameLoad Num Call NameLoad NameLoad keyword Str Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad Call AttributeLoad NameLoad attr TupleLoad BinOpAdd Call NameLoad NameLoad Num Call NameLoad NameLoad keyword Str orelse Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad keyword Str Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad keyword Str If NameLoad body For NameStore Call NameLoad Call NameLoad NameLoad body AugAssignDiv SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad AugAssignDiv SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call NameLoad NameLoad ListLoad NameLoad AugAssignDiv NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice Num Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore SubscriptLoad NameLoad Slice NameLoad Print BinOpAdd Str NameLoad Print Str For TupleStore NameStore NameStore Call NameLoad NameLoad body Print NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpDiv NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice Num Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore SubscriptLoad NameLoad Slice NameLoad Print BinOpAdd Str NameLoad Print Str For TupleStore NameStore NameStore Call NameLoad NameLoad body Print NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Continue Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list Assign NameStore Dict Str TupleLoad Str Str FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index NameLoad Return TupleLoad Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call SubscriptLoad Call NameLoad SubscriptLoad NameLoad Index Str Index Num NameLoad NameLoad keyword Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call SubscriptLoad Call NameLoad SubscriptLoad NameLoad Index Str Index Num NameLoad NameLoad keyword Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str Assign NameStore Call SubscriptLoad Call NameLoad SubscriptLoad NameLoad Index Str Index Num NameLoad NameLoad keyword Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call SubscriptLoad Call NameLoad SubscriptLoad NameLoad Index Str Index Num NameLoad NameLoad NameLoad keyword Str keyword NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call SubscriptLoad Call NameLoad SubscriptLoad NameLoad Index Str Index Num NameLoad NameLoad NameLoad keyword Str keyword NameLoad Assign NameStore Call SubscriptLoad Call NameLoad SubscriptLoad NameLoad Index Str Index Num NameLoad NameLoad NameLoad keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body If CompareEq NameLoad NameLoad body Assign NameStore NameLoad If BoolOpAnd CompareEq NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword UnaryOpUSub NameLoad keyword NameLoad keyword TupleLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Expr Str If CompareEq NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareEq NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad keyword Num Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str Call AttributeLoad Call AttributeLoad NameLoad attr TupleLoad BinOpMult Num NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call NameLoad NameLoad Call NameLoad NameLoad keyword Num Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str Call AttributeLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad kwarg body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Assign NameStore Num Assign NameStore SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad Str attr Index Num If CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq AttributeLoad NameLoad attr Num body Return SubscriptLoad NameLoad ExtSlice Slice Slice Slice BinOpMult NameLoad NameLoad BinOpMult BinOpAdd NameLoad Num NameLoad Return SubscriptLoad NameLoad ExtSlice Slice Slice BinOpMult NameLoad NameLoad BinOpMult BinOpAdd NameLoad Num NameLoad decorator_list Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Call NameLoad NameLoad Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Call NameLoad NameLoad Str Assign NameStore SubscriptLoad NameLoad Index Call NameLoad NameLoad Str Assign NameStore SubscriptLoad NameLoad Index Call NameLoad NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AugAssignAdd NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Num NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad BinOpMult BinOpSub Num NameLoad NameLoad Assign NameStore BinOpAdd BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad BinOpMult SubscriptLoad BinOpSub Num NameLoad ExtSlice Slice Index NameLoad NameLoad Return NameLoad decorator_list Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad Call AttributeLoad NameLoad attr Num NameLoad NameLoad keyword ListLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Call NameLoad NameLoad Str keyword Call NameLoad NameLoad Str keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore ListLoad NameLoad Return NameLoad decorator_list
N/A N/A 
Skip-thought vectors
 N/A os N/A theano N/A theano.tensor tensor N/A cPickle pkl N/A numpy N/A copy N/A nltk collections OrderedDict defaultdict scipy.linalg norm nltk.tokenize word_tokenize N/A profile False N/A path_to_models /u/rkiros/public_html/models/ N/A path_to_tables /u/rkiros/public_html/models/ N/A path_to_umodel N/A path_to_models uni_skip.npz N/A path_to_bmodel N/A path_to_models bi_skip.npz load_model N/A N/A N/A N/A N/A 
    Load the model with saved tables
     N/A Loading model parameters... N/A N/A open N/A %s.pkl path_to_umodel rb f N/A N/A uoptions N/A N/A pkl load f N/A N/A open N/A %s.pkl path_to_bmodel rb f N/A N/A boptions N/A N/A pkl load f N/A uparams N/A init_params uoptions N/A uparams N/A load_params path_to_umodel uparams N/A utparams N/A init_tparams uparams N/A bparams N/A init_params_bi boptions N/A bparams N/A load_params path_to_bmodel bparams N/A btparams N/A init_tparams bparams N/A Compiling encoders... N/A N/A embedding x_mask ctxw2v N/A build_encoder utparams uoptions N/A f_w2v N/A N/A theano function N/A embedding x_mask ctxw2v name f_w2v N/A N/A embedding x_mask ctxw2v N/A build_encoder_bi btparams boptions N/A f_w2v2 N/A N/A theano function N/A embedding x_mask ctxw2v name f_w2v2 N/A Loading tables... N/A N/A utable btable N/A load_tables N/A Packing up... N/A model N/A N/A N/A model N/A uoptions uoptions N/A N/A model N/A boptions boptions N/A N/A model N/A utable utable N/A N/A model N/A btable btable N/A N/A model N/A f_w2v f_w2v N/A N/A model N/A f_w2v2 f_w2v2 N/A model N/A load_tables N/A N/A N/A N/A N/A 
    Load the tables
     N/A words N/A N/A utable N/A N/A numpy load N/A path_to_tables utable.npy N/A btable N/A N/A numpy load N/A path_to_tables btable.npy N/A f N/A open N/A path_to_tables dictionary.txt rb N/A line f N/A N/A N/A N/A words append N/A N/A N/A N/A line decode utf-8 strip N/A N/A N/A f close N/A utable N/A OrderedDict N/A zip words utable N/A btable N/A OrderedDict N/A zip words btable N/A N/A utable btable N/A encode N/A N/A model X use_norm verbose batch_size use_eos N/A True True 128 False N/A N/A 
    Encode sentences in the list X. Each entry will return a vector
     N/A X N/A preprocess X N/A d N/A defaultdict N/A N/A N/A N/A 0 N/A w N/A N/A N/A model N/A utable keys N/A N/A N/A d N/A w 1 N/A ufeatures N/A N/A numpy zeros N/A N/A len X N/A N/A model N/A uoptions N/A dim dtype float32 N/A bfeatures N/A N/A numpy zeros N/A N/A len X N/A 2 N/A N/A model N/A boptions N/A dim dtype float32 N/A ds N/A defaultdict list N/A captions N/A N/A N/A s split N/A s X N/A N/A i s N/A enumerate captions N/A N/A N/A N/A N/A ds N/A N/A len s append i N/A k N/A N/A ds keys N/A N/A verbose N/A N/A k N/A numbatches N/A N/A N/A len N/A ds N/A k batch_size 1 N/A minibatch N/A range numbatches N/A N/A caps N/A N/A ds N/A k N/A minibatch numbatches N/A use_eos N/A N/A uembedding N/A N/A numpy zeros N/A N/A k 1 N/A len caps N/A N/A model N/A uoptions N/A dim_word dtype float32 N/A bembedding N/A N/A numpy zeros N/A N/A k 1 N/A len caps N/A N/A model N/A boptions N/A dim_word dtype float32 N/A N/A uembedding N/A N/A numpy zeros N/A k N/A len caps N/A N/A model N/A uoptions N/A dim_word dtype float32 N/A bembedding N/A N/A numpy zeros N/A k N/A len caps N/A N/A model N/A boptions N/A dim_word dtype float32 N/A N/A ind c N/A enumerate caps N/A N/A caption N/A captions N/A c N/A j N/A range N/A len caption N/A N/A N/A N/A d N/A N/A caption N/A j 0 N/A N/A N/A uembedding N/A N/A j ind N/A N/A model N/A utable N/A N/A caption N/A j N/A N/A bembedding N/A N/A j ind N/A N/A model N/A btable N/A N/A caption N/A j N/A N/A N/A uembedding N/A N/A j ind N/A N/A model N/A utable N/A UNK N/A N/A bembedding N/A N/A j ind N/A N/A model N/A btable N/A UNK N/A use_eos N/A N/A N/A uembedding N/A N/A -1 ind N/A N/A model N/A utable N/A <eos> N/A N/A bembedding N/A N/A -1 ind N/A N/A model N/A btable N/A <eos> N/A use_eos N/A N/A uff N/A N/A model N/A f_w2v uembedding N/A N/A numpy ones N/A N/A N/A len caption 1 N/A len caps dtype float32 N/A bff N/A N/A model N/A f_w2v2 bembedding N/A N/A numpy ones N/A N/A N/A len caption 1 N/A len caps dtype float32 N/A N/A uff N/A N/A model N/A f_w2v uembedding N/A N/A numpy ones N/A N/A len caption N/A len caps dtype float32 N/A bff N/A N/A model N/A f_w2v2 bembedding N/A N/A numpy ones N/A N/A len caption N/A len caps dtype float32 N/A use_norm N/A N/A j N/A range N/A len uff N/A N/A N/A uff N/A j N/A norm N/A uff N/A j N/A N/A bff N/A j N/A norm N/A bff N/A j N/A N/A ind c N/A enumerate caps N/A N/A N/A ufeatures N/A c N/A uff N/A ind N/A N/A bfeatures N/A c N/A bff N/A ind N/A features N/A N/A numpy c_ N/A N/A ufeatures bfeatures N/A features N/A preprocess N/A N/A text N/A N/A N/A 
    Preprocess text for encoder
     N/A X N/A N/A sent_detector N/A N/A N/A nltk data load tokenizers/punkt/english.pickle N/A t text N/A N/A sents N/A N/A sent_detector tokenize t N/A result N/A s sents N/A N/A tokens N/A word_tokenize s N/A result N/A N/A N/A join tokens N/A N/A N/A X append result N/A X N/A nn N/A N/A model text vectors query k N/A 5 N/A N/A 
    Return the nearest neighbour sentences to query
    text: list of sentences
    vectors: the corresponding representations for text
    query: a string to search
     N/A qf N/A encode model N/A query N/A qf N/A norm qf N/A scores N/A N/A N/A N/A numpy dot qf N/A vectors T flatten N/A sorted_args N/A N/A N/A numpy argsort scores N/A -1 N/A sentences N/A N/A text N/A a N/A a N/A sorted_args N/A k N/A N/A QUERY:  query N/A NEAREST:  N/A N/A i s N/A enumerate sentences N/A N/A s N/A sorted_args N/A i N/A word_features N/A N/A table N/A N/A N/A 
    Extract word features into a normalized matrix
     N/A features N/A N/A numpy zeros N/A N/A len table 620 dtype float32 N/A keys N/A N/A table keys N/A i N/A range N/A len table N/A N/A f N/A table N/A N/A keys N/A i N/A N/A features N/A i N/A f N/A norm f N/A features N/A nn_words N/A N/A table wordvecs query k N/A 10 N/A N/A 
    Get the nearest neighbour words
     N/A keys N/A N/A table keys N/A qf N/A table N/A query N/A scores N/A N/A N/A N/A numpy dot qf N/A wordvecs T flatten N/A sorted_args N/A N/A N/A numpy argsort scores N/A -1 N/A words N/A N/A keys N/A a N/A a N/A sorted_args N/A k N/A N/A QUERY:  query N/A NEAREST:  N/A N/A i w N/A enumerate words N/A N/A w N/A _p N/A N/A pp name N/A N/A N/A 
    make prefix-appended name
     N/A N/A %s_%s N/A pp name N/A init_tparams N/A N/A params N/A N/A N/A 
    initialize Theano shared variables according to the initial parameters
     N/A tparams N/A OrderedDict N/A N/A kk pp N/A N/A params iteritems N/A N/A N/A tparams N/A kk N/A N/A theano shared N/A params N/A kk name kk N/A tparams N/A load_params N/A N/A path params N/A N/A N/A 
    load parameters
     N/A pp N/A N/A numpy load path N/A N/A kk vv N/A N/A params iteritems N/A N/A N/A kk pp N/A N/A N/A N/A warnings warn N/A %s is not in the archive kk N/A N/A N/A params N/A kk N/A pp N/A kk N/A params N/A N/A layers N/A gru N/A param_init_gru gru_layer get_layer N/A N/A name N/A N/A N/A fns N/A layers N/A name N/A N/A N/A eval N/A fns N/A 0 N/A eval N/A fns N/A 1 N/A init_params N/A N/A options N/A N/A N/A 
    initialize all parameters needed for the encoder
     N/A params N/A OrderedDict N/A N/A params N/A Wemb N/A norm_weight N/A options N/A n_words_src N/A options N/A dim_word N/A params N/A N/A N/A get_layer N/A options N/A encoder N/A 0 options params prefix encoder nin N/A options N/A dim_word dim N/A options N/A dim N/A params N/A init_params_bi N/A N/A options N/A N/A N/A 
    initialize all paramters needed for bidirectional encoder
     N/A params N/A OrderedDict N/A N/A params N/A Wemb N/A norm_weight N/A options N/A n_words_src N/A options N/A dim_word N/A params N/A N/A N/A get_layer N/A options N/A encoder N/A 0 options params prefix encoder nin N/A options N/A dim_word dim N/A options N/A dim N/A params N/A N/A N/A get_layer N/A options N/A encoder N/A 0 options params prefix encoder_r nin N/A options N/A dim_word dim N/A options N/A dim N/A params N/A build_encoder N/A N/A tparams options N/A N/A N/A 
    build an encoder, given pre-computed word embeddings
     N/A embedding N/A N/A tensor tensor3 embedding dtype float32 N/A x_mask N/A N/A tensor matrix x_mask dtype float32 N/A proj N/A N/A N/A get_layer N/A options N/A encoder N/A 1 tparams embedding options prefix encoder mask x_mask N/A ctx N/A N/A proj N/A 0 N/A -1 N/A N/A embedding x_mask ctx N/A build_encoder_bi N/A N/A tparams options N/A N/A N/A 
    build bidirectional encoder, given pre-computed word embeddings
     N/A embedding N/A N/A tensor tensor3 embedding dtype float32 N/A embeddingr N/A embedding N/A -1 N/A x_mask N/A N/A tensor matrix x_mask dtype float32 N/A xr_mask N/A x_mask N/A -1 N/A proj N/A N/A N/A get_layer N/A options N/A encoder N/A 1 tparams embedding options prefix encoder mask x_mask N/A projr N/A N/A N/A get_layer N/A options N/A encoder N/A 1 tparams embeddingr options prefix encoder_r mask xr_mask N/A ctx N/A N/A tensor concatenate N/A N/A N/A proj N/A 0 N/A -1 N/A N/A projr N/A 0 N/A -1 axis 1 N/A N/A embedding x_mask ctx N/A ortho_weight N/A N/A ndim N/A N/A N/A W N/A N/A N/A numpy random randn ndim ndim N/A N/A u s v N/A N/A N/A numpy linalg svd W N/A N/A N/A u astype float32 N/A norm_weight N/A N/A nin nout scale ortho N/A None 0.1 True N/A N/A N/A nout None N/A N/A nout nin N/A N/A N/A nout nin ortho N/A N/A W N/A ortho_weight nin N/A N/A W N/A N/A N/A numpy random uniform low N/A scale high scale size N/A nin nout N/A N/A N/A W astype float32 N/A param_init_gru N/A N/A options params prefix nin dim N/A gru None None N/A N/A 
    parameter init for GRU
     N/A N/A nin None N/A N/A nin N/A options N/A dim_proj N/A N/A dim None N/A N/A dim N/A options N/A dim_proj N/A W N/A N/A numpy concatenate N/A N/A norm_weight nin dim N/A norm_weight nin dim axis 1 N/A N/A params N/A N/A _p prefix W W N/A N/A params N/A N/A _p prefix b N/A N/A N/A N/A numpy zeros N/A N/A 2 dim astype float32 N/A U N/A N/A numpy concatenate N/A N/A ortho_weight dim N/A ortho_weight dim axis 1 N/A N/A params N/A N/A _p prefix U U N/A Wx N/A norm_weight nin dim N/A N/A params N/A N/A _p prefix Wx Wx N/A Ux N/A ortho_weight dim N/A N/A params N/A N/A _p prefix Ux Ux N/A N/A params N/A N/A _p prefix bx N/A N/A N/A N/A numpy zeros N/A dim astype float32 N/A params N/A gru_layer N/A N/A tparams state_below options prefix mask N/A gru None kwargs N/A N/A 
    Forward pass through GRU layer
     N/A nsteps N/A N/A state_below shape N/A 0 N/A N/A N/A state_below ndim 3 N/A N/A n_samples N/A N/A state_below shape N/A 1 N/A N/A n_samples 1 N/A dim N/A N/A N/A tparams N/A N/A _p prefix Ux shape N/A 1 N/A N/A mask None N/A N/A mask N/A N/A tensor alloc 1.0 N/A N/A state_below shape N/A 0 1 _slice N/A N/A _x n dim N/A N/A N/A N/A N/A _x ndim 3 N/A N/A N/A _x N/A N/A N/A N/A N/A n dim N/A N/A n 1 dim N/A N/A _x N/A N/A N/A N/A n dim N/A N/A n 1 dim N/A N/A state_below_ N/A N/A N/A tensor dot state_below N/A tparams N/A N/A _p prefix W N/A tparams N/A N/A _p prefix b N/A state_belowx N/A N/A N/A tensor dot state_below N/A tparams N/A N/A _p prefix Wx N/A tparams N/A N/A _p prefix bx N/A U N/A tparams N/A N/A _p prefix U N/A Ux N/A tparams N/A N/A _p prefix Ux _step_slice N/A N/A m_ x_ xx_ h_ U Ux N/A N/A N/A preact N/A N/A tensor dot h_ U N/A preact x_ N/A r N/A N/A N/A tensor nnet sigmoid N/A _slice preact 0 dim N/A u N/A N/A N/A tensor nnet sigmoid N/A _slice preact 1 dim N/A preactx N/A N/A tensor dot h_ Ux N/A preactx N/A preactx r N/A preactx N/A preactx xx_ N/A h N/A N/A tensor tanh preactx N/A h N/A N/A u h_ N/A N/A 1.0 u h N/A h N/A N/A N/A m_ N/A N/A N/A None h N/A N/A N/A 1.0 m_ N/A N/A N/A None h_ N/A h N/A N/A seqs N/A mask state_below_ state_belowx N/A _step _step_slice N/A N/A rval updates N/A N/A theano scan _step sequences seqs outputs_info N/A N/A N/A tensor alloc 0.0 n_samples dim non_sequences N/A N/A tparams N/A N/A _p prefix U N/A tparams N/A N/A _p prefix Ux name N/A _p prefix _layers n_steps nsteps profile profile strict True N/A rval N/A rval N/A rval N/A