Nachtzuster / BirdNET-Pi

A realtime acoustic bird classification system for the Raspberry Pi 5, 4B 3B+ 0W2 and more. Built on the TFLite version of BirdNET.
https://birdnetpi.com
Other
169 stars 24 forks source link

Sci_Name not correct when its Com_Name is contained within another name #186

Closed alexbelgium closed 2 months ago

alexbelgium commented 2 months ago

Example : Faucon crécerelle has "Falco tinuncullus" as latin name, and Faucon crécerelette has "Falco naumanni" The detailed birds page (for example clicking a species in recording) shows "Falco naumanni" for Faucon Crécerelle. Same for "Pic vert" which has the latin name of "Pic vert et cendré"

At first glance, the function that converts Com_Name to Sci_Name does a full text search but does not include end of line, which means that if it encounters a species that contains its com_name it will return it as response even if not correct

https://github.com/Nachtzuster/BirdNET-Pi/blob/714519b35bb5bd98a80aadcd016f06436bddb8cc/scripts/common.php#L106-L118