LimaRAF / plantR

An R Package for Managing Species Records from Biological Collections
GNU General Public License v3.0
18 stars 4 forks source link

Problem while handling first family name with preposition #92

Open LimaRAF opened 2 years ago

LimaRAF commented 2 years ago

Check function code related to the problem below:

plantR::prepTDWG("Maria Souza da Silva", get.initials = FALSE, get.prep = TRUE)
[1] "Silva, Maria Souza da" # ok

plantR::prepTDWG("Maria Souza da Silva", get.initials = FALSE, get.prep = TRUE, format = "init_last")
[1] "Maria Souza da Silva" # ok

plantR::prepTDWG("Maria da Silva Souza", get.initials = FALSE, get.prep = TRUE)
[1] "Souza, Maria Silva" # preposition removed! 

plantR::prepTDWG("Maria da Silva Souza", get.initials = FALSE, get.prep = TRUE, format = "init_last")
[1] "Maria Silva Souza" # preposition removed!
LimaRAF commented 1 month ago

Veja esse post para idéais de como lidar melhor e mais eficientemente com as variantes de nomes usando regex:

https://pt.stackoverflow.com/questions/242948/validar-nome-e-sobrenome-com-express%C3%A3o-regular