Searching for "whole word" in NSString
Searching for "whole word" in NSString
- Subject: Searching for "whole word" in NSString
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Thu, 7 Feb 2008 07:28:36 +0700
From: Mike Wright <email@hidden>
On Feb. 5, 2008, at 22:30 , Deborah Goldsmith wrote:
This doesn't work for all languages. What constitutes a "word" is
rather more complex than this. In Thai, for a particularly egregious
example, you can't find word boundaries without looking up the words
in a dictionary.
Whole-word searching seems pretty unnecessary (and virtually
impossible) for Japanese and Chinese. Does it really make sense for
Thai?
To be able to insert line-breaks into a text, one must know word
boundaries.
And if one wants to find the word "กอ", one would not be
interested in "กอง" or "มะละกอ".
The problem is that the parsing of a string of Thai-characters into
words is sometimes not unique: "กอดอก" could be read as
กอ ดอก (a clump of flowers) or as กอด อก (fold the
arms around the chest).
TextEdit treats composita as one word; so a full word search for
"กอ" will not find any occurrence in "กอดอก".
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