This is actually a problem that I looked many years ago for my project at the end of the year. There was a similar phenomenon in old English folk songs - there was a large Broadside Ballad collection, which was usually written at the top of "To Sing to the Packington Pound" (or some other famous tune). So the news was distributed, ballads, sang in public places. As a result, there were many sets of words for a small number of tunes. In my project, I considered creating an algorithm for analyzing a verse of text and finding a melody in a database that you could sing into.
At that time, I could not find any previous studies that would answer this question. He didn’t even have a name, so we called him "Contrafactal Analysis" (I understood that "contrafacture" means "to sing words to another melody").
The method I used performed the initial phase of grammar analysis using the computer version of the Oxford Advanced Learning Dictionary (CUVOALD) (which is now very old, but you can find if you use Google). This tells you about the part of speech (for example, the verb, noun) of each word, as well as where the main stress stress lies. This is important, because in general, the primary phrase coincides with the rhythm. The analysis of a number of examples showed that the most common nouns and verbs with bits, so in your example:
Oh tell me if you can see the light with the dawn of the ear
Trying to impose this picture of stress on your counterexample will be:
If you liked it , then you should a place a ring on it
which just sounds completely wrong. In prosody terms , I think this is a pattern of dactylic stress: (de) -DER-de-de DER-de-de DER-de-de DER.
So, if you can create a sentence that has the same prosodic structure, then there is a chance that you can sing it to the original melody
Hi George , can you stand there Greg -or-y bike
In practice, you can also insert additional syllables here and there, while the main stresses occur in the same place. I have executed some code to do this in ML.
This should give you some information about the problem. I will try to find the report that I wrote on it, and will be updated here.
UPDATE: I finally managed to convert an ancient WordPerfect file to pdf