(page)
return retVal
Returns word set used in page content

    >>> sorted(getPageWordSet(u'<html><title>foobar</title><body>test</body></html>'))
    [u'foobar', u'test']
Returns word set used in page content
Returns word set used in page content
def getPageWordSet(page):
    """
    Returns word set used in page content

    >>> sorted(getPageWordSet(u'<html><title>foobar</title><body>test</body></html>'))
    [u'foobar', u'test']
    """

    retVal = set()

    # only if the page's charset has been successfully identified
    if isinstance(page, unicode):
        _ = getFilteredPageContent(page)
        retVal = set(re.findall(r"\w+", _))

    return retVal
def getPageWordSet ( page ) : retVal = set ( ) # only if the page's charset has been successfully identified if isinstance ( page , unicode ) : _ = getFilteredPageContent ( page ) retVal = set ( re . findall ( r"\w+" , _ ) ) return retVal