EOL/eol_php_code — pull request #67 by hyanwong (2013-10-02 14:37:40+00:00)
Title: Allow wikimedia multiple taxonomies

This is a series of rather major changes that improve the recent wikimedia parsing code and allow for files which have multiple organisms flagged up in the same file. Previously we were just picking a single taxonomy: these changes means we can pick up proper taxonomy in files such as http://commons.wikimedia.org/wiki/File:Carpodacus_cassinii.jpg or http://commons.wikimedia.org/wiki/File:Tiger chasing a deer.jpg

However, it also means that we may get multiple taxonomies for the same species, e.g. http://commons.wikimedia.org/wiki/File:Pulsatilla_vulgaris0.jpg which occurs in a wikimedia gallery for Pulsatilla vulgaris but in the wiki category Anemone pulsatilla (these are synonyms in this case). This could be considered either a good or a bad thing.

What is definitely bad is that we get a few erroneous taxonomies, e.g. http://commons.wikimedia.org/wiki/File:Chlamys_sp.1_-_Fosil.JPG which is classified as both Category:Chlamys and Category:Fossil Chlamys. The latter category is in "kingdom: Fossils", which causes it to be treated as a different taxonomy to "kingdom: animalia". But the current code is an improvement, as at least it doesn't pick a single one of the taxonomies at random to represent the file.