dfm = quanteda::tokens(c('That guy Gadaffi','Do you mean Kadaffi?',
'Nah more like Gadaffel','Not Kadaffel?')) |>
quanteda::dfm()
simmat = term_char_sim(colnames(dfm), same_start=0)
term_union(dfm, simmat, verbose = FALSE)
Run the code above in your browser using DataLab