AtlasOfLivingAustralia / ala-bie-hub

BIE (Biodiversity Information Explorer) hub - merge of old ala-bie and bie-plugin
Mozilla Public License 2.0
1 stars 5 forks source link

Species name presented incorrectly in Classification tab #121

Closed Sherrin-ALA closed 1 week ago

Sherrin-ALA commented 1 month ago

In the classification tab for the species Christinus sp. 'Cape Le Grand' (https://bie.ala.org.au/species/ALA_DR22912_1145#classification) the name is getting re-written in the hierarchy and is presented as as cultivar:

Christinus cv. 'Cape Le Grand'

This is incorrect.

adam-collins commented 1 month ago

ala-bie-hub is making a mistake while attempting to identify what part of the name should be in italics (see the function doing the rewrite). The fault is in ala-name-matching-model:4.2 class PhraseNameParser. This class extends GBIFNameParser in name-parser:2.24.

Attempted the following

  1. Using parse(name, rank) function instead of parse(name) throws an unparseable exception for the example given.
  2. Using parse(name) or parse(name, rank) in a more recent name-parser:3.11.0 is also unsuccessful.

The general solution is to fix the dependency:

  1. Raise an issue in name-parser. Follow this through to a new version containing the fix.
  2. Raise an issue in ala-name-matching. Follow this through to a new version containing fix.
  3. Add a comment on this issue with the ala-name-matching version that has the fix.

One alternate solution would be to use SOLR fields scientificName (italicised) and scientificNameAuthorship (unitalicised) instead of PhraseNameParser.parse. This makes the assumption that canonicalNameWithMarker() does not add anything required as scientificName is sufficient.

How should this proceed?

adam-collins commented 1 week ago

Closing this issue.

I expect the new species page UI specification for ala-bie-hub's replacement will arrive before the name-parser change makes it way to the ala-name-matching release.