Re: parsing a string into words
Re: parsing a string into words
- Subject: Re: parsing a string into words
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 26 Apr 2009 10:06:01 +0700
On 26 Apr 2009, at 02:09, Aki Inoue wrote:
In AppKit land, -[NSAttributedString doubleClickAtIndex:] would help
you.
Thanks a lot!
I tested all three methods and found that:
1. NSTextView takes about 900 μsec to parse a Thai sentence into 17
words.
2. NSAttributedString took only 530 μsec for the same result.
3a. CFStringTokenizer took 60 μsec for a similar result (option = Word
Break).
3b. Using option = Word takes 225 μsec for a slightly better result.
One question though: why are "version4", "ปี2009" or "ทีมA"
all parsed as one word?
I would think that the change from letters to numbers, or from Thai to
Latin would indicate a word-break.
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden