-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Describe the bug
A clear and concise description of what the bug is.
In the code, Following code is used to check whether the input string is an entity:
def get_neighbors(variable: Union[Variable, str], relation: str, sparql_executor):
if not isinstance(variable, Variable):
if not re.match(r'^(m|f)\.[\w_]+$', variable):
raise ValueError("get_neighbors: variable must be a variable or an entity")I would like to point out that, according to this, An entity can only starts with 'm' or 'g'. There is no entity in dataset starts with 'f', but do exist entity starts with 'g', such as "The True Story of the Three Little Pigs" in the ./data/knowledgegraph/std.json.
To Reproduce
Check out the entity id of "The True Story of the Three Little Pigs" in the ./data/knowledgegraph/std.json. I copy the entities field of the data as bellow.
"entities": {
"Adam Sandler": "m.0pz91",
"The True Story of the Three Little Pigs": "g.11b5lzm6b0"
}Screenshots or Terminal Copy&Paste
See above
Desktop (please complete the following information):
- OS: [Ubuntu 22.04]
- Python: [3.11]
Additional context
I would like to kindly point out that there exists lots of bug in the task kg, such as splitling the parameters list of an API using comma will wrongly split the name of an entity with comma in it. But I think the whole project is amazing. Thanks for the contribution! I really learn a lot from it.