PHP Classes

PHP NGram Predictor: Predict the next characters based on the previous

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-04-30 (4 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 29 All time: 10,889 This week: 138Up
Version License PHP version Categories
ngrampredictor 1.0BSD License7Searching, Text processing, Artificia..., P..., P...
Description 

Author

This package can predict the following characters based on the previous ones.

It can be trained with sentences with valid words to learn the most common words users may type when asking questions.

The package can parse a sequence of characters a user may have typed and predict the following letters based on what it learned during the training phase.

It uses an N-Gram model, where the probability of each character is calculated based on the previous N characters.

The class includes methods for converting text to integers, creating a dictionary of character sequences, finding the previous(todo) and following characters based on a given sequence, and predicting the most likely next character based on a given sequence.

Picture of JImmy Bo
  Performance   Level  
Name: JImmy Bo <contact>
Classes: 13 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file class.npredict.php Class PHP Class for N-Gram Prediction
Accessible without login Plain text file example.npredict.php Example example of using the NGramPredictor class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:29
This week:0
All time:10,889
This week:138Up