151f9e7d141372ce45fc4367b81385eeccc95093,sequenceLabelling/preprocess.py,,to_vector_simple_with_elmo,#Any#Any#Any#Any#Any#,256
Before Change
if num_norm:
word = _normalize_num(word)
x[i,:] = np.concat(
embeddings.get_word_vector(word).astype("float32"),
x_elmo[i]
)
After Change
padding token vector when appropriate
subtokens = []
for i in range(0, len(tokens)):
local_tokens = []
for j in range(0, min(len(tokens[i]), maxlen)):
if lowercase:
local_tokens.append(_lower(tokens[i][j]))
else:
local_tokens.append(tokens[i][j])
subtokens.append(local_tokens)
return embeddings.get_sentence_vector_with_ELMo(subtokens)
def to_casing_single(tokens, maxlen=300):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: kermitt2/delft
Commit Name: 151f9e7d141372ce45fc4367b81385eeccc95093
Time: 2018-06-20
Author: patrice.lopez@science-miner.com
File Name: sequenceLabelling/preprocess.py
Class Name:
Method Name: to_vector_simple_with_elmo
Project Name: librosa/librosa
Commit Name: 7faab20caee8d81f82ea323c675dd7fd3a983942
Time: 2014-01-23
Author: brm2132@columbia.edu
File Name: librosa/core.py
Class Name:
Method Name: stft
Project Name: rtavenar/tslearn
Commit Name: 0537b722ea3bd3740ebb53226214cd67d92f2913
Time: 2019-05-28
Author: johann.faouzi@icm-institute.org
File Name: tslearn/metrics.py
Class Name:
Method Name: itakura_mask