FSAPy/download/files/Wlist2RE.py
def loadWlist(fname):
    """Return a list of words from a text file (in UTF-8 encoding).
       The word list is genereted by whitespace tokenization, i.e.
        it could be a floating text, a list of words line by line,
        word by word, etc. Duplicate words are removed."""
    try:
        fp = codecs.open(fname, "r", "utf-8")
        tmp = fp.read()
        fp.close()
        words = tmp.split()
    except ValueError:
        fp.close()
    words = list(set(words))
    words.sort()
    return tuple(words)
Return a list of words from a text file (in UTF-8 encoding).
       The word list is genereted by whitespace tokenization, i.e.
        it could be a floating text, a list of words line by line,
        word by word, etc. Duplicate words are removed.
Return a list of words from a text file (in UTF-8 encoding).
The word list is genereted by whitespace tokenization, i.e.
it could be a floating text, a list of words line by line,
word by word, etc. Duplicate words are removed.
Return a list of words from a text file ( in UTF - 8 encoding ) . The word list is genereted by whitespace tokenization i . e . it could be a floating text a list of words line by line word by word etc . Duplicate words are removed .
def loadWlist(fname):
    try:
        fp = codecs.open(fname, "r", "utf-8")
        tmp = fp.read()
        fp.close()
        words = tmp.split()
    except ValueError:
        fp.close()
    words = list(set(words))
    words.sort()
    return tuple(words)
def loadWlist ( fname ) : try : fp = codecs . open ( fname , "r" , "utf-8" ) tmp = fp . read ( ) fp . close ( ) words = tmp . split ( ) except ValueError : fp . close ( ) words = list ( set ( words ) ) words . sort ( ) return tuple ( words )
Return a list of words from a text file (in UTF-8 encoding).
Return a list of words from a text file ( in UTF - 8 encoding ) .
"""Return a list of words from a text file (in UTF-8 encoding).
       The word list is genereted by whitespace tokenization, i.e.
        it could be a floating text, a list of words line by line,
        word by word, etc. Duplicate words are removed."""
fname