[Libreoffice-bugs] [Bug 38983] Word Count counts incorrectly with dashes and other separators

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 20 18:21:49 CEST 2012


--- Comment #10 from Jamee Mikell <jamee.mikell at gmail.com> 2012-04-20 09:21:49 PDT ---
Comment on attachment 60399
  --> https://bugs.freedesktop.org/attachment.cgi?id=60399
Example of outline spreadsheet described in comment 9.

re: comment 8
It's possible I could figure out LO's macro language and object structures. I
have developed (and currently maintain and enhance) macros in VBA for Excel,
and made a living coding C and learned a little Python for a couple of small
side projects I did, and used various other languages off and on, so it isn't
like I have no programming background. But I'd rather be writing fiction, and I
haven't found much to help me understand LO's macro language or object

I didn't find any extensions or such that offered more sophisticated word
counting. The one or two examples I found rely on the underlying (flawed in my
opinion) word count method or implement the same method in their own code.

To be honest, though, if I did write a macro, I'd write it to look for a
specific section break identifier (e.g., <eol>#<eol>) that would be entered as
part of a dialog and then report word count data for each section. Or use
bookmarks and count between bookmarks. Probably other options for defining
breaks too.

In the end, I decided this issue wasn't going to get solved in a way that meets
my needs any time soon so I modified my outline spreadsheet for this writing
project. See attachment OutlineExample.ods. Each time I edit a section (part of
a chapter), I run the default word count and record the LO "word" count and the
count of characters including spaces on the section's row in the spreadsheet. I
sum up the two sets of numbers--LO words and characters--at the end of each set
of sections and report LO words and char/6 and char/6 and char/X, where X is a
value I determined was a reasonable estimate of characters per page based on
sampling several comparable books. I can also estimate char/6 given char for
any single section if I need to. This helps me balance the size of books and,
to a lesser extent, sections and chapters.

If someone would like to write a macro or extension or enhance LO to facilitate
more sophisticated word counting methods that fiction writers and others who
care about word count might find useful, I would be grateful. I occasionally
make changes with find/replace across the whole document, which requires going
recounting each section to update the count data. But as I noted, I'd rather
write fiction than spend a lot of time figuring out how LO's macro language
works and how the Writer objects work and such. If I already knew LO's macro
language and objects, it would probably be a different story.

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Libreoffice-bugs mailing list