Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
caixd-220529 opened this issue Jan 18, 2025 · 0 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@caixd-220529
Copy link

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.

@caixd-220529 caixd-220529 added bug Something isn't working help wanted Extra attention is needed labels Jan 18, 2025
@caixd-220529 caixd-220529 changed the title [Bug/Assistance] The wrong entity in taskknowledgegraph [Bug/Assistance] The wrong entity pattern in task knowledgegraph Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant