1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 10:21:54 +02:00

(v1.0.1.9006) added generic CLSI rules

This commit is contained in:
2020-04-14 14:12:31 +02:00
parent d1cb7d3b6f
commit 7a6f819232
23 changed files with 4318 additions and 496 deletions

11
R/ab.R
View File

@ -253,7 +253,7 @@ as.ab <- function(x, ...) {
next
}
}
if (!isFALSE(list(...)$initial_search)) {
# transform back from other languages and try again
x_translated <- paste(lapply(strsplit(x[i], "[^a-zA-Z0-9 ]"),
@ -294,6 +294,15 @@ as.ab <- function(x, ...) {
}
}
# try by removing all trailing capitals
if (x[i] %like_case% "[a-z]+[A-Z]+$") {
found <- suppressWarnings(as.ab(gsub("[A-Z]+$", "", x[i])))
if (length(found) > 0 & !is.na(found)) {
x_new[i] <- found[1L]
next
}
}
# not found
x_unknown <- c(x_unknown, x_bak[x[i] == x_bak_clean][1])
}