PHP Word Completion: Suggest words that complete strings

Recommend this page to a friend!
  Info   Example   Demos   View files (21)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 115 All time: 9,216 This week: 409
Version License PHP version Categories
wordcompletion 1.0.3MIT/X Consortium ...7PHP 5, Files and Folders, Text proces...
Description Author

This class can suggest words that complete strings.

It takes the name of a file that is read to extract the words to complete.

The class can take some typed letters and return an array with words that complete those letters from the text file.

Picture of castromiltone
Name: castromiltone <contact>
Classes: 1 package by
Country: Kenya Kenya
Age: ???
All time rank: 42359 in Kenya Kenya
Week rank: 771 3 in Kenya Kenya



This is a PHP Class coded using PHP 7 author: Castro Hamiltone


The aim is to provide a sorted ( based on the percentage of the frequecny of occurrence of the suggested word in the source of words ) list of most probable completions of a word given the begining letters of the word and a source of words to be used.


*@param $begining:- string, the begining portion of the word to be completed. e.g 'yo', 'you', or 'your' etc<br>* *@param $words_source:- string, the filename (.txt) of the text file containing the commonly used words.<br>* You can use a corpus from The Guternburg Project


array:- possible completions with probability in percentages

File Role Description
demo (5 files, 1 directory)
LICENSE.txt Lic. License Doc. Documentation
WordCompletion.php Class Class source
words.txt Data Demo words source

  Files  /  demo  
File Role Description
bootstrap-3.3.7-dist (3 directories)
   2600-0.txt Doc. Documentation
   demo.php Example Example script
   index.html Data Auxiliary data
   jquery-3.2.1.min.js Data Auxiliary data
   words.txt Doc. Documentation

  Files  /  demo  /  bootstrap-3.3.7-dist  
File Role Description
css (8 files)
fonts (1 file)
js (3 files)

  Files  /  demo  /  bootstrap-3.3.7-dist  /  css  
File Role Description
   bootstrap-theme.css Data Auxiliary data Data Auxiliary data
   bootstrap-theme.min.css Data Auxiliary data Data Auxiliary data
   bootstrap.css Data Auxiliary data Data Auxiliary data
   bootstrap.min.css Data Auxiliary data Data Auxiliary data

  Files  /  demo  /  bootstrap-3.3.7-dist  /  fonts  
File Role Description
   glyphicons-halflings-regular.svg Data Auxiliary data

  Files  /  demo  /  bootstrap-3.3.7-dist  /  js  
File Role Description
   bootstrap.js Data Auxiliary data
   bootstrap.min.js Data Auxiliary data
   npm.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,216
This week:409

For more information send a message to info at phpclasses dot org.