基于Docker下载文本标注工具(doccano) 并安装使用。
环境:Mac OS
准备工作:Docker安装
1.拉取镜像doccano:
运行命令
sudo docker pull chakkiworks/doccano
2.启动镜像
运行命令
sudo docker run -d --rm --name doccano \
-e "ADMIN_USERNAME=admin" \
-e "ADMIN_EMAIL=admin@example.com" \
-e "ADMIN_PASSWORD=password" \
-p 8000:8000 chakkiworks/doccano
3.访问网站:
打开浏览器,在浏览器地址栏输入:
http://127.0.0.1:8000/login/
进行登录,用户名是:admin 密码是:password。
4.使用
流程图
创建项目
导入数据
创建标签
标注
文本分类
序列标注
seq2seq
未成功
导出数据
导出的数据为:
{"id": 6, "text": "sadasas", "annotations": [{"label": 3, "start_offset": 3, "end_offset": 7, "user": 1, "created_at": "2021-05-13T11:57:32.156172Z", "updated_at": "2021-05-13T11:57:32.156224Z"}], "meta": {}, "annotation_approver": null}
{"id": 7, "text": "qwdqwdq", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 8, "text": "dqwdqwd", "annotations": [{"label": 3, "start_offset": 0, "end_offset": 2, "user": 1, "created_at": "2021-05-13T11:57:38.938405Z", "updated_at": "2021-05-13T11:57:38.938444Z"}, {"label": 4, "start_offset": 4, "end_offset": 7, "user": 1, "created_at": "2021-05-13T11:57:41.137773Z", "updated_at": "2021-05-13T11:57:41.137820Z"}], "meta": {}, "annotation_approver": null}
{"id": 9, "text": "dqwdqw qwdqwd", "annotations": [{"label": 3, "start_offset": 0, "end_offset": 2, "user": 1, "created_at": "2021-05-13T11:57:47.833633Z", "updated_at": "2021-05-13T11:57:47.833673Z"}, {"label": 3, "start_offset": 10, "end_offset": 13, "user": 1, "created_at": "2021-05-13T11:57:50.766320Z", "updated_at": "2021-05-13T11:57:50.766362Z"}], "meta": {}, "annotation_approver": null}
{"id": 10, "text": "qwdqwd", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 36, "text": "ModelArts is a one-stop AI development platform that enables developers and data scientists of any skill level to rapidly build, train, and deploy models anywhere, from the cloud to the edge.", "annotations": [{"label": 3, "start_offset": 0, "end_offset": 9, "user": 1, "created_at": "2021-05-13T12:26:54.274036Z", "updated_at": "2021-05-13T12:26:54.274074Z"}, {"label": 4, "start_offset": 24, "end_offset": 47, "user": 1, "created_at": "2021-05-13T12:26:58.825134Z", "updated_at": "2021-05-13T12:26:58.825189Z"}, {"label": 4, "start_offset": 60, "end_offset": 91, "user": 1, "created_at": "2021-05-13T12:27:10.532433Z", "updated_at": "2021-05-13T12:27:10.532471Z"}], "meta": {}, "annotation_approver": null}
{"id": 37, "text": "Accelerate end-to-end AI development and foster AI innovation with key capabilities, including data preprocessing, semi-automated data labeling, distributed training, and automated model building.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 38, "text": "ModelArts is a one-stop development platform for AI developers. It helps AI developers quickly build models and deploy the models on the device, edge, and cloud, facilitating lifecycle management of AI development.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 39, "text": "ModelArts supports automated learning, namely, ExeML, and provides multiple pre-trained models. In addition, it integrates Jupyter Notebook to provide online code development environments.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 40, "text": "In ModelArts, you can import and label data on the Data Management page to prepare for model building. ModelArts uses datasets as the basis for model development or training.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 41, "text": "Dataset Types", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 42, "text": "ModelArts supports datasets of images, audio, text, tables, videos, and other types for the following purposes:", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 43, "text": "Images", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 44, "text": "Image classification: identifies a class of objects in images.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 45, "text": "Object detection: identifies the position and class of each object in an image.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 46, "text": "Audio", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 47, "text": "Sound classification: classifies and identifies different sounds.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 48, "text": "Speech labeling: labels speech content.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 49, "text": "Speech paragraph labeling: segments and labels speech content.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 50, "text": "Text", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 51, "text": "Text classification: assigns labels to text according to its content.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 52, "text": "Named entity recognition: assigns labels to named entities in text, such as time and locations.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 53, "text": "Text triplet: assigns labels to entity segments and entity relationships in the text.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 54, "text": "Tables", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 55, "text": "Table: applies to structured data processing such as tables. The file format can be CSV or Carbon. You can preview a maximum of 100 records in a table.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 56, "text": "Videos", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 57, "text": "Video labeling: identifies the position and class of each object in a video. Currently, only the MP4 format is supported.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 58, "text": "Others", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 59, "text": "Free format: manages data in any format. Currently, labeling is not available for data of the free format type. The free format type is applicable to scenarios where labeling is not required or developers customize labeling. If your dataset needs to contain data in multiple formats or your data format does not meet the requirements of other types of datasets, you can select a dataset in free format.", "annotations": [], "meta": {}, "annotation_approver": null}
{"id": 60, "text": "Figure 1 Example of a dataset in free format", "annotations": [], "meta": {}, "annotation_approver": null}
参考
- https://www.cnblogs.com/hanwen1014/p/12767710.html
- 官网:https://doccano.herokuapp.com
- 代码库: https://github.com/doccano/doccano