1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 17:02:03 +02:00

(v2.1.1.9220) unit test

This commit is contained in:
2025-03-19 16:13:43 +01:00
parent 755e6f43b7
commit 79f56ad8a4
6 changed files with 6 additions and 6 deletions

2
R/ab.R
View File

@ -358,7 +358,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
FUN.VALUE = double(1),
ab_df$generalised_synonyms,
function(y) {
ifelse(length(y[nchar(y) >= 5]) == 0,
ifelse(all(is.na(y)) || length(y[nchar(y) >= 5]) == 0,
999,
min(as.double(utils::adist(x[i], y[nchar(y) >= 5],
ignore.case = FALSE,