It's not a bug in calibre. the get_wordcount function is not designed for accurate word counts. It is used only in heuristics to try to auto detect chapter boundaries based on approximate word counts. I have no idea why the count pages plugin uses that function. Instead it should be using the ICU word iterator functions, for examples of their use, see break_iterator.py
|