Worklog 2014-12-08


After some wrestling with rustc, I've taken some refresh. I had a grand^Wstupid plan for improving an, by implementing a better spell-to-pronounciation algorithm and using that to determine if the word starts with a vowel or not. (Mostly for fun, but I also wanted to make some useful utility.) I've now implemented an entirety of Mark Rosenfelder's algorithm which has some test code like this:

assert_eq!(spell_to_sound("coffee").as_slice(), "kòfë");
assert_eq!(spell_to_sound("market").as_slice(), "môrkêt");
assert_eq!(spell_to_sound("ugly").as_slice(), "ûglë");
assert_eq!(spell_to_sound("high").as_slice(), "hï");
assert_eq!(spell_to_sound("canal").as_slice(), "känâl");

...Well, it still fails for some dozens of cases but it looks nice. (Here I really mean that this doesn't exactly match the known output of the algorithm. Since the algorithm itself is approximate, if the bug actually improves the error rate, I might leave it as is.)