03b0e7061cf477fbeccb9c128ee76603df582d86,scripts/word_embeddings/evaluate_pretrained.py,,,#,159
Before Change
token_embedding._idx_to_vec = token_embedding._idx_to_vec[:size]
token_embedding._token_to_idx = {
token: idx
for idx, token in enumerate(token_embedding._idx_to_token)
}
similarity_results = evaluation.evaluate_similarity(
args_, token_embedding, ctx, logfile=os.path.join(
After Change
name = ""
enforce_max_size(token_embedding_, args_.max_vocab_size)
known_tokens = set(token_embedding_.idx_to_token)
// Auto-extend token_embedding with unknown extra eval tokens
if token_embedding_.unknown_lookup is not None:
eval_tokens = evaluation.get_tokens_in_evaluation_datasets(args_)
// pylint: disable=pointless-statement
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: dmlc/gluon-nlp
Commit Name: 03b0e7061cf477fbeccb9c128ee76603df582d86
Time: 2018-09-04
Author: leonard@lausen.nl
File Name: scripts/word_embeddings/evaluate_pretrained.py
Class Name:
Method Name:
Project Name: hyperopt/hyperopt
Commit Name: ff6c598abad81aec828e6a5967d2c6cfc5779a19
Time: 2011-10-21
Author: james.bergstra@gmail.com
File Name: hyperopt/theano_bandit_algos.py
Class Name: TheanoBanditAlgo
Method Name: recall
Project Name: kmike/pymorphy2
Commit Name: c4537a1a3f223b5129862ae41f1fa955fc6acff9
Time: 2012-11-23
Author: kmike84@gmail.com
File Name: pymorphy2/tagset.py
Class Name: OpencorporaTag
Method Name: _init_restrictions
Project Name: ilastik/ilastik
Commit Name: 8861dfa21d1cfd487b7a6eb7508885f084f58e6c
Time: 2019-07-10
Author: tomaz.vieira@embl.de
File Name: ilastik/applets/dataSelection/datasetInfoEditorWidget.py
Class Name: DatasetInfoEditorWidget
Method Name: __init__