def pubmed(id_):
from so2html import standoff_to_html
from operator import itemgetter
from itertools import groupby
try:
text = '\n'.join(pubmed_text_store.get_tiab(id_))
except KeyError:
abort(404)
try:
ann = pubmed_ann_store.get_spans(id_, minimize=True)
except KeyError:
# Assume no annotations.
ann = []
html = standoff_to_html(text, ann, legend=True, tooltips=True,
links=False, content_only=True)
template_args = { 'documents': { id_: { 'html': Markup(html), } } }
return render_template_with_globals('pubmed.html', template_args)
评论列表
文章目录