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

Unexpected results while searching & filtering by label and typeName #14

Open
sergejsrk opened this issue Nov 10, 2022 · 1 comment
Open

Comments

@sergejsrk
Copy link

I am trying to get all resources that have type "City" and whose label has "Rig" inside it.
To do it I created the following query
https://lookup.dbpedia.org/api/search?typeName=City&label=Rig

As far as I understand typeName=City says that we will get only resources that have type City and label=Rig says that we will get only resources that have substring Rig inside label.

However, when I run this query, one of the results I get is as follows:

<Result>
<Label>London</Label>
<URI>http://dbpedia.org/resource/London</URI>
<Description>London is the capital and largest ...</Description>
<Classes>
<Class>

So it is a resource that has label London, and this label obviously does not contain substring Rig.

The question is why London is inside the results.
Is there a way to specify a query that would return just objects belonging to a given type, such that they have a given substring inside label?

Thanks in advance!

@holycrab13
Copy link
Contributor

Insanely late to the party, but the current lookup is a little bit misconfigured. The document of London received some score for matching its typeName field to City in your query. You can override any configuration variable in your query though:

https://lookup.dbpedia.org/api/search?typeName=City&label=Rig&typeNameWeight=0

does the trick, since typeNameWeight=0 tells the scorer that the typeName match is great but not worth anything scorewise.

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