Re: Word chunk includes punctuation

2012-08-15 Thread Bob Sneidar
I don't expect anything I author to actually work! And yet sometimes it does. I suppose it all balances out. ;-) On Aug 15, 2012, at 7:33 AM, Peter M. Brigham wrote: > If I put the following into a field: > How many "words are in this field?" > and then try > put the number of words of fld "

Re: Word chunk includes punctuation

2012-08-15 Thread Peter M. Brigham
On Aug 15, 2012, at 8:24 AM, Richard Gaskin wrote: > Peter M. Brigham wrote: > > If I put the following into a field: > >How many "words are in this field?" > > and then try > >put the number of words of fld "f" > > I get > >3 > > That is not what *I* would expect. There was a discuss

Re: Word chunk includes punctuation

2012-08-15 Thread Richard Gaskin
Peter M. Brigham wrote: > If I put the following into a field: >How many "words are in this field?" > and then try >put the number of words of fld "f" > I get >3 > That is not what *I* would expect. There was a discussion last year > on this list of the pros and cons of maintaining the

Re: Word chunk includes punctuation

2012-08-15 Thread Peter M. Brigham
On Aug 15, 2012, at 7:23 AM, Jim Hurley wrote: > Just diving in I tried:put the number of words in tText into msg box > > No matter what I put into tText by way of quotes or tabs or punctuation, I > always seem to get what I expect. > > It would be nice if someone would post a line or two o

Re: Word chunk includes punctuation

2012-08-15 Thread Jim Hurley
I haven't really followed this issue, but that has never stopped me in the past. Just diving in I tried:put the number of words in tText into msg box No matter what I put into tText by way of quotes or tabs or punctuation, I always seem to get what I expect. It would be nice if someone woul

Re: Word chunk includes punctuation

2012-08-15 Thread Jim Hurley
> > Message: 27 > Date: Tue, 14 Aug 2012 14:41:48 -0500 > From: "J. Landman Gay" > To: How to use LiveCode > Subject: Re: Word chunk includes punctuation > Message-ID: <502aa9fc.3000...@hyperactivesw.com> > Content-Type: text/plain; charset=ISO-8859-1

Re: Word chunk includes punctuation

2012-08-14 Thread J. Landman Gay
On 8/14/12 12:47 AM, Scott Morrow wrote: Mark, not even a token effort? -- Scott Morrow On Aug 13, 2012, at 9:41 PM, Mark Wieder wrote: Jim- Monday, August 13, 2012, 5:31:07 PM, you wrote: So, how many words could a word chunk chunk, if a word chunk could chunk words? groan. All right

Re: Word chunk includes punctuation

2012-08-14 Thread Bob Sneidar
>From the dictionary: 1. Each of the following characters is a token: =, +, -, *, /, [, ], (, ), {, }, <, >, and comma (,). 2. Each of the following characters is a token delimiter: ; (semicolon), space, return, and tab. So no, a question mark is NOT a delimiter. In this the dictionary speaks t

Re: Word chunk includes punctuation

2012-08-14 Thread Bob Sneidar
HAR! Bob On Aug 13, 2012, at 5:31 PM, Jim Hurley wrote: > So, how many words could a word chunk chunk, if a word chunk could chunk > words? > > Jim ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, uns

Re: Word chunk includes punctuation

2012-08-14 Thread Peter M. Brigham
On Aug 13, 2012, at 2:20 PM, Paul Dupuis wrote: > The documentation also doesn't mention that ? works as a token per > Mark's post, so perhaps my caution is unwarranted. Hmmm. For me, put token 1 of ("test1?test2") gives test1?test2 so questionmark does not seem to be either a token or a to

Re: Word chunk includes punctuation

2012-08-13 Thread James Hale
Well thank you all for your replies. wasn't sure about using tokens (token 1 of word) as I wasn't sure of the overhead. however the alternative was to remove all pesky punctuation before running through my script. I thought I would try both. first script replaced . , ? ! ; : both within and at

Re: Word chunk includes punctuation

2012-08-13 Thread Scott Morrow
Mark, not even a token effort? -- Scott Morrow On Aug 13, 2012, at 9:41 PM, Mark Wieder wrote: > Jim- > > Monday, August 13, 2012, 5:31:07 PM, you wrote: > >> So, how many words could a word chunk chunk, if a word chunk could chunk >> words? > > groan. > > > -- > -Mark Wieder > mwie...@ah

Re: Word chunk includes punctuation

2012-08-13 Thread Mark Wieder
Jim- Monday, August 13, 2012, 5:31:07 PM, you wrote: > So, how many words could a word chunk chunk, if a word chunk could chunk > words? groan. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Pl

Re: Word chunk includes punctuation

2012-08-13 Thread Jim Hurley
> > Message: 21 > Date: Mon, 13 Aug 2012 17:00:28 -0500 > From: "J. Landman Gay" > To: How to use LiveCode > Subject: Re: Word chunk includes punctuation > Message-ID: <502978fc.5080...@hyperactivesw.com> > Content-Type: text/plain; charset=ISO-8859-1; fo

Re: Word chunk includes punctuation

2012-08-13 Thread Paul Dupuis
Peter, That would be great. Even better would be to post as a user comment to the Live Code Dictionary so the correct information is available to everyone who look up "token" in the Dictionary. Or if you prefer to post here, would you mind if I or someone then added it to the Dictionary entry? O

Re: Word chunk includes punctuation

2012-08-13 Thread Peter Haworth
I've used tokens quite a bit for parsing sqlite statements and the docs are definitely incomplete. I'll try to rebuild what I learned and publish it to the list. Pete lcSQL Software On Mon, Aug 13, 2012 at 2:01 PM, Bob Sneidar wrote: > Hmmm... odd again that > put token

Re: Word chunk includes punctuation

2012-08-13 Thread Mark Wieder
Paul Dupuis writes: > > The documentation also doesn't mention that ? works as a token per > Mark's post, so perhaps my caution is unwarranted. You know, I could swear I tried this before posting, and I've still got the commands in my message box history to prove it, but I'm getting different r

Re: Word chunk includes punctuation

2012-08-13 Thread Bob Sneidar
Dam yer good! Bob On Aug 13, 2012, at 3:00 PM, J. Landman Gay wrote: > On 8/13/12 4:45 PM, Bob Sneidar wrote: >> Seems period is the only common punctuation that is not considered a >> token. How odd is that?? > > Probably to get the right results when the word is a decimal number or a url. >

Re: Word chunk includes punctuation

2012-08-13 Thread J. Landman Gay
On 8/13/12 4:45 PM, Bob Sneidar wrote: Seems period is the only common punctuation that is not considered a token. How odd is that?? Probably to get the right results when the word is a decimal number or a url. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Soft

Re: Word chunk includes punctuation

2012-08-13 Thread Bob Sneidar
Seems period is the only common punctuation that is not considered a token. How odd is that?? Bob On Aug 13, 2012, at 2:20 PM, Paul Dupuis wrote: > The documentation also doesn't mention that ? works as a token per > Mark's post, so perhaps my caution is unwarranted. > > Silly me, I believed

Re: Word chunk includes punctuation

2012-08-13 Thread Paul Dupuis
The documentation also doesn't mention that ? works as a token per Mark's post, so perhaps my caution is unwarranted. Silly me, I believed the documentation! On 8/13/2012 5:01 PM, Bob Sneidar wrote: > Hmmm... odd again that > put token one of word one of "test1!" > > gives me > "test1" without t

Re: Word chunk includes punctuation

2012-08-13 Thread Bob Sneidar
Hmmm... odd again that put token one of word one of "test1!" gives me "test1" without the exclamation mark. The documentation states: 1. Each of the following characters is a token: =, +, -, *, /, [, ], (, ), {, }, <, >, and comma (,). The exclamation mark is not one of those (unless I am tok

Re: Word chunk includes punctuation

2012-08-13 Thread Mark Wieder
Paul- Monday, August 13, 2012, 1:32:58 PM, you wrote: > One caution: token does not separate . (period), ! (exclamation mark), > or ? (question mark). If you are really trying to process English text, > you probably will want to write your own punctuation remover as it can > then figure the diffe

Re: Word chunk includes punctuation

2012-08-13 Thread Paul Dupuis
On 8/13/2012 12:13 PM, Ken Ray wrote: > On Aug 13, 2012, at 11:10 AM, James Hale wrote: > >> Is this a bug? > No, it's a 'convention'… it mimics the way that HyperCard recognized a > "word"; as stated in the Dictionary under "word": > > "A word is delimited by one or more spaces, tabs, or returns,

Re: Word chunk includes punctuation

2012-08-13 Thread Richard Gaskin
Bob Sneidar wrote: Ahah! So concatenation is not a very high priority when evaluating statements. I learn something new every day! I can see though why it would be like that. I could also ask for: word 1 of "one two" & word 1 of "three four" and expect "one three". One more argument for grou

Re: Word chunk includes punctuation

2012-08-13 Thread Bob Sneidar
Ahah! So concatenation is not a very high priority when evaluating statements. I learn something new every day! I can see though why it would be like that. I could also ask for: word 1 of "one two" & word 1 of "three four" and expect "one three". One more argument for grouping with parentheses

Re: Word chunk includes punctuation

2012-08-13 Thread Mark Wieder
Bob Sneidar writes: > > Wait, tab too? Odd since > put word one of "test1" & tab & "test2" > gives me > "test1test2" LOL. Yes, it does. You're asking for (word one of "test1") & tab & "test2" -- Mark Wieder mwie...@ahsoftware.net __

Re: Word chunk includes punctuation

2012-08-13 Thread Bob Sneidar
Wait, tab too? Odd since put word one of "test1" & tab & "test2" gives me "test1 test2" Bob On Aug 13, 2012, at 9:13 AM, Ken Ray wrote: > "A word is delimited by one or more spaces, tabs, or returns, or enclosed by > double quotes. A single word can contain multiple characters and multiple

Re: Word chunk includes punctuation

2012-08-13 Thread Ken Ray
On Aug 13, 2012, at 11:10 AM, James Hale wrote: > Is this a bug? No, it's a 'convention'… it mimics the way that HyperCard recognized a "word"; as stated in the Dictionary under "word": "A word is delimited by one or more spaces, tabs, or returns, or enclosed by double quotes. A single word c

Re: Word chunk includes punctuation

2012-08-13 Thread Mark Wieder
James- Monday, August 13, 2012, 8:10:57 AM, you wrote: > If not, has anyone got a workaround that doesn't require me > testing for a punctuation character at the end of every word or > replacing them all with spaces? Token 1 of word 5 of... -- -Mark Wieder mwie...@ahsoftware.net ___

Word chunk includes punctuation

2012-08-13 Thread James Hale
I haven't noticed this before but getting the word chunk of some text returns punctuation with the chunk. For example, consider the following string: "My this is a nice, albeit short test. But it will do." Now if I ask for word 4 I get "a" as expected. If is ask for word 5 I get "nice," whi