ropensci / spelling

Tools for Spell Checking in R
https://docs.ropensci.org/spelling
Other
107 stars 25 forks source link

contractions are spelling errors? #1

Closed patperry closed 5 years ago

patperry commented 6 years ago
> spelling::spell_check_text("this package doesn't like contractions like isn't, aren't")
   word found
1  aren     1
2 doesn     1
3   isn     1
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin16.7.0 (64-bit)
Running under: macOS Sierra 10.12.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] corpus_0.9.1.9000

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12    roxygen2_6.0.1  lattice_0.20-35 digest_0.6.12  
 [5] crayon_1.3.2    withr_2.0.0     commonmark_1.2  grid_3.4.1     
 [9] R6_2.2.2        magrittr_1.5    stringi_1.1.5   testthat_1.0.2 
[13] xml2_1.1.1      Matrix_1.2-10   devtools_1.13.1 tools_3.4.1    
[17] stringr_1.2.0   hunspell_2.5    compiler_3.4.1  spelling_1.0   
[21] memoise_1.1.0  
MichaelChirico commented 6 years ago

+1

This is inherited from the underlying hunspell library, however. Fix might be best to go through there.

I guess for now the right thing to do is add the contractions to your wordlist.

jeroen commented 5 years ago

I think this was fixed in hunspell 2.9? I'm no longer seeing this:

>  spelling::spell_check_text("this package doesn't like contractions like isn't, aren't")
[1] word  found
<0 rows> (or 0-length row.names)

Assuming this is OK now, if it is not fixed, please open a new issue!