From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, May 16, 2004 2:25 PM
Subject: Re: Strip multiple words from string
>
> Just consider that there may be a big difference in the algorithm and the
> processing time between the two approaches of a) stripping duplicates and
> b) not adding duplicates to the assembled string in the first place.
Duplicates result from the assembly of strings. They need to be removed
after they are assembled.
> What are you calling a phrase?
A phrase in this case would be two or three words separated from other
phrases and words by a comma, i.e. "word1, phrase one, word2, phrase two,
phrase three".
> > Would be difficult to create a dictionary of all words that may
> > be in original string.
>
> No doubt. But words are fairly easy to parse - generally anything
> delimited by white space or punctuation. Short of creating a parser for
> English grammar, though, I'm not sure how you'd pull out phrases.
I feel this solution is too complex for what is needed and would also be a
processing time concern.
> I you want to call any string of words between punctuation marks a
> "phrase", then loop over your original string as a list, but don't include
> white space characters among the delimiters.
Will try the loop approach.
Thanks,
Doug
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

