OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Proper character count - is it really THAT hard?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
jsawiuk
Newbie
Newbie


Joined: 20 Sep 2005
Posts: 4
Location: Poland

PostPosted: Tue Sep 20, 2005 2:21 pm    Post subject: Proper character count - is it really THAT hard? Reply with quote

I've seen this problem raised here a few times, but seemingly to no avail. Please explain to me: Is it really THAT hard to implement a character count with or withoutspaces? They've already done wordcount of selection and God bless 'em for that, but they still forget about (or ignore) quite a group of users who need character count without spaces for their daily jobs. I myself, being a translator, would be more than happy to move from MS office to OOo, but I can't, coz I'm using character count without spaces as a basis for my payment. And so do journalists, writers, technical writers, science reviewers, scholars, etc.
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Tue Sep 20, 2005 3:19 pm    Post subject: Re: Proper character count - is it really THAT hard? Reply with quote

jsawiuk wrote:
Is it really THAT hard to implement a character count with or withoutspaces?


There's half of what you ask in the File/ Properties.

David.
Back to top
View user's profile Send private message
hwtan
OOo Advocate
OOo Advocate


Joined: 24 Aug 2004
Posts: 320
Location: Singapore

PostPosted: Tue Sep 20, 2005 5:28 pm    Post subject: Reply with quote

I did not find out whether the file-property make the count with or without space. Anyway, you can do a space count with the find function in edit-find and replace. Use the find all, and it will report to you how many space are found. Then add or subtract from the number given by the file-property.
Back to top
View user's profile Send private message
Kaaredyret
Moderator
Moderator


Joined: 22 Aug 2003
Posts: 1356
Location: Denmark

PostPosted: Tue Sep 20, 2005 6:02 pm    Post subject: Reply with quote

I have been begging for that too, PLUS an option to exclude footnotes/endnotes from the count since 2002?

I simply cant use Writer for my current work mainly because of this and a few other reasons, so my license for MS Office XP was money well spent.

This issue almost pushed me away from OOo several times, one thing is to wait for the feature, but to have to wait for YEARS for a basic feature in a word processor is just too much. Please note, I use StarOffice as well, the commercial edition of OOo, and the word count is no better there, so no "OOo is free, no complaints". Wink

Isnt it possible for someone to add it to OOo as a plugin, somehow?
_________________
www.kaaredyret.dk - OpenOffice resources (templates, extensions, tutorials and more) !
Stay updated on software and OpenOffice.org news via Twitter
Back to top
View user's profile Send private message Visit poster's website
maxqnz
Super User
Super User


Joined: 24 Mar 2003
Posts: 1290
Location: Te Ika a Maui, Aotearoa

PostPosted: Tue Sep 20, 2005 6:02 pm    Post subject: Reply with quote

hwtan wrote:
I did not find out whether the file-property make the count with or without space. Anyway, you can do a space count with the find function in edit-find and replace. Use the find all, and it will report to you how many space are found. Then add or subtract from the number given by the file-property.


That's a useful trick. It also confirmed a problem with OOo's character count in File>Properties, at least for me. I pasted one line into a new file, and manually counted the characters.
ये तारा वो तारा हर तारा \-२

There are 20 characters and 6 spaces in that line. OOo's "find all" correctly identifies the 6 spaces, but the File>Properties dialogue tells me that there are a total of 28 characters, not 26. Over a large document, that could be a problem for anybody that needed an accurate count.
_________________
Noho ora mai, ka kite ano.
What Is A Pieriansipist?

OOo 2.4/XP Pro SP2 / OOo 2.3.0.1/OpenSuse 10.3
Back to top
View user's profile Send private message Visit poster's website
Kaaredyret
Moderator
Moderator


Joined: 22 Aug 2003
Posts: 1356
Location: Denmark

PostPosted: Tue Sep 20, 2005 6:11 pm    Post subject: Reply with quote

Some related issues from BugZilla:

http://qa.openoffice.org/issues/show_bug.cgi?id=4568

http://qa.openoffice.org/issues/show_bug.cgi?id=17964


http://qa.openoffice.org/issues/show_bug.cgi?id=14410

http://qa.openoffice.org/issues/show_bug.cgi?id=1793

