predict: Predict the next word

Description Usage Arguments

View source: R/predict.R

Description

Predict the next word using a given model. The prediction method uses a backoff method if the token is not present in highest N-gram.

Usage

1
predict(model, input, cleanedPosText = FALSE)

Arguments

model

A list of N-gram data.frames sorted in descending order based on the probability of the token and POS sequence occuring.

input

Character vector of words.

cleanedPosText

Boolean indicating if the text has already been cleaned and tagged with POS.


justinnafe/NextWord documentation built on May 20, 2019, 5:16 a.m.