Cal*_*umH 5 spell-checking r qdap
我遇到了错误
Error in checkForRemoteErrors(val) :
one node produced an error: arguments imply differing number of rows: 3, 0
Run Code Online (Sandbox Code Playgroud)
尝试check_spelling在qdap包中使用时。提供的数字 3 和 0 与下面提供的数据相关,但这只是更大的拼写检查字符串的一个小样本,当我将更大的字符串传递给字符串以进行拼写检查和用作字典时,行号会有所不同。当它突然开始工作时,我偶尔会成功,但是一旦我尝试重复该过程,我就会再次遇到相同的错误。
当我使用该check_spelling_interactive()功能时,我也遇到了同样的错误。
我的理解是,我想用作拼写检查和字典的单词都应该在字符向量中。
我已经更新了我的qdap. 在 Windows 7 64、R Studio 版本 0.99.467、R 版本 3.2.1 上运行。
任何帮助将不胜感激,因为我正在为此脱发,而且我没有那么多多余的钱。
library(qdap)
spellcheckstring = "universal motor vlb"
mydictionary = c("brake", "starter", "shock", "pad", "kit", "bore", "toyota", "ford", "pump", "nissan", "gas", "alternator", "switch")
class(spellcheckstring) # character
class(mydictionary) # character
check_spelling(spellcheckstring, dictionary = mydictionary)
Run Code Online (Sandbox Code Playgroud)
字典太小了,当它被拆分 ( https://github.com/trinker/qdapTRUE) 时,该字母没有可能的匹配项。使用assume.first.correct=FALSE:
check_spelling(spellcheckstring, dictionary = mydictionary, assume.first.correct=FALSE)
Run Code Online (Sandbox Code Playgroud)
版本 2.2.5(开发版)自动强制assume.first.correct=FALSE如果自定义词典没有至少一个以字母表中的所有 26 个字母开头的单词。
if (!require("pacman")) install.packages("pacman")
pacman::p_load_gh(
"trinker/qdapDictionaries",
"trinker/qdapRegex",
"trinker/qdapTools",
"trinker/qdap"
)
Run Code Online (Sandbox Code Playgroud)