EnquistLab / RTNRS

R package for the (plant) Taxonomic Name Resolution Service
https://bien.nceas.ucsb.edu/bien/tools/tnrs/
Other
8 stars 0 forks source link

Unlisted Warnings Question #12

Closed jtmiller28 closed 7 months ago

jtmiller28 commented 2 years ago

Hello, I was wondering how exactly to interpret warnings that fall outside of the ones described here: https://tnrs.biendata.org/warnings/ My query generated some of these, but also unlisted ones : 3, 5, 6, 7.

Providing example for uncertain warnings

warning_three <- TNRS("Iris tenax subsp. tenax", sources = c("wfo","tropicos"), 
                      classification = "wfo", 
                      mode = "resolve", 
                      matches = "best", 
                      accuracy = NULL)

print(warning_three$Warnings)

warning_five <- TNRS("Fauchea laciniata var. pygmaea", sources = c("wfo","tropicos"), 
                      classification = "wfo", 
                      mode = "resolve", 
                      matches = "best", 
                      accuracy = NULL)

print(warning_five$Warnings)

warning_six <- TNRS("Prionitis australis", sources = c("wfo","tropicos"), 
                      classification = "wfo", 
                      mode = "resolve", 
                      matches = "best", 
                      accuracy = NULL)

print(warning_six$Warnings)

warning_seven <- TNRS("Valerianella congesta var. trigona Suksd.", sources = c("wfo","tropicos"), 
                      classification = "wfo", 
                      mode = "resolve", 
                      matches = "best", 
                      accuracy = NULL)

print(warning_seven$Warnings)

Thanks!

ojalaquellueva commented 7 months ago

Just noticed this while cleaning out old issues. Here's the PHP code block that translates the integer warning codes for the API:

static $warning_text=array(
    '0'=>'',
    '1'=>'[Partial]',
    '2'=>'[Ambiguous]',
    '4'=>'[HigherTaxa]',
    '8'=>'[Overall]',
    '3'=>'[Partial] [Ambiguous]',
    '5'=>'[Partial] [HigherTaxa]',
    '9'=>'[Partial] [Overall]',
    '6'=>'[Ambiguous] [HigherTaxa]',
    '10'=>'[Ambiguous] [Overall]',
    '12'=>'[HigherTaxa] [Overall]',
    '7'=>'[Partial] [Ambiguous] [HigherTaxa]',
    '11'=>'[Partial] [Ambiguous] [Overall]',
    '13'=>'[Partial] [HigherTaxa] [Overall]',
    '14'=>'[Ambiguous] [HigherTaxa] [Overall]',
    '15'=>'[Partial] [Ambiguous] [HigherTaxa] [Overall]'
);

@bmaitner Don't you translate these integer warnings to plain English now? If not, you can read them directly from API results field WarningsEng. The online TNRS (https://tnrs.biendata.org) displays just the plain english warnings now, not the codes.

ojalaquellueva commented 7 months ago

@bmaitner This is basically a documentation issue. Please close if resolved.