Re: Counting Syllables

2022-03-24 Thread Craig Newman via use-livecode
I am actually having trouble finding a dictionary “dump” that would provide a 
list of words along with a syllabic entry attached. If such a thing exists, we 
only need a dozen lines of code and ten minutes to create a database mapping 
each word to its syllable count.

Anyone know of such a resource?

Craig

> On Mar 24, 2022, at 9:34 AM, Rick Harrison via use-livecode 
>  wrote:
> 
> Yes, I’m looking into that.  Web-scraping isn’t fun though, and it can be a 
> lot of work.
> One also has to make sure it doesn’t violate company policies etc.  I’m not a 
> fan
> of getting sued.
> 
> Rick
> 
>> On Mar 24, 2022, at 1:55 AM, Dick Kriesel via use-livecode 
>>  wrote:
>> 
>> You could scrape an online dictionary to obtain the syllabification for each 
>> given word.
>> 
>> For example, if you investigate 
>> https://www.dictionary.com/browse/syllabification 
>>  
>> > >, you can find the query 
>> that yielded "syl·lab·i·fi·ca·tion."
>> 
>> You might find other dictionaries that make it easier.
>> 
>> — Dick
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-24 Thread Rick Harrison via use-livecode
Yes, I’m looking into that.  Web-scraping isn’t fun though, and it can be a lot 
of work.
One also has to make sure it doesn’t violate company policies etc.  I’m not a 
fan
of getting sued.

Rick

> On Mar 24, 2022, at 1:55 AM, Dick Kriesel via use-livecode 
>  wrote:
> 
> You could scrape an online dictionary to obtain the syllabification for each 
> given word.
> 
> For example, if you investigate 
> https://www.dictionary.com/browse/syllabification 
>  
>  >, you can find the query 
> that yielded "syl·lab·i·fi·ca·tion."
> 
> You might find other dictionaries that make it easier.
> 
> — Dick

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-23 Thread Dick Kriesel via use-livecode


> On Mar 22, 2022, at 7:25 AM, Rick Harrison via use-livecode 
>  wrote:
> 
> An existing database would make things a lot easier.

You could scrape an online dictionary to obtain the syllabification for each 
given word.

For example, if you investigate 
https://www.dictionary.com/browse/syllabification 
, you can find the query 
that yielded "syl·lab·i·fi·ca·tion."

You might find other dictionaries that make it easier.

— Dick
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-22 Thread Bob Sneidar via use-livecode
That's because the British take 1.46 times as long as Americans to say 
anything. ;-)

Bob S


> On Mar 22, 2022, at 15:21 , Craig Newman via use-livecode 
>  wrote:
> 
> Brian.
> 
> Storage space should not be an issue. A typical dictionary , whether American 
> (191,000)  or British (280,000), with a median word length of about 8 chars, 
> still only occupies a handful of MB of storage.
> 
> Craig


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-22 Thread Craig Newman via use-livecode
Brian.

Storage space should not be an issue. A typical dictionary , whether American 
(191,000)  or British (280,000), with a median word length of about 8 chars, 
still only occupies a handful of MB of storage.

Craig

> On Mar 22, 2022, at 10:25 AM, Rick Harrison via use-livecode 
>  wrote:
> 
> Yes, that is where I’m at.  An existing database would make things a lot 
> easier.
> 
> Rick
> 
>> On Mar 22, 2022, at 9:06 AM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> If you have a database at all, it would cost nothing much in speed to just 
>> use the whole thing all the time. Put the database into an array, of the 
>> form:
>> “cat 1”
>> "chicken 2”
>> “elephant 3”
>> ‘miaou 1"
>> …
>> 
>> The hard part is finding that database. It would take quite a while to build 
>> and finalize your own.
>> 
>> Craig
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-22 Thread Rick Harrison via use-livecode
Yes, that is where I’m at.  An existing database would make things a lot easier.

Rick

