views.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:chat 作者: cambridgeltl 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号