ba4c25a77488026fb6212790c4d460e2c76db326,graphbrain/cognition/agents/wikipedia.py,Wikipedia,run,#Wikipedia#,52
Before Change
if len(paragraph) == 0:
continue
parse_results = parser.parse(paragraph)
for parse in parse_results["parses"]:
main_edge = parse["resolved_corefs"]
// add main edge
if main_edge:
// attach text to edge
text = parse["text"]
attr = {"text": text}
yield create_op(main_edge, sequence=sequence, position=pos,
attributes=attr)
self.edges += 1
pos += 1
// add extra edges
for edge in parse["extra_edges"]:
yield create_op(edge)
for edge in parse_results["inferred_edges"]:
yield create_op(edge, count=True)
def report(self):
After Change
if len(paragraph) == 0:
continue
for op in self.system.parse_results2ops(parser.parse(paragraph),
sequence=sequence,
pos=pos):
yield op
def report(self):
rep_str = ("edges found: {}".format(self.edges))
return "{}\n\n{}".format(rep_str, super().report())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 25
Instances
Project Name: graphbrain/graphbrain
Commit Name: ba4c25a77488026fb6212790c4d460e2c76db326
Time: 2021-01-09
Author: telmo@telmomenezes.net
File Name: graphbrain/cognition/agents/wikipedia.py
Class Name: Wikipedia
Method Name: run
Project Name: graphbrain/graphbrain
Commit Name: ba4c25a77488026fb6212790c4d460e2c76db326
Time: 2021-01-09
Author: telmo@telmomenezes.net
File Name: graphbrain/cognition/agents/txt_parser.py
Class Name: TxtParser
Method Name: parse_text
Project Name: graphbrain/graphbrain
Commit Name: ba4c25a77488026fb6212790c4d460e2c76db326
Time: 2021-01-09
Author: telmo@telmomenezes.net
File Name: graphbrain/cognition/agents/csv_parser.py
Class Name: CsvParser
Method Name: _parse_row
Project Name: graphbrain/graphbrain
Commit Name: ba4c25a77488026fb6212790c4d460e2c76db326
Time: 2021-01-09
Author: telmo@telmomenezes.net
File Name: graphbrain/cognition/agents/wikipedia.py
Class Name: Wikipedia
Method Name: run