<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def yield_json_corpus(fnm):
 """Function to read a JSON corpus from a file. A JSON corpus contains one document per line, encoded in JSON. Each line is yielded after it is read. Parameters fnm: str The filename of the corpus. Returns ------- generator of Text """

    with codecs.open(fnm, 'rb', 'ascii') as f:
        line = f.readline()
        while line != '':
            yield Text(json.loads(line))
            line = f.readline()