• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: parsing a string into words
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: parsing a string into words
      • From: Ken Thomases <email@hidden>
References: 
 >Re: parsing a string into words (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: parsing a string into words (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: NSButtonCell binds only readonly; Non-bool bindings OK.
  • Next by Date: Re: parsing a string into words
  • Previous by thread: Re: parsing a string into words
  • Next by thread: Re: parsing a string into words
  • Index(es):
    • Date
    • Thread