Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonetic spelling in Python and Java [closed]

I am trying to build a system that accepts text and outputs the phonetic spelling of the words of this text. Any ideas on what libraries can be used in Python and Java?

like image 769
pacodelumberg Avatar asked Nov 28 '11 21:11

pacodelumberg


3 Answers

Check out soundex

http://en.wikipedia.org/wiki/Soundex

like image 145
Nickle Avatar answered Sep 29 '22 14:09

Nickle


I came across an old python package Raze. It includes a phonetic module with a translation api:

>>> pd = PhoneticDictionary()
>>> pd.spell('Hello world')
... hotel-echo-lima-lima-oscar whiskey-oscar-romeo-lima-delta

It hasn't been updated in a while, but it still works.

like image 43
Rob Cowie Avatar answered Sep 29 '22 12:09

Rob Cowie


Are you looking for something akin to the international phonetic alphabet (IPA) or some other phonetic output? If ARPAbet is ok, there is the CMU pronouncing dictionary (http://www.speech.cs.cmu.edu/cgi-bin/cmudict). That'll give the ARPAbet rendering of most words in English. I've written some code that converts the ARPAbet spelling to IPA and post to github if you'd like.

like image 21
S Kunath Avatar answered Sep 29 '22 12:09

S Kunath