"shakes" and "wiggles"

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

"shakes" and "wiggles"

Post by richmond62 » Fri Aug 16, 2019 9:55 pm

This:

Code: Select all

on mouseUp
   if fld "TEKST" contains "shakes" & "wiggles" then
      put "YUP" into fld "REZ"
   else 
   put "NOPE" into fld "REZ"
   end if
end mouseUp
ALWAYS returns "NOPE" even when fld "TEKST" contains:

"She shakes and wiggles across the stage like a snake."

This is a problem.

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: "shakes" and "wiggles"

Post by SparkOut » Fri Aug 16, 2019 11:02 pm

Hi Richmond

if field "TEKST" contains "shakes" AND field "TEKST" contains "wiggles" then...


If you delve deeper you will see that what you have been asking is whether field "TEKST" contains "shakeswiggles"

"&" is a concatenator

"and" is a boolean operator.

and "wiggles" is not a valid test either, you'd need to test the condition of "wiggles" against the field the same as "shakes":

IF (boolean test A resolves to true) AND (boolean test B resolves to true) THEN...

but you can't have "wiggles" as boolean test B - well you can, but not sensibly in this context.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: "shakes" and "wiggles"

Post by richmond62 » Sat Aug 17, 2019 12:49 pm

Thanks SparkOut for a very comprehensive and easily comprehensible answer. :D
-
AND.png
Attachments
AND.livecode.zip
Here's the stack.
(1.08 KiB) Downloaded 169 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: "shakes" and "wiggles"

Post by richmond62 » Sat Aug 17, 2019 2:27 pm

WOZZUP.png
-
Linguists often need to work their way through linguistic corpora to find co-occurrences of words . . .

There are commercially available applications to do this sort of thing that cost quite a bit of money . . .

Between 26th August and 6th of September I shall be teaching an introductory course in LiveCode
to members of the Philological Faculty of the University of Plovdiv . . . an institution not noted for
having "bags of moolah" to pay for specialist software for its academics to use for their academic
research.
-
Screenshot 2019-08-17 at 17.25.31.png
-
Screenshot 2019-08-17 at 17.26.04.png
Last edited by richmond62 on Sat Aug 17, 2019 3:27 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: "shakes" and "wiggles"

Post by richmond62 » Sat Aug 17, 2019 3:22 pm

textMine.png
-
Obviously, because I'm a "sadistic old sausage" I will NOT include all the code in the
stack I dole out to the students. :twisted:
Last edited by richmond62 on Sat Aug 17, 2019 9:00 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: "shakes" and "wiggles"

Post by richmond62 » Sat Aug 17, 2019 8:59 pm

New and improved version.
-
TextMine2.png
Attachments
Text Mining #1.livecode.zip
Here's the stack.
(2.01 KiB) Downloaded 185 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: "shakes" and "wiggles"

Post by richmond62 » Sun Aug 18, 2019 4:23 pm

Ideally . . . this stack should be built up to provide all the capabilities available
with this commercial software package:

http://www.athel.com/colloc.html

This is silly:

" Educational Price. Single user: $45
Site licence (2-year, 15 users) $395"

especially as it is a Windows-only package.

This:

https://lexically.net/downloads/version ... basics.htm

is a suite of Windows-only tools at the price of "£50 (approx. US$70-80 or €65)"

What particularly cheeses me off is the fact that neither of these offerings actually mentions
that they are Windows-only, nor which versions of Windows they will work on.

Post Reply