Wordcount reports extra words
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyRoom |
New
|
Undecided
|
Unassigned | ||
gedit |
New
|
Undecided
|
Unassigned |
Bug Description
A document containing "this doesn't seem right" is reported as having 5 words, it looks like pyroom splits on an apostrophe.
Also, it looks like trailing space at the end of a document is counted as an additional word (this is rather minor, however).
Gedit looks like it has the same bug with the apostrophes, though until just now I couldn't figure out the whitespace bug.
It looks like the bug is due to your using gtk's text widget to advance words. I'm not sure where to report the bug upstream, however, and it might be worth working around.
I tried to modify the wordcount code to just use whitespace a while back, but it kind of just blew up in my face (I don't know quite enough python to be helpful, I am afraid).
This should definitely be reported upstream, and filing the bug against gedit is probably a good start.
I wanted to thank you for investigating this bug as much as you did--while patches are always nice, they are by no means necessarily the most important part of a bug report, and the clear explanation as well as the research you did is extremely valuable.