Between the sheets

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

Between the sheets

Post by richmond62 » Fri Sep 06, 2019 9:29 am

I have a corpus of sentences of this sort:

She drinks coffee at night.
He drinks tea at night, but occasionally coffee.
We, at night, often drink coffee.
Looking through the window she saw her father drinking: this, at first perturbed her,
until she realised it was not vodka but coffee.

And I am interested in how, relatively easily, one could calculate the number of words
in each sentence between the words 'drink' and 'coffee.'
-
coffee.jpeg
coffee.jpeg (9.32 KiB) Viewed 1824 times

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Between the sheets

Post by Klaus » Fri Sep 06, 2019 9:47 am

Hi Richmond,

use "wordoffset" or even "truewordoffset" for "drink" and "coffee".

First check if the offset of "drink" is lower than "coffee" and then you can calculate
the number or word between them, I'm sure you will manage that one. :-)


Best

Klaus

Post Reply