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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to