> On Mar 22, 2022, at 9:06 AM, Craig Newman via use-livecode 
>  wrote:
> 
> If you have a database at all, it would cost nothing much in speed to just 
> use the whole thing all the time. Put the database into an array, of the form:
> “cat 1”
> "chicken 2”
> “elephant 3”
> ‘miaou 1"
> …
> 
> The hard part is finding that database. It would take quite a while to build 
> and finalize your own.
> 
> Craig

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-22 Thread Brian Milby via use-livecode
True about speed, but I was more thinking about storage space and tolerance to 
missing words.  A complete dictionary would likely be faster.

Brian

Sent from my iPhone

> On Mar 22, 2022, at 9:07 AM, Craig Newman via use-livecode 
>  wrote:
> 
> If you have a database at all, it would cost nothing much in speed to just 
> use the whole thing all the time. Put the database into an array, of the form:
> “cat 1”
> "chicken 2”
> “elephant 3”
> ‘miaou 1"
> …
> 
> The hard part is finding that database. It would take quite a while to build 
> and finalize your own.
> 
> Craig
> 
> 
>> On Mar 21, 2022, at 10:47 PM, Brian Milby via use-livecode 
>>  wrote:
>> 
>> Well, you could set up your rules and just database the exceptions.  Then 
>> you at least have a guess for the words that you don’t “know” the answer 
>> for.  If there is a database miss, then use the rule set.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-22 Thread Craig Newman via use-livecode
If you have a database at all, it would cost nothing much in speed to just use 
the whole thing all the time. Put the database into an array, of the form:
“cat 1”
"chicken 2”
“elephant 3”
‘miaou 1"
…

The hard part is finding that database. It would take quite a while to build 
and finalize your own.

Craig


> On Mar 21, 2022, at 10:47 PM, Brian Milby via use-livecode 
>  wrote:
> 
> Well, you could set up your rules and just database the exceptions.  Then you 
> at least have a guess for the words that you don’t “know” the answer for.  If 
> there is a database miss, then use the rule set.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-21 Thread Rick Harrison via use-livecode
I’ve tried a bunch of things. It’s 80-90% correct, but failing 10-20% of the 
time due to irregulars isn’t acceptable.
I think I have to look into a database table lookup solution, but I’m dreading 
it.

Thanks,

Rick

> On Mar 21, 2022, at 4:18 PM, Craig Newman via use-livecode 
>  wrote:
> 
> Such cases are rare, certainly, but “queue” comes to mind. I am sure that a 
> vowel parsing routine will be reasonably accurate, but not perfect, as per 
> the previous example.
> 
> A quick search did not turn up any “list of all words and their syllable 
> count”, but there still might be one. One site mentioned that algorithms were 
> being used, but were “not perfect”.
> 
> Craig

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-21 Thread Craig Newman via use-livecode
Such cases are rare, certainly, but “queue” comes to mind. I am sure that a 
vowel parsing routine will be reasonably accurate, but not perfect, as per the 
previous example.

A quick search did not turn up any “list of all words and their syllable 
count”, but there still might be one. One site mentioned that algorithms were 
being used, but were “not perfect”.

Craig



> On Mar 21, 2022, at 3:21 PM, Rick Harrison via use-livecode 
>  wrote:
> 
> “miaou” has 4 consecutive vowels so I’m not surprised it has 2 syllables.  
> That may be a rule.
> 
> The average person uses about 20,000 words on a regular basis.
> 
> They know about 40,000 visually.
> 
> It’s estimated there are about 1.25 million english words, but a lot of those 
> are scientific terms.
> 
> Anyone up to building a cross reference database that can be searched quickly?
> 
> Rick
> 
>> “miaou” is two syllables
> 
>> On Mar 21, 2022, at 10:56 AM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> I would think one would need a database that maps all words with the number 
>> of syllables in those words. I am sure some sort of algorithm would do a 
>> creditable job, but I bet it would not do a perfect job. For example, and 
>> embedded “eau” is usually one syllable, but a word such as “miaou” is two 
>> syllables
>> 
>> Craig
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-21 Thread Rick Harrison via use-livecode
“miaou” has 4 consecutive vowels so I’m not surprised it has 2 syllables.  That 
may be a rule.

The average person uses about 20,000 words on a regular basis.

They know about 40,000 visually.

It’s estimated there are about 1.25 million english words, but a lot of those 
are scientific terms.

Anyone up to building a cross reference database that can be searched quickly?

Rick

> “miaou” is two syllables

> On Mar 21, 2022, at 10:56 AM, Craig Newman via use-livecode 
>  wrote:
> 
> I would think one would need a database that maps all words with the number 
> of syllables in those words. I am sure some sort of algorithm would do a 
> creditable job, but I bet it would not do a perfect job. For example, and 
> embedded “eau” is usually one syllable, but a word such as “miaou” is two 
> syllables
> 
> Craig

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-21 Thread Craig Newman via use-livecode
I would think one would need a database that maps all words with the number of 
syllables in those words. I am sure some sort of algorithm would do a 
creditable job, but I bet it would not do a perfect job. For example, and 
embedded “eau” is usually one syllable, but a word such as “miaou” is two 
syllables

Craig

> On Mar 20, 2022, at 2:51 PM, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Richmond,
> 
> Yes, English. Sorry I forgot to be specific, I thought it was implied.
> 
> Yes, I have been counting vowels, but there appear to be a lot of exceptions,
> so there must be a lot more rules.
> 
> I need to know what all the rules are to make it work if possible.
> 
> There are websites out there on the internet that will count
> syllables in whatever text given to them so it must be possible.
> How are they doing it?  Is it an algorithm ,or are they comparing
> the words to a database table that has all the dictionary information?
> 
> Thanks,
> 
> Rick
> 
> 
>> On Mar 20, 2022, at 2:29 PM, Richmond via use-livecode 
>>  wrote:
>> 
>> Well, syllables are language dependent, so let's suppose for the moment that
>> you are ONLY working with English, the, presumably, you can set up vowels
>> as item-delimiters: although you might get a bit mixed up with words sucj
>> as 'beautiful' which, while having 5 vowels only has 3 syllables.
>> 
>> Basically you have to work out how to detect V+C and open vowels at the
>> end of words.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Rick Harrison via use-livecode
I found this:

https://www.dcc-cde.ca.gov/professionaldev/events/documents/syllabication-packet-2021-04.pdf
 


I’m not sure how comprehensive it is yet, but it has me thinking!

I tried looking up syllable in wikipedia and read more about it then I could 
ever practically use.
You might want to take a look at the article just for fun anyway.

https://en.wikipedia.org/wiki/Syllable 

Rick


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Rick Harrison via use-livecode
Hi Richmond,

Yes, I came across syllablecounter.net which only intrigued me more.

Unfortunately it reports the word triangle has 2 syllables which is incorrect.
Any dictionary will tell you triangle has 3 syllables.  Is there a rule for that
or is it just an exception to some rule?

Perhaps there are other examples out there I can find.

Whatever happened to our pocket English Teacher App?
(Oh sorry, I forgot, that one hasn’t been invented yet to my knowledge.)

Thanks,

Rick

> On Mar 20, 2022, at 3:57 PM, Richmond via use-livecode 
>  wrote:
> 
> Frankly I'd go for isolated vowels (I, A), Vowel+ Consonant (In, On, An), and 
> Consonant+ Vowel (La, Lo, Fi), you
> also have a problem with the semi-vowel Y, and the semi-vowel U ( 'yu' as un 
> Union, and 'u' as in Utter).
> 
> This is pretty impressive: https://syllablecounter.net/count 
> 
> 
> I gave it 'Beautiful aesthetic foetuses' and it came up, correctly, with 9 
> syllables . . . the Q is what's the code:
> probably time to download the webpage and poke around a bit.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Rick Harrison via use-livecode
Hi Colin,

Thanks for sharing this.  I’m reading it now!

Rick

> On Mar 20, 2022, at 3:12 PM, Colin Holgate via use-livecode 
>  wrote:
> 
> This post goes over some techniques:
> 
> https://mholtzscher.github.io/2018/05/29/syllables/ 
>  
>  >
> 
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Richmond via use-livecode
Frankly I'd go for isolated vowels (I, A), Vowel+ Consonant (In, On, 
An), and Consonant+ Vowel (La, Lo, Fi), you
also have a problem with the semi-vowel Y, and the semi-vowel U ( 'yu' 
as un Union, and 'u' as in Utter).


This is pretty impressive: https://syllablecounter.net/count

