1.4.0 • Published 2 years ago

phonate v1.4.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

English

See https://github.com/eobrain/spehl For an example of a project that uses this library.

Have you ever wondered what English would look like if its spelling was actually phonetic. This is an attempt to do so by mapping each phoneme of English to a fixed set of letters, according to the following mapping.

PhonemeSpellingExample, standardExample, phoneticType
AE /æ/aTRAP, BATH, cat, fast, pass, as, that, at, has, anTRAP, BATH, kat, fast, pas, az, that, at, haz, anshort vowel
AA /ɑ/~/ɒ/aaPALM, START, car, was, arePAAM, STAART, kaar, waaz, aarlong vowel
AO /ɔ/awTHOUGHT, NORTH, water, four, also, allTHAWT, NAWRTH, wawter, fawr, awlsoe, awllong vowel
EY /eɪ/ayFACE, say, stain, freight, they, becameFAYS, say, stayn, frayt, thay, bikaymdiphthong vowel
B /b/bbaboonbuboonstop
CH /tʃ/chcheetah, centurycheetu, senchereeafrukut
D /d/ddeerdirstop
EH /ɛ/eDRESS, bread, many, friend, theirDRES, bred, menee, frend, thershort vowel
IY /i/eeFLEECE, sea, people, police, heFLEES, see, peepul, pulees, hee
ER /ɝ/erurchin, firsterchun, ferst
F /f/fflamingofluminggoefricative
G /ɡ/ggazelleguzelstop
HH /h/hhippopotamushipupaatumusaspirate
IH /ɪ/iKIT, myth, pretty, women, is, his, careerKIT, mith, pritee, wimun, iz, hiz, kerirshort vowel
AY /aɪ/iyPRICE, try, night, height, by, timePRIYS, triy, niyt, hiyt, biy, tiymvowel
JH /dʒ/jjackal, collegejakul, kaalijaffricate
K /k/kcatkatstop
L /l/llionliyunliquid
M /m/mmonkeymungkeenasal
N /n/ngnatnatnasal
NG /ŋ/nganchor, long, among, doingangker, lawng, umung, dooingnasal
OW /oʊ/oeGOAT, slow, toe, also, onlyGOET, sloe, toe, awlsoe, oenleediphthong vowel
OY /ɔɪ/oiCHOICE, noise, loiter, boyCHOIS, noiz, loiter, boidiphthong vowel
UW /u/ooGOOSE, new, due, tuna, to, useGOOS, noo, doo, toonu, too, yooslong vowel
AW /aʊ/ouMOUTH, noun, cow, showerMOUTH, noun, kou, shouerdiphthong vowel
P /p/ppenguinpenggwunstop
R /ɹ/rrhinocerosriynaaserusliquid
S /s/ssloth, centurysloeth, senchereefricative
SH /ʃ/shsheepsheepfricative
ZH /ʒ/sigenre, adhesion, allusion, asia, casual, decisionsiaanru, adheesiun, uloosiun, aysiu, kasiuwul, disisiunfricative
T /t/ttigertiygerstop
DH /ð/ththis, the, thatthis, thu, thatfricative
TH /θ/ththrushthrushfricative
AH /ʌ/uSTRUT, son, blood, the, of, a, one, fromSTRUT, sun, blud, thu, uv, u, wun, frumshort vowel
UH /ʊ/uhFOOT, took, good, put, wouldFUHT, tuhk, guhd, puht, wuhdshort vowel
V /v/vvulture, ofvulcher, uvfricative
W /w/wwalruswawlrussemi-vowel
HH Wwhwheatwheet
Y /j/yyakyaksemi-vowel
Z /z/zzebra, as, was, iszeebru, az, waaz, iz, hizfricative

Using the library

In a JavaScript module loaded from a web page use

import { convert } from 'https://cdn.jsdelivr.net/npm/phonate/phonate.js'

In a NodeJS JavaScript module use

import {convert} from "phonate"

Running the Software

Generate phonetic dictionary.

To execute

  1. cd to the directory containing this README.md file.
  2. Install node (for example by installing nvm and executing nvm use )
  3. Install dependencies
    npm install
  4. In this directory execute
    npx bajel
  5. This will generate a file called phonetic.js with a mapping frem standard Inglish spelling tp phonetic spelling. It then runs an evaluation to see how close the two spellings are to each other, measured by Levenshtein distance weighted by how often the word occurs in English.

Uses The CMU Pronouncing Dictionary.

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago