X
X
xmoonlight2017-09-26 00:39:00
Algorithms
xmoonlight, 2017-09-26 00:39:00

Break the word into syllables and count their number?

Hello.
What can be used to break a word (Russian and English) into syllables?
Does anyone have a ready-made function?
From the mouth of an infant: (generate only the main significant sounds)

Sam, hey. With the help of which it is possible to enslave a word (Russian and English) into syllables? Does anyone have a ready-made function?

We unify the vowels to the * sign and get some semblance of what else can be understood:
S*m, pr*v*. With p * m ** h * g * m * zhn * r * b * t sl * v * (r * sk * d * * ngl * sk * d * s * k *) n * sl * g *? *t l* g*t*v** f*nc** * k*g*?

We get the hash of the string (by which we can already search): smprvchgzhnbtlkyzfc
-------------------------------------- -----------------------
For example, the word "night light" by syllables, as correct:
night-nick or night -light
... and why?
Thank you.
UPD:
The rules themselves:
1. The syllable forms a vowel sound:
wall-na, bar-ran (s-tena, bara-n - wrong).
2. The syllable begins with a consonant that comes before a vowel:
mo-lo-ko, ko-ra (they say-eye, kor-a - wrong).
3. The letters b, b (which do not mean sounds) cannot be torn off from the previous syllable:
skates, entrance (horses, entrance - wrong).
4. According to the new rules , voiceless consonants go to the next syllable, voiced consonants ([th], [p], [p '], [l], [l '], [m], [m '], [n], [n']) - to the previous syllable:
to-chka, mo-shka, crust-ka, bul-ka (according to the old rules, it was true: point-ka, mosh-ka, crust-ka, bul-ka).
5. Consonant letters that form one sound cannot be spread into different syllables. One sound is formed by combinations of zzh [zh:], tsya, tsya [ts:].
y-e-squeeze, but-si-tsya, de-la-tsya.
6. According to the new rules, double consonants in the middle of a word are assigned to the following syllable:
cool, hockey, tennis (according to the old rules, it was true: cool, hockey, tennis).

I found the sites slogi.su and perenosi.su ...
Now, it remains to break it correctly :(

Answer the question

In order to leave comments, you need to log in

6 answer(s)
G
GavriKos, 2017-09-26
@GavriKos

So break or count the number? Just with the number of all easy - it is equal to the number of vowels.

J
Johnny Smith, 2017-09-26
@Olek1

perenosslov.ru/slogi/index.php

M
moh-mog-drinks, 2017-09-26
@moh-mog-drinks

We read the rules of the Russian language (in other languages ​​- other rules)
licey.net/free/4-russkii_yazyk/39-kurs_russkogo_ya...
This is practically an algorithm.
It remains to be implemented.

A
Adamos, 2017-09-26
@Adamos

IMHO, syllables in languages ​​are just nonsense. It has no independent value, the transfer is still subject to other rules. Moreover, both are by no means cast in granite: one can easily find two different textbooks with two different rules, and then take Rosenthal and discover a third one.
- a middle-aged father with "innate literacy", just yesterday discussing with his daughter during lessons the division into syllables and the transfer of the word "dress". And our mother is a philologist ... but "would it help her!"

D
Dreaded, 2017-09-26
@Dreaded

So you have the rules written down, in fact this is the algorithm. Then use an ASCII table to work with the input data. In principle, there is nothing complicated.
Link to the table

M
maagalex, 2017-09-26
@maagalex

There are no rules, speech is divided into phonemes automatically, your task is to write a function in which ten different people will say the same word and the function will remember its deviations from and to like a window in a comparator (for this you need to combine the forms to isolate meaningful information) .. With the next word is the same, but when memorizing, similar elements should be searched for in previously memorized phonemes, and if they exist, then break up the already memorized ones and use them for the future ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question