The highlighted issue is the issue you should keep an eye on, some of the other issues are duplicates.

Oh, and maxqnz, exotic characters apparently use more space when stored, so a simple char count isnt good enough unless it is properly designed by the programmer.
_________________
www.kaaredyret.dk - OpenOffice resources (templates, extensions, tutorials and more) !
Stay updated on software and OpenOffice.org news via Twitter
Back to top
View user's profile Send private message Visit poster's website
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Tue Sep 20, 2005 6:41 pm    Post subject: Reply with quote

[quote="maxqnz"]
hwtan wrote:
I pasted one line into a new file, and manually counted the characters.
ये तारा वो तारा हर तारा \-२

There are 20 characters and 6 spaces in that line. OOo's "find all" correctly identifies the 6 spaces, but the File>Properties dialogue tells me that there are a total of 28 characters, not 26


A further oddity: If, in this reply, I put the cursor to the left of the text you refer to, then move it right using the right-arrow key, counting the moves 'per character', there is a hesitation after the first; a count without apparent movement to the next character, and so a total count of 27 steps from left to right. Copy/pasting into Writer 1.1.4, then doing the same yeilds 19 steps from beginning to end of the line. The word count from File/properties for the same document is 27. This must have something to do with the type of character. This might be addressed, but presently the font type may be the problem? Two of the numbers above agree.

David.
Back to top
View user's profile Send private message
jsawiuk
Newbie
Newbie


Joined: 20 Sep 2005
Posts: 4
Location: Poland

PostPosted: Tue Sep 20, 2005 10:23 pm    Post subject: Reply with quote

To be perfectly honest, I don't mind it counting exotic characters wrong, as I will be using the feature for English and Polish only Smile
Guess the problem with Bugzilla issues is that once they mark something as a duplicate noone cares for it anymore. So instead of a massive demand you get one issue and several duplicted requests nobody minds.
The even bigger problem is that the programmers don't need this specific feature. I have seen posts by programmers on other forums saying that they don't see any use for counting chars without spaces. If, however, they were payed according to a character count, the feature would surely be there from day 1.
Isn't there any way to get through to the programmers personally, instead of through the bug-reporting system?
Back to top
View user's profile Send private message
Bhikkhu Pesala
Super User
Super User


Joined: 23 Aug 2005
Posts: 2324
Location: Seven Kings, London, UK

PostPosted: Tue Sep 20, 2005 11:48 pm    Post subject: Reply with quote

You will have to excuse me if this is a daft reply, as this is all news to me, so I've probably missed something vital.

I copied your first post, pasted it into Open Office and checked the file properties.

The statistics say:

1 paragraph
109 words
626 characters

Isn't that exactly 517 characters without spaces? (626-109)

A carriage return seems to count as one space, which seems fair enough.
_________________
Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Back to top
View user's profile Send private message Visit poster's website
jsawiuk
Newbie
Newbie


Joined: 20 Sep 2005
Posts: 4
Location: Poland

PostPosted: Wed Sep 21, 2005 12:26 am    Post subject: Reply with quote

Hey, that may well be one of the smartest replies to the problem I've ever seen. You're right, and I have never thought about that. Embarassed Plus, MS Office returned 518 wihout spaces which seems to be a difference I can get over. I'm gonna check if there are differences with longer texts and if it works, you can pack your tuxedo coz you're getting a Nobel prize for that Laughing

Update:
Tried it. Worked well enough on a 65000 chars text with TOC and lots of bookmarks & images. Difference between OOo and WS Word was less than 100 chars. Great work!


Last edited by jsawiuk on Wed Sep 21, 2005 3:59 am; edited 1 time in total
Back to top
View user's profile Send private message
maxqnz
Super User
Super User


Joined: 24 Mar 2003
Posts: 1290
Location: Te Ika a Maui, Aotearoa

PostPosted: Wed Sep 21, 2005 12:51 am    Post subject: Reply with quote

[quote="David"]
maxqnz wrote:
hwtan wrote:
I pasted one line into a new file, and manually counted the characters.
ये तारा वो तारा हर तारा \-२

There are 20 characters and 6 spaces in that line. OOo's "find all" correctly identifies the 6 spaces, but the File>Properties dialogue tells me that there are a total of 28 characters, not 26


