Skip to content
/ T9.JS Public

A T9 phone number pad text predictor. Initialized with a dictionary of word possibilities and a numeric input, the t9 library will search the dictionary for all possible matches.

License

Notifications You must be signed in to change notification settings

hytea/T9.JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T9.JS

A T9 phone number pad text predictor.

Initialized with a dictionary of word possibilities and a numeric input, the t9 library will search the dictionary for all possible matches.

Installation

npm i t9.js

Usage

var t9 = require('t9');

var dictionary = [
  'gelatin',
  'hair gel',
  'hello',
  'help',
  'today',
  'tomorrow',
  'world',
  'yesterday',
];

var input = '435';

var obj = t9(dictionary);

var results = obj.getWords(input);

console.log(results); // ['gelatin', 'hairgel', 'hello', 'help']

About

A T9 phone number pad text predictor. Initialized with a dictionary of word possibilities and a numeric input, the t9 library will search the dictionary for all possible matches.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published