3698e34abfd6215605a21f28bb61dba872c5cc63,nlp_architect/data/cdc_resources/relations/referent_dict_relation_extraction.py,ReferentDictRelationExtraction,__init__,#ReferentDictRelationExtraction#,31

Before Change


            self.ref_dict = load_json_file(ref_dict)
        elif method == OnlineOROfflineMethod.ONLINE:
            self.ref_dict = self.load_reference_dict(ref_dict)
        logger.info("ReferentDict module lead successfully")
        super(ReferentDictRelationExtraction, self).__init__()

    def extract_all_relations(self, mention_x: MentionDataLight,
                              mention_y: MentionDataLight) -> Set[RelationType]:

After Change


            ref_dict (required): str Location of referent dictionary file to work with
        
        logger.info("Loading ReferentDict module")
        if ref_dict is not None and os.path.isfile(ref_dict):
            if method == OnlineOROfflineMethod.OFFLINE:
                self.ref_dict = load_json_file(ref_dict)
            elif method == OnlineOROfflineMethod.ONLINE:
                self.ref_dict = self.load_reference_dict(ref_dict)
            logger.info("ReferentDict module lead successfully")
        else:
            raise FileNotFoundError("Referent Dict file not found or not in path..")

        super(ReferentDictRelationExtraction, self).__init__()

    def extract_all_relations(self, mention_x: MentionDataLight,
                              mention_y: MentionDataLight) -> Set[RelationType]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NervanaSystems/nlp-architect
Commit Name: 3698e34abfd6215605a21f28bb61dba872c5cc63
Time: 2018-11-10
Author: alon.eirew@intel.com
File Name: nlp_architect/data/cdc_resources/relations/referent_dict_relation_extraction.py
Class Name: ReferentDictRelationExtraction
Method Name: __init__


Project Name: deepmipt/DeepPavlov
Commit Name: 7227b3fd871f87f9ed7367ebfb5ed086ff7820f3
Time: 2019-10-03
Author: mironov.sergey@huawei.com
File Name: deeppavlov/core/trainers/nn_trainer.py
Class Name: NNTrainer
Method Name: _validate


Project Name: NervanaSystems/nlp-architect
Commit Name: 3698e34abfd6215605a21f28bb61dba872c5cc63
Time: 2018-11-10
Author: alon.eirew@intel.com
File Name: nlp_architect/data/cdc_resources/relations/verbocean_relation_extraction.py
Class Name: VerboceanRelationExtraction
Method Name: __init__