一个自定义的Jupyter小部件库,用于选择文本并为选定的范围分配标记
text-selector的Python项目详细描述
文本选择器
一个自定义的Jupyter小部件,用于选择文本的一部分并将其指定为一个标记。在
使用小部件和主动学习工具:
https://github.com/IINemo/active_learning_toolbox/tree/seq
用法:
用例的例子可以在example.ipynb
注意:如果你有少于10个标签,你不需要传递颜色,否则你也有。在
结果通过widgets公共字段res
表示。
它可以是3种状态中的一种:
- 空:没有人在widget中选择任何内容
- 包含
None
的字符串:文本不包含任何squences,用户将此小部件检查为“Done” - 包含具有选定序列的dict
安装
要安装此扩展,只需运行以下命令:
$ pip install text_selector
$ jupyter nbextension enable --py --sys-prefix text_selector
为jupyterlab安装
^{pr2}$对于开发安装(需要npm)运行终端:
$ git clone https://github.com/randomunrandom/text_selector.git
$ cd text_selector
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix text_selector
$ jupyter nbextension enable --py --sys-prefix text_selector
$ jupyter labextension install js
码头工人
创建并启动docker容器运行:
$ git clone https://github.com/randomunrandom/text_selector.git
$ cd text_selector
$ docker build -t text_selector .
$ docker run -p 8888:8888 -it --rm --name text_selector text_selector
如果端口8888被占用,请将${port}更改为任何可用端口
$ docker run -p ${port}:8888 -it --rm --name text_selector text_selector
引用
@inproceedings{shelmanov2019bibm,
title={Active Learning with Deep Pre-trained Models for Sequence Tagging of Clinical and Biomedical Texts},
author={Artem Shelmanov and Vadim Liventsev and Danil Kireev and Nikita Khromov and Alexander Panchenko and Irina Fedulova and Dmitry V. Dylov},
booktitle={Proceedings of International Conference on Bioinformatics & Biomedicine (BIBM)},
year={2019}
}
- 项目
标签: