import codecs


def read_document(addr, encoding = 'utf-8'):
    """
    DESCRIPTION: Read a document with given encoding  
    INPUT: addr <string> - Path to file
           encoding <string> - encoding
    OUTPUT: text <string> - File content
    """
    fid = codecs.open(addr, 'r', encoding)
    text = fid.read()
    fid.close()
    return text