Quote:
Originally Posted by snarkophilus
Ahh, true. We (I!!) have gone off on a tangent. I've confirmed that normal vs ICU doesn't really affect run time for me.
Almost all the time is spent counting syllables. I added a bit of timing stuff to the plugin (yay, my first actual working change to anything Calibre related!) and I see in my log of Oscar Wilde
Code:
count syllables in all words
.... count syllables done --- 1539.17500019 seconds ---
and total run time was just over 25 minutes again.
If I insert a return 1607495 right before the for word in words: loop in nltk_lite/textanalyzer.py, then it only takes 29 seconds instead of nearly half an hour.
Counting syllables is difficult?!
|
Maybe counting syllables is that difficult. Or maybe the routine used is inefficient. You could give a look and see if you can improve it.