I have a simple program through which I'm trying to predict the next word and I get the error
"Error in model$word : $ operator is invalid for atomic vectors".
Can you please help me understand how to get rid of this error?
Following is the code that I'm trying to execute:
include.packages("ANLP")
library(ANLP)
setwd("C:/Users/s.maramreddy/OneDrive - Accenture/Personal/R/Capstone/Coursera-SwiftKey/final/en_US")
model <- readRDS("model.RDS")
testcorp <- "what is"
predict_Backoff(testcorp, model, isDebugMode = T)
Following is the structure of the variable "model"
str(model)
This gives
'data.frame': 108725 obs. of 2 variables: