English is a West Germanic language, first spoken in early medieval England. This package is a collection of various English language utilities. It includes functions for converting text to phonetic representations and stemming words.
import * as xenglish from "jsr:@nodef/extra-english";
//# Phonetic functions
xenglish.caverphonePhonetic('Thompson', true);
// → 'TMPSN1'
xenglish.colognePhonetic('Hari');
// → '7'
xenglish.metaphonePhonetic('Lightyear');
// → 'LHTYAR'
xenglish.mraPhonetic('Byrne');
// → 'BYRN'
xenglish.soundexPhonetic('Tymczak');
// → 'T522'
xenglish.soundexSqlPhonetic('Tymczak');
// → 'T520'
//# Stemming functions
xenglish.lancasterStem('running');
// → 'run'
xenglish.porterStem('running');
// → 'run'
Name | Action |
---|---|
caverphonePhonetic | Get Caverphone phonetic of English text. |
colognePhonetic | Get Cologne phonetic of English text. |
metaphonePhonetic | Get Metaphone phonetic of English text. |
mraPhonetic | Get Match Rating Approach phonetic of English text. |
soundexPhonetic | Get Soundex phonetic of English text. |
soundexSqlPhonetic | Get Soundex phonetic (SQL) of English text. |
lancasterStem | Stem a word to its base form using the Lancaster stemmer. |
porterStem | Stem a word to its base form using the Porter stemmer. |