Many troubadour lyrics have not come down to us with their melodies. One way around that is to create a contrafact - sing it to another tune - and indeed a number of lyrics were created as contrafacts. This wasn't just an homage to a good melody. A well-educated listener would know the original and hear the second lyric as commenting on the first. The trouble is, how do you find candidate melodies?
The first thing to do is to find other songs with the same metrical structure. The Bibliografia Elettronica dei Trovatori can help you do just that. First hit "Entra" and register. Don't worry, they're just trying to document usage of the site - I've never received a single piece of email from them. Then click on "Testi" ("Lyrics") in the top navigation bar and select "schema metrico." Find the metrical scheme of the piece which interests you in the pull-down menu, then click the search button (of the three buttons, it's the furthest to the left). This will give you all troubadour lyrics with the same metrical scheme.
Now the trick is to find out which of these have extant melodies, if any. I am creating a list of extant troubadour melodies by composer. Eventually, I'll have them listed by metrical scheme as well, so that you won't have to go through BEdT, but that will take me a while.
In Occitan, words rhyme if the last accented syllable and any following unaccented syllables rhyme. We do the same thing in English: you wouldn't say that "brother" and "sister" rhyme just because they both end in "-er." If the last syllable is accented, it's called a masculine rhyme, e.g. "amor" and "amador," and if the last syllable is unaccented, it's a feminine rhyme, e.g. "enansa" and "semblansa." For lines with masculine rhymes, you just count the number of syllables, while for lines with feminine rhymes, you count out to that last accented syllable, then put a prime (') on the number. For example,
There was a young lady of Hydehas metrical structure 8.8.5'.5'.9, while
A decrepit old gas man named Peterhas metrical structure 9'.8'.6.6.?!?.
(Neither is my own creation, though I wish they were.)