def corpus(self):
""" Return a corpus based on environment.
It will try to return it from cache, otherwise load it from disk.
If corpus hasn't been extracted from the document, it will redirect to
a corpus creation tool.
"""
corpus = get_corpus(self.request)
if corpus is None:
raise exc.HTTPNotFound()
return corpus
评论列表
文章目录