next_word: Ngram Model to predict next word We built and train three...

Description Usage Arguments Details Value Author(s) See Also

Description

Ngram Model to predict next word We built and train three ngram to check what will be the next word, we check first with the last 3 words, if nothing is found, the last two and so the last. If there is no match, the word the most used is returned.

Usage

1
next_word(str1)

Arguments

str1

a sentence or word, just the maximum last three words will be in the process.

Details

This function is the last test for the data science coursera course of Hopkins university

Value

the five word with the higher frequency following the precedents words.

Author(s)

Aurelien Roussille

See Also

filter, tolower,str_split


zertupo/NxT documentation built on May 12, 2019, 6:17 p.m.