Skip to content

Word Prediction using concepts of N – grams and CDF.

Notifications You must be signed in to change notification settings

Amyst82/WordPrediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPrediction

Word Prediction using concepts of N–grams and CDF.

Example

Input: we
Output using CDF: we can approach this random word from it gives the smallest
Output most frequent: we can find the input in

Input: approach
Output using CDF: approach Note for each word that or equal the input
Output most frequent: approach this problem using the input in

Input: Now
Output using CDF: Now if you will get a different output can
Output most frequent: Now if you can find the input in

Usage

NGramPrediction.Init("PredictionData.txt");

or

NGramPrediction.InitFromText("Some long text or whatever...");

Initialize class with a path to a file or with a text directly.

//getting max 10 predicted words (duplicates will be excluded on output) using CDF
string output = NGramPrediction.GetPredictedString(true, "Some text", 10); 

or get the list of predicted words (excluding duplicates)

var output = NGramPrediction.GetPredictedWords(true, "Some text", 10);

About

Word Prediction using concepts of N – grams and CDF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages