3 ms·
You can do a lot better hyphenation than most people realize.. e.g. http://code.google.com/p/hyphenator/ http://code.google.com/p/hyphenator/
by ggruschow 17y ago
You can do a lot better hyphenation than most people realize.. e.g. http://code.google.com/p/hyphenator/ http://code.google.com/p/hyphenator/
- pmiller2 17y agoThe main problem with something like hyphenator.js is that to do a proper job, you first have to detect the language. I can't read Polish, but I imagine trying to hyphenate Polish text with an algorithm designed to work on English wouldn't work well at all, and ditto the reverse.
- ggruschow 17y agoIf that's the main problem, then I've got to use it more often! I'm guessing most websites know what language they're serving up.. and for those that don't, you can detect it reasonably well in javascript too (e.g. http://whatlanguageisthis.com/ http://whatlanguageisthis.com/). I'm guessing the cost of misidentification is a minor one, and if it's not, it seems easy to add a confidence output to a language identifier.. just don't hyphenate when you're not sure. I would've said the main problem is you add a big JS file to your requests, but my web ideas are probably stuck in 1994.