1

I am using the qdap package in R to do a spell check. I run the below code and gives an output like this

which_misspelled("I use a 50Gb broadband connection") 

> 4           5 
>"gb" "broadband"

The words make sense but the corrections for these are irrelevant.Is there any option where we could give our custom words list for this function to not filter on ?

Jil Jung Juk
  • 690
  • 2
  • 9
  • 21

1 Answers1

3

The function which_misspelled() contains the argument dictionary = which defaults to qdapDictionaries::GradyAugmented. If your input of words isn't present in there, it will be considered misspelled.

If you want for example the word "gb" to be recognized as correct spelling, you should define a new dictionary :

library(qdap)
dict <- c(qdapDictionaries::GradyAugmented, "gb")
which_misspelled("I use a 50Gb broadband connection", dictionary = dict)
#          5 
#"broadband" 
mtoto
  • 23,919
  • 4
  • 58
  • 71