Answer the question
In order to leave comments, you need to log in
Need to split a string into multiple substrings?
I have Morse code --. . .-.-..-....-..-.---.-.-....- --. . .-.-... but there are no spaces in it I need to make all variants of string sections How to do it in cycles? or even how to do it?
For example, there is a line .-. here are the options for breaking it:
.- .
. - .
. -.
I need to make a program that will do this automatically!
Answer the question
In order to leave comments, you need to log in
In the general case, this cannot be done, because without spaces it is impossible to unambiguously split into letters.
For example
vg · − − − − ·
yn · − − − − ·
Combinations of two letters give the same sequence.
Alternatively, you can have a dictionary of words, and try to find all the options and match them with words from the dictionary.
+ you can take into account the probability of meeting certain combinations of letters
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question