一个自定义的Jupyter小部件库,用于选择文本并为选定的范围分配标记

text-selector的Python项目详细描述


文本选择器

一个自定义的Jupyter小部件,用于选择文本的一部分并将其指定为一个标记。在

使用小部件和主动学习工具:
https://github.com/IINemo/active_learning_toolbox/tree/seq

用法:

用例的例子可以在example.ipynb
注意:如果你有少于10个标签,你不需要传递颜色,否则你也有。在

结果通过widgets公共字段res表示。 它可以是3种状态中的一种:

  1. 空:没有人在widget中选择任何内容
  2. 包含None的字符串:文本不包含任何squences,用户将此小部件检查为“Done”
  3. 包含具有选定序列的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}
}


欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何强制用户在允许访问活动之前处理对话框?我的许可证代码怎么了?   java ArraysList作为JSON   mysql如何在java中创建包含多个可选where子句的搜索语句?   java如何让Apache Camel在“直接”路径的末尾删除文件?   使用socket在两个Androids之间进行java实时数据传输。IO(websocket)和4G   如何在java中实现两个CORBA服务器之间的通信   会话树xml表示为java对象   java Skype4Java编号swtwin323325   java RecyclerView getAdapterPosition()不工作:第一次单击返回正确位置,第二次单击返回1   java在$TOMCAT/conf/context上为JNDI设置资源。xml   java为什么第二个矩形冲突在第一个矩形冲突时不起作用?   JScrollPane上的java JTextArea未出现在JPanel上   java如何将实现的PriorityQueue打印为字符串?   jpa使用Jersey更新用户角色RESTJava(JAXRS)