Skip to content

[Bug/Assistance] The wrong entity pattern in task knowledgegraph #181

Open

Description

@caixd-220529

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.

Activity

  1. added
    bug
    help wanted
    on Jan 18, 2025
  2. changed the title [-][Bug/Assistance] The wrong entity in taskknowledgegraph[/-] [+][Bug/Assistance] The wrong entity pattern in task knowledgegraph[/+] on Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions