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

Cat shown in game that was marked as subspecies of cat before #85

Open
PiotrGackowski opened this issue Apr 19, 2023 · 4 comments
Open

Comments

@PiotrGackowski
Copy link
Contributor

Today I got
https://commons.wikimedia.org/w/index.php?title=File:THA_%D0%A8%D0%B8%D0%BF%D0%BE%D0%B2%D0%BD%D0%B8%D0%BA_%D0%B8%D0%B7_%D0%A2%D0%B0%D0%B9%D1%81%D0%BA%D0%BE%D0%B9_%D0%94%D0%B8%D0%BD%D0%B0%D1%81%D1%82%D0%B8%D0%B8_(4498887257).jpg&action=history
in game about cats. Problem is that I marked this image with https://www.wikidata.org/wiki/Q42732 in January. So I should not get this image in game.

On margin - I probably finished all cats. Yes - all cats. It took me 4 months but now only new images should be shown. Or I am thinking that this is true :)

@PiotrGackowski PiotrGackowski changed the title Cat that was marked as subspecies of cat before Cat shown in game that was marked as subspecies of cat before Apr 19, 2023
@addshore
Copy link
Owner

Did you try getting wikicrowd to make an edit?
Currently, questions are pre generated based on the state of information at the time of generation.
Questions are then mostly randomly selected, this means some can actually be in the queue for quite some time.
Infomation on commons or wikidata can change in this time a question its in the queue, but the question will still always be posed to a user.
However, if the users answer results in an edit that is no redundant, it will not be made by wikicrowd.

@PiotrGackowski
Copy link
Contributor Author

@addshore Two things - yes, I was being able to save edits by wikicrowd. You can see this in the history of the image - the last edit with "cat" is done by wikicrowd. And previous edit is done by me using AC/DC.

Second - I am 100% sure that this was not a stale proposition. In the history of the image, you can see that the previous edit was done in January. In meantime I was many times clearing the whole queue for "cat", around my report it was daily (sometimes two times per day). My goal was to finish all cats, so this was important to me.

@addshore
Copy link
Owner

Looking at the 2 edits however, https://www.wikidata.org/wiki/Q42732 is an instance of cat breed which I have a feeling doesn't directly link back to 'cat via the expected paths
I think something like this was touched on in another open issue already? but I can't see or find it right now
If not maybe we should re open this as there is probably a way to also exclude adding things like this, we just need a way to connect the cat tree of entities with the cat breed tree.

I guess using this relation
image

The queries in question right now are at

private function instancesOfAndSubclassesOf( string $itemId ) : array {
$query = (new \Addwiki\Wikibase\Query\WikibaseQueryFactory(
"https://query.wikidata.org/sparql",
PrefixSets::WIKIDATA
))->newWikibaseQueryService();
$result = $query->query( "SELECT DISTINCT ?i WHERE{?i wdt:P31/wdt:P279*|wdt:P279/wdt:P279* wd:${itemId} }" );
$ids = [];
foreach ( $result['results']['bindings'] as $binding ) {
$ids[] = $this->getLastPartOfUrlPath( $binding['i']['value'] );
}
return $ids;
}
private function parentInstancesOfAndSubclassesOf( string $itemId ) : array {
$query = (new \Addwiki\Wikibase\Query\WikibaseQueryFactory(
"https://query.wikidata.org/sparql",
PrefixSets::WIKIDATA
))->newWikibaseQueryService();
$result = $query->query( "SELECT DISTINCT ?i WHERE{wd:${itemId} wdt:P279+ ?i }" );
$ids = [];
foreach ( $result['results']['bindings'] as $binding ) {
$ids[] = $this->getLastPartOfUrlPath( $binding['i']['value'] );
}
return $ids;
}

Which are used to look for more specific and less specific depicts statements, so that the current one should not be proposed
if( in_array( $entityId->getSerialization(), $this->instancesOfAndSubclassesOf ) ) {
$foundDepicts['moreSpecific']++;
continue;
}
if( in_array( $entityId->getSerialization(), $this->parentInstancesOfAndSubclassesOf ) ) {
$lessSpecificValue = $entityId;
$foundDepicts['lessSpecific']++;
continue;
}

So this query needs to be modified to include specific breeds for cat, and I also guess for other animals if we want wikicrowd to stop adding them
https://query.wikidata.org/#SELECT%20DISTINCT%20%3Fi%20WHERE%7B%3Fi%20wdt%3AP31%2Fwdt%3AP279%2a%7Cwdt%3AP279%2Fwdt%3AP279%2a%20wd%3AQ146%20%7D
In theroy we should also modify the other query which is used to generate the depics refine statement, but the above one is the core query for this issue

@addshore
Copy link
Owner

Comparing cameras and cats for example

Cameras all seem to link up to "Camera" via the sub and super classes and instances

image

Cats and breeds are 1 step away

image

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

No branches or pull requests

2 participants