A further oddity: If, in this reply, I put the cursor to the left of the text you refer to, then move it right using the right-arrow key, counting the moves 'per character', there is a hesitation after the first; a count without apparent movement to the next character, and so a total count of 27 steps from left to right. Copy/pasting into Writer 1.1.4, then doing the same yeilds 19 steps from beginning to end of the line. The word count from File/properties for the same document is 27. This must have something to do with the type of character. This might be addressed, but presently the font type may be the problem? Two of the numbers above agree.

David.


The carriage return mentioned by another poster accounts for one of the two "extra" characters. That means the count is only off by one. I've tried spelling the first word without its vowel, instead of ये, to see if OOo was counting the vowel as a character, and it seems that it is, because the count drops from 28 to 27. Nevertheless, that still leaves one "extra" character unaccounted for, even after factoring in the CR.
_________________
Noho ora mai, ka kite ano.
What Is A Pieriansipist?

OOo 2.4/XP Pro SP2 / OOo 2.3.0.1/OpenSuse 10.3
Back to top
View user's profile Send private message Visit poster's website
jamtat
OOo Advocate
OOo Advocate


Joined: 27 Sep 2004
Posts: 207

PostPosted: Wed Sep 21, 2005 6:16 am    Post subject: Reply with quote

jsawiuk wrote:
Hey, that may well be one of the smartest replies to the problem I've ever seen <snip>
Update:
Tried it. Worked well enough on a 65000 chars text with TOC and lots of bookmarks & images. Difference between OOo and WS Word was less than 100 chars. Great work!

Lemme see if I've got this right. Has Bhikkhu Pesala essentially invalidated your and Kaaredyret's complaints about the way the program works (along with justifications for continuing to use the unmentionable alternate proprietary program alternative), as well as your dissatisfaction with the developers, by pointing out that character count does already provide a simple way to exclude spaces from the total? I'm not trying to rub noses in this or anything, but I do feel that when a blatant error like this has been made and publicly propagated on a list such as this, it needs to be just as thoroughly de-propagated--if not more thoroughly--by clearly identifying the mistake the re-emphasizing the correct understanding. If this is, in fact, the case I'd like to see both you and Kaaredyret more clearly admit that you've made a fundamental oversight in your use and assessment of the program. I'd do it had I made the oversight--and believe me, I make such oversights all the time--just so as to spare others getting caught up in my confusion. I'd also like to know whether, with the revelation that the program already provides a simple way of doing the thing it was presumed not to allow, you 2 are now ready to ditch the unmentionable competing proprietary alternative product. It's just as important to know that OOo can function more like a full replacment for that product in real-world use as it is to know that a fundamental oversight was made in assessing OOo Writer's functions.

So, to summarize: does OOo Writer's character count already give a way to easily get the total character count minus spaces, contrary to what was asserted at the beginning of this thread ("Is it really THAT hard to implement a character count with or withoutspaces?")? Are you now in a position to fully switch over to OOo Writer since the purported problem does not really exist, or are there other obstacles to fully switching over? Finally, is it true that to get character count without spaces, you simply subtract the number of words from the number of characters that appears in the File > Properties > Statistics tab?

Some concluding clarification and re-emphasis could help put this matter to a final rest.

James
Back to top
View user's profile Send private message
jsawiuk
Newbie
Newbie


Joined: 20 Sep 2005
Posts: 4
Location: Poland

PostPosted: Wed Sep 21, 2005 6:50 am    Post subject: Reply with quote

It's the other way round in fact. OOo gives you the character count with spaces, and you have to manually substract the number of words to get a character count without spaces. The thing asserted at the beginning remains true, though, as the solution given by the Blessed Bhikkhu (or Blessed Pesala, whatever your fist name is) still requires the use of an external application (namely, a calculator). There was no oversight concerning the functions, there was just my mathematical illiteracy and lack of logical thinking (as is pretty frequent with us, artistic types). We had the solution at our hands all the time, but couldn't see it.
To answer the most fundamental question you have asked: I am ready and happy to announe that I can now ditch the mf we don't mention the name of and switch to OOo. Very Happy
To sum up, the solution given by Bhikkhu made my life, and I'm sure lives of many a lot easier, but the issue remains alive and kicking, as the function to do the count properly is still not implemented.

