mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 06:30:48 +01:00
(v1.0.1.9006) added generic CLSI rules
This commit is contained in:
1 parent
d1cb7d3b6f
commit
7a6f819232
23 files changed
+4318
-496
No files matched your search
@@ -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])
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user