0066f83bc6f9f3861119db2593c3007796d2056c,deeppavlov/models/seq2seq_go_bot/kb.py,KnowledgeBaseEntityNormalizer,denormalize,#KnowledgeBaseEntityNormalizer#Any#Any#,164
Before Change
def denormalize(self, key, tokens):
for entity, value in self.kb([key])[0]:
if entity in tokens:
entity_pos = tokens.index(entity)
// if value is string, split to tokens
if isinstance(value, str):
value = value.split()
tokens = tokens[:entity_pos] + value + tokens[entity_pos + 1:]
return tokens
def __call__(self,
keys: List[str],
After Change
def denormalize(self, tokens, entries):
for entity, ent_tokens in entries:
while (entity in tokens):
ent_pos = tokens.index(entity)
tokens = tokens[:ent_pos] + ent_tokens + tokens[ent_pos+1:]
return tokens
def __call__(self,
tokens_list: List[List[str]],
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: 0066f83bc6f9f3861119db2593c3007796d2056c
Time: 2018-08-30
Author: mary.vikhreva@gmail.com
File Name: deeppavlov/models/seq2seq_go_bot/kb.py
Class Name: KnowledgeBaseEntityNormalizer
Method Name: denormalize
Project Name: aleju/imgaug
Commit Name: 2a1bd4c93a998d16516d82893401b346d66a95e9
Time: 2019-07-19
Author: kontakt@ajung.name
File Name: imgaug/dtypes.py
Class Name:
Method Name: get_minimal_dtype
Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: 4c4154b05c43671d481d28f2d6b844084106c8af
Time: 2018-01-15
Author: donal.k.fellows@manchester.ac.uk
File Name: spynnaker/pyNN/connections/ethernet_control_connection.py
Class Name: EthernetControlConnection
Method Name: run
Project Name: tensorflow/transform
Commit Name: c3ca2456b96296326aa1d18f33ed72e8dd51ac5b
Time: 2019-09-01
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/analyzers.py
Class Name: QuantilesCombiner
Method Name: merge_accumulators