Re: (resend)
Re: (resend)
- Subject: Re: (resend)
- From: Shane Stanley <email@hidden>
- Date: Tue, 30 Mar 2010 17:31:49 +1100
- Thread-topic: (resend)
On 30/3/10 4:45 PM, "Alex Zavatone" <email@hidden> wrote:
> Ok. I come from the world of "one space or twenty thousand spaces between two
> words still means that you still have two words".
Which is what happens in AS.
> All in all, I'm a little spoiled by the language of my devonian past, where
> you could magically pick the actual word from the source, by index, no matter
> how many spaces or bizarre crud appears inside.
So it handled things like, oh, "under-the-table" as one word? And does it
include the comma in "one, two" as part of the first word?
> Words need to be delimited by spaces, no matter now many there are between the
> words.
But not *only* by spaces. The first word of a paragraph, for instance, isn't
usually preceded by a space. Words in many languages are never delimited by
spaces. We're not in ASCII land any more.
>
> Sweet mother of bacon. Text chunking should not be this hard.
It's a lot easier if you understand the tools you're given. Words is a bad
choice -- they're hard to define properly, especially with Unicode character
sets, and the definition must depend on the language involved.
The only real tool in AS, the text item delimiter, is very limited. But
unlike someone's definition of word, it's precise.
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Re: (resend) (From: Alex Zavatone <email@hidden>) |