5ba1cdf0f2856ee17b96cfee9d1a40ed1785ebd7,graphbrain/parsers/parser.py,Parser,_parse_sentence,#Parser#Any#,31

Before Change


        raise NotImplementedError()

    def _parse_sentence(self, sent):
        try:
            self._before_parse_sentence()
            self.atom2token = {}
            main_edge, extra_edges = self._parse_token(sent.root)
            if main_edge:
                main_edge, _ = self._post_process(main_edge)

            return {"main_edge": main_edge,
                    "extra_edges": extra_edges,
                    "text": str(sent).strip(),
                    "spacy_sentence": sent}
        except Exception as e:
            logging.error("Caught exception: {} while parsing: "{}"".format(
                str(e), str(sent)))
            return {"main_edge": None,
                    "extra_edges": [],
                    "text": "",
                    "spacy_sentence": None}

    def parse(self, text):
        Transforms the given text into hyperedges + aditional information.
        Returns a sequence of dictionaries, with one dictionary for each
        sentence found in the text.

After Change


        raise NotImplementedError()

    def _parse_sentence(self, sent):
        raise NotImplementedError()

    def parse(self, text):
        Transforms the given text into hyperedges + aditional information.
        Returns a sequence of dictionaries, with one dictionary for each
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: graphbrain/graphbrain
Commit Name: 5ba1cdf0f2856ee17b96cfee9d1a40ed1785ebd7
Time: 2020-02-12
Author: telmo@telmomenezes.net
File Name: graphbrain/parsers/parser.py
Class Name: Parser
Method Name: _parse_sentence


Project Name: deepfakes/faceswap
Commit Name: 3e2976ab03a84417eb14827528b059c6e61d880b
Time: 2018-01-03
Author: github@clorr.fr
File Name: lib/cli.py
Class Name: DirectoryProcessor
Method Name: process_image


Project Name: BYU-PCCL/holodeck
Commit Name: 7369dc2ffcb9cc9b9c7104b4f1b6b24dec879aa8
Time: 2017-05-16
Author: Joshua Greaves
File Name: Holodeck/SimulatorAgent.py
Class Name: SimulatorAgent
Method Name: send_command