Jarek

PS. I've just noticed that Bhikkhu Pesala is actually a Buddhist monk. Sorry for the "Blessed" remark, hope you're not offended. Guess it really requires a quiet mind to see the simplest answer. Thank you 1000 times.
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Wed Sep 21, 2005 7:22 am    Post subject: Reply with quote

This is a tough thread to comment on because what constitute a "proper" word/character count differs from user to user.

A comment above indicates the OO counts a carriage return (which means a paragraph break to me) as a character. I don't believe this is true but it does count a line break as a character which makes no sense to me. They are both nonprinting items and you should either count both or neither.

I have provided a user configurable word/character count macro here which does selected text (only minimally tested in OOo2 beta2 but appeared to work):
http://www.oooforum.org/forum/viewtopic.phtml?t=5934&

8DaysWeek has provided an installer for it here:
http://www.8daysaweek.co.uk/downloads.htm#WordCount

Without going either place you can see its weak and strong points and how you configure it in the partial snippet from it listed below. When I learned OOo version 2 would have a selection count I ceased developing this macro. Perhaps I should revisit it.
Code:
' Based on the original* "dvwc" macro by Daniel Vogelheim   *see end of doc
' Displays a message box with number of words & characters
' in the document and the current selection.
' John Vigor edited this in 2003 to provide both a character count
' and a character count with exclusions. DV's had one of these.
' Does not normally count in frames, headers, footers or footnotes
' although these items may be individually selected. Selected text
' cannot exceed 64K of characters. (About 18 dense single spaced pages
' using New Times Roman size 12 and 1 inch margins all around. This
' size takes about 20 seconds on a 770MHz machine, so go get a cup
' of coffee or just be patient.)
' OO's word count, as of OO1.1 rc4, does not count in fields but does
' count in the other areas mentioned above. OO's character count
' counts a line break (Shift+Enter) as a character (Issue filed #16918).   

Sub SelectionCount
'DEFINE CHARACTER COUNT BELOW. The default exclusions from character count are
'spaces & tabs, i.e., one of each of these is contained in the definition of e$.
'You can add characters between the quotes and/or delete the space and/or tab.
e$ = Chr(32) + Chr(9)  ' Chr(32) is a space, Chr(9) is a tab. Valid replacements would
'be e$ = Chr(32) or e$ = Chr(9) or e$ = "" with the latter being no exclusions. If you
'did not change e$ and if the line below read:
' sExcludeFromCharacterCount$ = e$ + "a" then spaces, tabs and the letter "a" would not
'be counted.   
sExcludeFromCharCount$ = e$ +  ""
'DEFINE WORD SEPERATORS BELOW. The default word separators are spaces and
'hyphens (true hyphenated words like "half-dollar" will be counted as two words
'instead of one). You can add separators between the quotes and/or delete the hyphen.
'Examples: "/" to count "and/or" as two words. "&" to count "Johnson & Johnson" as
'two words instead of three. A period is not normally needed but you can add one
'to count "www.website.com" as three words instead of one.   
sWordSeps = " -"
' This section is basically all DV's code with small modifications needed by JV
sWordSeps = sWordSeps + chr(9) + chr(10) + chr(13)'a tab, line break and paragraph break
sNeverCountChars = chr(10) & chr(13)'never include line or paragraph breaks in char count
oDocument = thisComponent
Back to top
View user's profile Send private message
jamtat
OOo Advocate
OOo Advocate


Joined: 27 Sep 2004
Posts: 207

PostPosted: Wed Sep 21, 2005 12:04 pm    Post subject: Reply with quote

jsawiuk wrote:
The thing asserted at the beginning remains true, though, as the solution given . . . still requires the use of an external application (namely, a calculator).


Wow, and I thought my math capabilities were lacking. It would have to be a stupendously large number (like in the billions) before I would resort to a calculator rather than just quickly doing the subtraction in my head. Anyway, glad to hear this take on it removes the final obstacle to a full switchover. Let's hope others can learn from this thread that, if there's not a direct means of getting various character counts, there is at least a really simple workaround for what is probably the most commonly needed type of character count.

James
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group