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

Seeking for suggestions #68

Closed
nxznm opened this issue Jan 4, 2022 · 2 comments
Closed

Seeking for suggestions #68

nxznm opened this issue Jan 4, 2022 · 2 comments

Comments

@nxznm
Copy link

nxznm commented Jan 4, 2022

Dear authors,
Sorry to bother you. Recently, I seek to use this tool in my project to find rules. However, I meet a confusing situation.
Here is the simplified situation. I construct triples with codes below:

triples = []
for i in range(0, 200):
    e1 = "a{}".format(i*3)
    e2 = "b{}".format(i*3+1)
    e3 = "c{}".format(i*3+2)
    triples.append([e1, "equalTo", e2])
    triples.append([e2, "biggestCity", e3])
    triples.append([e3, "country", e2])

Then, I use java -jar amie-milestone-intKB.jar rules.txt --minpca 0.8 --htr equalTo --maxad 5 to obtain 2 rules:

?m  biggestCity  ?g  ?g  country  ?b  ?a  equalTo  ?m   => ?a  equalTo  ?b      1       1       1      200      200     200     -1
?b  biggestCity  ?h  ?h  country  ?n  ?a  equalTo  ?n   => ?a  equalTo  ?b      1       1       1      200      200     200     -1

However, the 2 mined rules seem meaningless. I find that the instantiation of ?m always equals to ?b in the groundings of rule-1 and the instantiation of ?n always equals to ?b in the groundings of rule-2.
If we add a constraint that different variables (e.g., ?m and ?b) should obtain different instantiations, maybe these meaningless rules would not be found anymore. I am not sure about this, do you have any ideas? Thanks!

@lgalarra
Copy link
Collaborator

lgalarra commented Jan 4, 2022

Hi,

Indeed, AMIE does not mine injective rules by default (rules where a value is allowed to appear once in a rule mapping). To do so, you have to run AMIE using the injective mappings assistant. You can find information on how to enable them in AMIE here: #30 (comment)

Do not hesitate to ask for more help if required.

Cheers,
Luis

@nxznm
Copy link
Author

nxznm commented Jan 5, 2022

I got it! Thanks for your patience :)

@nxznm nxznm closed this as completed Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants