Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Type constraints should be smoother #30

Open
wetneb opened this issue Dec 13, 2017 · 2 comments
Open

Type constraints should be smoother #30

wetneb opened this issue Dec 13, 2017 · 2 comments

Comments

@wetneb
Copy link
Owner

wetneb commented Dec 13, 2017

Currently, candidates whose type does not match the target type (via subclasses) are only included if no other candidate of the right type was found, and with a score divided by two. But some types are arguably closer than others, like "university" and "school" are close to each other while not being subclasses of each other. "school" and "tombstone" are further apart.

Figure out a way to return penalized candidates whose type is "close" to the target type (for an appropriate notion of proximity).

@thadguidry
Copy link
Contributor

Check with Magnus on this. His function to populate the Classification panel will probably be useful to look at. Usually the last 3 subclasses on the chain are the ones that your looking for in terms of domain "proximity" from what I have found. https://tools.wmflabs.org/reasonator/?&q=3918

His source here: https://bitbucket.org/magnusmanske/reasonator/src/d0003cf209b95eccc4dc2eea3b73ddac8ff72706/public_html/main.js?at=master&fileviewer=file-view-default#main.js-669

@thadguidry
Copy link
Contributor

thadguidry commented Dec 13, 2017

The other way to do this would be through "relatedness" via properties, rather than classes. https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries#Properties_registered_as_properties_for_this_type_.28P1963.29_for_a_class_or_its_super-classes
But those kind of queries used to take FOREVER. But perhaps they are indexed now ? Dunno.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants