0066f83bc6f9f3861119db2593c3007796d2056c,deeppavlov/models/seq2seq_go_bot/kb.py,KnowledgeBase,load,#KnowledgeBase#,107

Before Change



    def load(self):
        log.info("[loading knowledge base from {}]".format(self.load_path))
        with self.load_path.open("rt", encoding="utf8") as fp:
            self.kb.update(json.load(fp))


@register("knowledge_base_entity_normalizer")
class KnowledgeBaseEntityNormalizer(Component):
    
    Uses instance of :class:`~deeppavlov.models.seq2seq_go_bot.kb.KnowledgeBase` to normalize or to undo normalization of entities in the input utterance.

After Change


    def load(self):
        log.info("[loading knowledge base from {}]".format(self.load_path))
        self.kb.update(json.load(self.load_path.open("rt")), primary_keys=False)
        self.primary_keys = json.load(self.load_path.with_suffix(".keys.json").open("rt"))


@register("knowledge_base_entity_normalizer")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: KnowledgeBase
Method Name: load


Project Name: hanxiao/bert-as-service
Commit Name: b2f502ce69fe253d1c2df6ce862e71df0f958985
Time: 2018-12-05
Author: hanhxiao@tencent.com
File Name: client/setup.py
Class Name:
Method Name:


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: KnowledgeBase
Method Name: save