I gave it 'Beautiful aesthetic foetuses' and it came up, correctly, with 
9 syllables . . . the Q is what's the code:

probably time to download the webpage and poke around a bit.

On 20.03.22 21:12, Colin Holgate via use-livecode wrote:

This post goes over some techniques:

https://mholtzscher.github.io/2018/05/29/syllables/ 





On Mar 20, 2022, at 12:51 PM, Rick Harrison via use-livecode 
 wrote:

Hi Richmond,

Yes, English. Sorry I forgot to be specific, I thought it was implied.

Yes, I have been counting vowels, but there appear to be a lot of exceptions,
so there must be a lot more rules.

I need to know what all the rules are to make it work if possible.

There are websites out there on the internet that will count
syllables in whatever text given to them so it must be possible.
How are they doing it?  Is it an algorithm ,or are they comparing
the words to a database table that has all the dictionary information?

Thanks,

Rick



On Mar 20, 2022, at 2:29 PM, Richmond via use-livecode 
 wrote:

Well, syllables are language dependent, so let's suppose for the moment that
you are ONLY working with English, the, presumably, you can set up vowels
as item-delimiters: although you might get a bit mixed up with words sucj
as 'beautiful' which, while having 5 vowels only has 3 syllables.

Basically you have to work out how to detect V+C and open vowels at the
end of words.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Colin Holgate via use-livecode
This post goes over some techniques:

https://mholtzscher.github.io/2018/05/29/syllables/ 




> On Mar 20, 2022, at 12:51 PM, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Richmond,
> 
> Yes, English. Sorry I forgot to be specific, I thought it was implied.
> 
> Yes, I have been counting vowels, but there appear to be a lot of exceptions,
> so there must be a lot more rules.
> 
> I need to know what all the rules are to make it work if possible.
> 
> There are websites out there on the internet that will count
> syllables in whatever text given to them so it must be possible.
> How are they doing it?  Is it an algorithm ,or are they comparing
> the words to a database table that has all the dictionary information?
> 
> Thanks,
> 
> Rick
> 
> 
>> On Mar 20, 2022, at 2:29 PM, Richmond via use-livecode 
>>  wrote:
>> 
>> Well, syllables are language dependent, so let's suppose for the moment that
>> you are ONLY working with English, the, presumably, you can set up vowels
>> as item-delimiters: although you might get a bit mixed up with words sucj
>> as 'beautiful' which, while having 5 vowels only has 3 syllables.
>> 
>> Basically you have to work out how to detect V+C and open vowels at the
>> end of words.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Rick Harrison via use-livecode
Hi Richmond,

Yes, English. Sorry I forgot to be specific, I thought it was implied.

Yes, I have been counting vowels, but there appear to be a lot of exceptions,
so there must be a lot more rules.

I need to know what all the rules are to make it work if possible.

There are websites out there on the internet that will count
syllables in whatever text given to them so it must be possible.
How are they doing it?  Is it an algorithm ,or are they comparing
the words to a database table that has all the dictionary information?

Thanks,

Rick


> On Mar 20, 2022, at 2:29 PM, Richmond via use-livecode 
>  wrote:
> 
> Well, syllables are language dependent, so let's suppose for the moment that
> you are ONLY working with English, the, presumably, you can set up vowels
> as item-delimiters: although you might get a bit mixed up with words sucj
> as 'beautiful' which, while having 5 vowels only has 3 syllables.
> 
> Basically you have to work out how to detect V+C and open vowels at the
> end of words.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Counting Syllables

2022-03-20 Thread Richmond via use-livecode

Well, syllables are language dependent, so let's suppose for the moment that
you are ONLY working with English, the, presumably, you can set up vowels
as item-delimiters: although you might get a bit mixed up with words sucj
as 'beautiful' which, while having 5 vowels only has 3 syllables.

Basically you have to work out how to detect V+C and open vowels at the
end of words.

On 20.03.22 19:41, Rick Harrison via use-livecode wrote:

I’m working on a project that requires an LC program to count
the number of syllables in a paragraph.

I don’t want to have to re-invent the wheel here if there
is an existing solution to the problem.

If not, what are all the rules I need to check?

Suggestions?

Thanks,

Rick
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode