On Jun 22, 2009, at 10:10 AM, Steve Cronin wrote:
BUT in my case I don't care where, what word or how often - I just
want to know IF a tag occurs in thePhrase!!
thePhrase = 8 words
theTags = 150 words
It seems that you have two sets (in the mathematical sense) and all
you want to know is if their intersection is non-empty. Easiest
solution: create two NSSet objects and use Apple's optimized
implementation of set intersection:
BOOL tagAppearsInPhrase = [tagSet intersectsSet: phraseSet];
Anything you do otherwise will likely not be as fast.
Wagner
_______________________________________________
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