def read_document(fnm):
    """Read a document that is stored in a text file as JSON.

    Parameters
    ----------
    fnm: str
        The path of the document.

    Returns
    -------
    Text
    """
    with codecs.open(fnm, 'rb', 'ascii') as f:
        return Text(json.loads(f.read()))