Learn R Programming

ANLP (version 1.3)

predict_Backoff: Predict next word using backoff method

Description

This function predicts next word using back-off algorithm.

Usage

predict_Backoff(testline, modelsList, isDebugMode = F)

Arguments

testline
Line on which we are performing algorithm to predict next word
modelsList
List having all Ngram models generated by generateTDM
isDebugMode
for debugging purpose, this will print out debug statements

Value

next predicted word

Details

This function predicts next word based on previous N number of words using N-gram models generated by generateTDM.

See Also

generateTDM TermDocumentMatrix