But what is it you want to compare? If it is meter, remember that meter depends of syllabic stress, which is not apparent from word spellings. You'd have to develop a way to enter words that indicated where the syllable were, and whether they were stressed or unstressed--basically, you'd have to figure out the meter of a lyric before you could enter it--As to melody, when you notate a piece of music, you create a representation of it's rhythmic an melodic structure that then is used to recreate the piece. Again, what do you want to compare? Why do you need a computer to do it?