MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / getParentAndChild

Function getParentAndChild

union/Santos/preprocess_yago.py:10–21  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

8from collections import defaultdict
9
10def getParentAndChild(line):
11 triple = line.replace(",","temp_placeholder")
12 triple = triple.lower().split('\t',maxsplit = 4)
13 child = triple[0].replace("temp_placeholder",",")
14 child = child.strip()
15 tempList = child.rsplit("/",1)
16 child = tempList[-1][:-1]
17 parent = triple[2].replace("temp_placeholder",",")
18 parent = parent.strip()
19 tempList = parent.rsplit("/",1)
20 parent = tempList[-1][:-1]
21 return (parent, child)
22
23def findSubClasses(path):
24 i = 1

Callers 2

findSubClassesFunction · 0.85
findAllEdgesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected