''

def distanceNormed(self, s1, s2):

    if ((len(s1) == 0) and (len(s2) == 0)):
        return 0
    if (s1 == s2):
        return 0
    try:
        doc1 = etree.parse(StringIO(s1), etree.HTMLParser())
        doc2 = etree.parse(StringIO(s2), etree.HTMLParser())
    except:
        return 0
    if ((not doc1) or (not doc2) or (doc1.getroot() is None) or (doc2.getroot() is None)):
        return 1
    (mapped1, mapped2) = self.mappedTrees(doc1.getroot(), doc2.getroot())
    return (1.0 - Levenshtein.ratio(mapped1, mapped2))
