Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qdap check_spelling Error in checkForRemoteErrors(val) : one node produced an error: arguments imply differing number of rows

I have been running into the error

Error in checkForRemoteErrors(val) : 
  one node produced an error: arguments imply differing number of rows: 3, 0

when trying to use check_spelling in the qdap package. The provided numbers 3 and 0 relate to the data provided below but this is only a small sample of a much larger spell check string and the row numbers vary when I pass it larger strings for both the string to spell check and use as a dictionary. I've had occasional success when all of a sudden it starts to work but as soon as I try to repeat the process I run into the same error again.

I run into the same error when I use the check_spelling_interactive() function also.

My understanding is that both the words I want to use as a spell check and as a dictionary should be in character vectors.

I've updated my version of qdap. Running on Windows 7 64, R Studio Version 0.99.467, R Version 3.2.1.

Any help would be greatly appreciated please as I am losing hair over this and I don't have that much to spare.

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)
like image 393
CallumH Avatar asked Nov 04 '15 07:11

CallumH


1 Answers

The dictionary is so small that when it is split up (https://github.com/trinker/qdapTRUE) there are no possible matches for that letter. Use assume.first.correct=FALSE:

check_spelling(spellcheckstring, dictionary = mydictionary, assume.first.correct=FALSE)

Version 2.2.5 (dev version) automatically enforces assume.first.correct=FALSE if custom dictionary does not have at least one word beginning with all 26 letters of the alphabet.

Get the latest release of qdap

if (!require("pacman")) install.packages("pacman")
pacman::p_load_gh(
    "trinker/qdapDictionaries",
    "trinker/qdapRegex",
    "trinker/qdapTools",
    "trinker/qdap"
)
like image 127
Tyler Rinker Avatar answered Nov 03 '22 01:11

Tyler Rinker