Module Expr Str Import alias Import alias Import alias ImportFrom alias Import alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call NameLoad NameLoad Str NameStore body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpAdd Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call NameLoad NameLoad Str NameStore body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad While CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list Assign NameStore Dict Str Str Num Num Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults NameLoad body If NameLoad body Assert CompareEq Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad If Call AttributeLoad NameLoad attr Str body Return Num orelse If Call AttributeLoad NameLoad attr Str body Return Num orelse Return SubscriptLoad NameLoad Index NameLoad decorator_list Assign NameStore Str Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Assign NameStore Str Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Expr Call NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad keyword NameLoad Print Call AttributeLoad NameLoad attr keyword ListLoad Str keyword Num Print Call AttributeLoad NameLoad attr Str Str
N/A N/A 
word2vec embeddings start with a line with the number of lines (tokens?) and 
the number of dimensions of the file. This allows gensim to allocate memory 
accordingly for querying the model. Larger dimensions mean larger memory is 
held captive. Accordingly, this line has to be inserted into the GloVe 
embeddings file.
 N/A os N/A shutil N/A hashlib sys platform N/A gensim prepend_line N/A N/A infile outfile line N/A N/A N/A  
	Function use to prepend lines using bash utilities in Linux. 
	(source: http://stackoverflow.com/a/10850588/610569)
	 N/A N/A open infile r old N/A N/A N/A open outfile w new N/A N/A N/A N/A new write N/A N/A str line N/A N/A N/A shutil copyfileobj old new N/A prepend_slow N/A N/A infile outfile line N/A N/A N/A 
	Slower way to prepend the line by re-creating the inputfile.
	 N/A N/A open infile r fin N/A N/A N/A open outfile w fout N/A N/A N/A N/A fout write N/A line N/A line fin N/A N/A N/A N/A fout write line N/A checksum N/A N/A filename N/A N/A N/A 
	This is to verify the file checksum is the same as the glove files we use to
	pre-computed the no. of lines in the glove file(s).
	 N/A BLOCKSIZE 65536 N/A hasher N/A N/A hashlib md5 N/A N/A open filename rb afile N/A N/A buf N/A N/A afile read BLOCKSIZE N/A N/A N/A len buf 0 N/A N/A N/A N/A hasher update buf N/A buf N/A N/A afile read BLOCKSIZE N/A N/A N/A hasher hexdigest N/A N/A pretrain_num_lines N/A glove.840B.300d.txt glove.42B.300d.txt 2196017 1917494 N/A pretrain_checksum N/A glove.6B.300d.txt glove.twitter.27B.50d.txt glove.42B.300d.txt glove.6B.50d.txt glove.6B.100d.txt glove.twitter.27B.25d.txt glove.6B.200d.txt glove.840B.300d.txt glove.twitter.27B.100d.txt glove.twitter.27B.200d.txt b78f53fb56ec1ce9edc367d2e6186ba4 6e8369db39aa3ea5f7cf06c1f3745b06 01fcdb413b93691a7a26180525a12d6e 0fac3659c38a4c0e9432fe603de60b12 dd7f3ad906768166883176d69cc028de f38598c6654cba5e6d0cef9bb833bdb1 49fa83e4a287c42c6921f296a458eb80 eec7d467bccfa914726b51aac484d43a ccbdddec6b9610196dd2e187635fee63 e44cdc3e10806b5137055eeb08850569 check_num_lines_in_glove N/A N/A filename check_checksum N/A False N/A N/A check_checksum N/A N/A N/A N/A checksum filename N/A pretrain_checksum N/A filename N/A N/A N/A filename startswith glove.6B. N/A N/A 400000 N/A N/A N/A N/A filename startswith glove.twitter.27B. N/A N/A 1193514 N/A N/A N/A pretrain_num_lines N/A filename N/A N/A glove_file glove.840B.300d.txt N/A N/A _ tokens dimensions _ N/A N/A glove_file split . N/A num_lines N/A check_num_lines_in_glove glove_file N/A dims N/A int N/A dimensions N/A -1 N/A gensim_file glove_model.txt N/A gensim_first_line N/A N/A {} {} format num_lines dims N/A N/A N/A platform linux N/A platform linux2 N/A N/A N/A prepend_line glove_file gensim_file gensim_first_line N/A N/A N/A prepend_slow glove_file gensim_file gensim_first_line N/A model N/A N/A N/A N/A gensim models Word2Vec load_word2vec_format gensim_file binary False N/A N/A N/A model most_similar positive N/A australia topn 10 N/A N/A N/A model similarity woman man