hunspell

How to use hunspell package to suggest correct words in a column in R?

血红的双手。 提交于 2020-06-16 06:07:58
问题 I'm currently working with a large data frame containing lots of text in each row and would like to effectively identify and replace misspelled words in each sentence with the hunspell package. I was able to identify the misspelled words, but can't figure out how to do hunspell_suggest on a list. Here is an example of the data frame: df1 <- data.frame("Index" = 1:7, "Text" = c("A complec sentence joins an independet", "Mary and Samantha arived at the bus staton before noon", "I did not see

Problem with adding custom words to hunspell dictionary in R

风流意气都作罢 提交于 2020-05-17 07:25:08
问题 I was able to figure out how to add custom words into the hunspell dictionary in R. However, I'm not sure why it's not being used in spell checking. Here is what I used: library(hunspell) #adding custom words into hunspell dictionary hunspell::dictionary(lang = "en_US", affix = NULL, add_words = "bing", cache = TRUE) but hunspell("bing") still determine "bing" is incorrect. Anyone have experience with this before? Thanks. 回答1: The dictionary() function returns a new dictionary that you can

How to check spelling in Hunspell with case insensitive

大憨熊 提交于 2020-01-24 09:41:53
问题 Hi I am making a desktop application (C#) that checks the spelling of the inputted word. I am using Hunspell which I added to my project using NuGet. I have 2 files the aff file and the dic file. using (Hunspell english = new Hunspell("en_US.aff", "en_US.dic")) { bool isExist = english.Spell("THesis"); } isExist is equal to false because in my .dic file the correct spelling is "thesis". Even I use to .lower() and input proper names the isExist become false. Can you help me in solving this?

How to check spelling in Hunspell with case insensitive

非 Y 不嫁゛ 提交于 2020-01-24 09:41:49
问题 Hi I am making a desktop application (C#) that checks the spelling of the inputted word. I am using Hunspell which I added to my project using NuGet. I have 2 files the aff file and the dic file. using (Hunspell english = new Hunspell("en_US.aff", "en_US.dic")) { bool isExist = english.Spell("THesis"); } isExist is equal to false because in my .dic file the correct spelling is "thesis". Even I use to .lower() and input proper names the isExist become false. Can you help me in solving this?

Windows directory that will never contain non-ASCII characters for temp file?

余生长醉 提交于 2020-01-06 14:27:37
问题 Using MinGW 7.3.0 on Windows, Hunspell can't load the dictionary files from locations that have non-ASCII characters because of Windows limitations. I've tried everything[1] and I'm now resorting to copying the file to a path without ASCII characters before giving it to Hunspell. What is a good location to copy it to? [1] Windows requires wchar_t support for std::iostream.open() to work right, which MinGW does not implement std::filesystem can solve this, but only available in GCC 8 Hunspell

Dynamically linked DLL is loaded immediately after starting the application

筅森魡賤 提交于 2020-01-06 10:20:51
问题 I've dynamically linked libhunspell.dll (HunSpell) to my application. It works, but there is a dumb problem which I don't know why it happens. Even before I use LoadLibrary("path\\to\\libhunspell.dll"); to load it and use it, on the start of the application it attempts to load the library by itself. If I place the libhunspell.dll into the path where my main executable resides, it can load it, otherwise it reports an error, immediately after starting the application - This application has

Dynamically linked DLL is loaded immediately after starting the application

。_饼干妹妹 提交于 2020-01-06 10:16:12
问题 I've dynamically linked libhunspell.dll (HunSpell) to my application. It works, but there is a dumb problem which I don't know why it happens. Even before I use LoadLibrary("path\\to\\libhunspell.dll"); to load it and use it, on the start of the application it attempts to load the library by itself. If I place the libhunspell.dll into the path where my main executable resides, it can load it, otherwise it reports an error, immediately after starting the application - This application has

Call a program via shell_exec with utf-8 text input

馋奶兔 提交于 2019-12-30 12:16:11
问题 Perquisites: hunspell and php5 . Test code from bash: user@host ~/ $ echo 'sagadījās' | hunspell -d lv_LV,en_US Hunspell 1.2.14 + sagadīties - works properly. Test code (test.php): $encoding = "lv_LV.utf-8"; setlocale(LC_CTYPE, $encoding); // test putenv('LANG='.$encoding); // and another test $raw_response = shell_exec("LANG=$encoding; echo 'sagadījās' | hunspell -d lv_LV,en_US"); echo $raw_response; returns Hunspell 1.2.14 & sagad 5 0: tagad, sagad?ties, sagaudo, sagand?, sagar?o * *

Call a program via shell_exec with utf-8 text input

Deadly 提交于 2019-12-30 12:16:05
问题 Perquisites: hunspell and php5 . Test code from bash: user@host ~/ $ echo 'sagadījās' | hunspell -d lv_LV,en_US Hunspell 1.2.14 + sagadīties - works properly. Test code (test.php): $encoding = "lv_LV.utf-8"; setlocale(LC_CTYPE, $encoding); // test putenv('LANG='.$encoding); // and another test $raw_response = shell_exec("LANG=$encoding; echo 'sagadījās' | hunspell -d lv_LV,en_US"); echo $raw_response; returns Hunspell 1.2.14 & sagad 5 0: tagad, sagad?ties, sagaudo, sagand?, sagar?o * *