|
|
Good word counting algorithm?
|
|
|
|
Junior Member
Join Date: Mar 2003
Location: Walnut Creek, CA
Status:
Offline
|
|
I was wondering: does anyone know a better word counting algorithm than counting spaces (or, in Cocoa [[theString componentsSeparatedByString:@" "] count])? Thanks.
|
I bring order to chaos. You are in chaos windows, you are the contradiction, a bug wishing to be an OS.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
You seem to be working in Obj-C... is that a requirement? What are you actually looking at doing? Is this for english only? Does it need unicode support? Is this simple text, or are we looking at html/programming/etc...
What I am trying to get across is that you have not asked a solid question, so there is no way anyone could really approach answering it. You also do not indicate that you have researched this topic at all, as there are a whole lot of word parsing algorithms out there for different problem spaces.
executive summary: figure out your question first, then research it, then post.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by GeeYouEye:
I was wondering: does anyone know a better word counting algorithm than counting spaces (or, in Cocoa [[theString componentsSeparatedByString:@" "] count])? Thanks.
Counting spaces will be useless in most cases. There are too many word separators which do not incorporate spaces (punctuation, newlines, etc). Like the above poster said, you need to figure out what you want, first.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
(
Last edited by AirSluf; Nov 9, 2004 at 01:40 AM.
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|