Hi all,
I'll introduce myself shortly, but I just wanted to jot these thoughts
down on paper before I forgot :)
I did a quick list-search to see if syllables had ever been discussed,
and it didn't come up.
I'm looking at doing a simple Python implementation of the Flesch-
Kincaid Reading Ease calculation (for the English language). The code
is trivial except for the counting of syllables in a word. I started
with the simplest thing that could possibly work, with the number of
syllables in a word equalling 1 plus len(word) mod 3, which works
better than you might imagine :)
A quick look around sourceforge revealed a simple Java calculator
which uses some logic based on vowel splitting and a few special
cases.
I wondered if anyone here had tackled syllable-counting.
http://en.wikipedia.org/wiki/Syllabification has little to say on the
topic other than to suggest looking up the answer in a
dictionary :) ... I suppose I could compile such a list using various
online dictionaries, but I haven't looked into that very hard.
http://www.dict.org/ appears to provide an interface into some
reasonable open-access dictionaries. I notice that nltk has an
interface to WordNet, one of the databases which also helps underlie
dict.org, but I didn't see the syllable information in that API.
Am I missing something (i.e. does nltk provide syllable information
through an API)? Otherwise, does anyone know whether using something
like
dict.org to count syllables makes sense?
Anyway, hello list, and I thought I'd just share those thoughts. I'll
let you know how I get on.
Cheers,
-Tennessee