2013-09-30 32 views
3

儘管功能aspell標配了utils程序包,但它對我來說似乎不起作用。我繼續得到相同的錯誤:Aspell錯誤:找不到合適的拼寫檢查程序

aspell("love") 
Error in aspell("love") : No suitable spell-checker program found 

有什麼想法?

> sessionInfo() 
R version 3.0.1 (2013-05-16) 
Platform: i386-w64-mingw32/i386 (32-bit) 

locale: 
[1] LC_COLLATE=Dutch_Belgium.1252 LC_CTYPE=Dutch_Belgium.1252 
[3] LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C     
[5] LC_TIME=Dutch_Belgium.1252  

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

我的第一個想法是:請提供一個[最小,可重現的示例](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610)告訴我們你試過的代碼。謝謝! – Henrik

+0

只是通常的例子,用一個詞 – OB83

+0

你甚至不會告訴我們你正在使用什麼操作系統,這與你的問題似乎很相關。 – juba

回答

2

你看了aspellhelp page

如果你讀它,你會發現program說法:

program a character string giving the name (if on the system path) or full path of the spell check program to be used, or NULL (default). By default, the system path is searched for aspell, hunspell and ispell (in that order), and the first one found is used.

你也將讀取詳細部分如下:

The spell check programs employed must support the so-called Ispell pipe interface activated via command line option -a. In addition to the programs, suitable dictionaries need to be available. See http://aspell.net , http://hunspell.sourceforge.net/ and http://lasr.cs.ucla.edu/geoff/ispell.html , respectively, for obtaining the Aspell, Hunspell and (International) Ispell programs and dictionaries.

+0

謝謝,你幫我找了一些有用的字典,我可以加載(詞)庫。在win7上安裝aspel hunspell仍然看起來很神祕。 – OB83

3

對於初學者來說,功能aspell("love")是不合適的。請在inside-r.org參考正確的函數調用。然而,這不是你的大障礙。你得到No suitable spell-checker program found錯誤的原因是因爲,正如你和@juba在這裏暗示的那樣,缺少aspell()的安裝。請考慮以下事項以進行正確的安裝。

步驟1.下載aspell的Win32從下面的鏈接(是的,這是古) http://ftp.gnu.org/gnu/aspell/w32/Aspell-0-50-3-3-Setup.exe

第2步:在應用程序數據漫遊文件夾中安裝Win32的安博泰(它可以方便地創建一個拼寫檢查父文件夾之前) enter image description here

第3步。將Aspell Win32添加到Windows PATH。 Learn how to add variables to your system path。在我們的示例中,鍵入 C:\Users\UrPC\AppData\Roaming\SpellCheckers\Aspell\bin\,其中UrPC是您的PC的名稱。

第4步:確認環境變量編輯通過單擊確定幾次,退出先進的系統屬性對話框,

步驟從下面的鏈接5.下載aspell詞典(我不相信新版本將工作,但誰知道) http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe

第6步:在任何目錄下運行安博泰詞典「安裝程序」,它會自己解壓縮到一個在同一直銷稱爲TmpInstall文件夾保守黨。

第7步。打開TmpInstall文件夾並運行setup-Aspell-en-0.50-2.exe。它應該自動檢測您的安博泰Win32的安裝是基於我們在第3步:如果沒有添加系統路徑上,則繼續執行步驟8

第8步:打開Windows PowerShell和鍵入單詞aspell

你應該看到命令信息吐出你的提示。如果您不知道您可能輸入了錯誤的PATH信息(並且需要修復它)或需要重新啓動Windows。如果這樣做後仍然會出錯,請考慮附錄。

附錄:如果先前卸載了Aspell,則可能需要刪除它的孤立註冊表項。運行regedit.exe並搜索aspell。刪除與卸載的aspell目錄關聯的任何aspell密鑰。要非常小心,不要因意外刪除某些東西可能會將您發送到Windows Hell而意外更改其他任何內容。

這種智慧是該過程的一種擴展install Hunspell on Windows

祝您好運!