使用 Label Studio 标注文本
前言
Label Studio是一个开源的功能强大的标注平台,可以标注视频,图片,音频,文字等各类型的数据。
这篇文章主要介绍标注员如何使用Label Studio标注文本数据。
下面是开源地址
Label Studio的简单使用
1.创建项目
2.添加本地存储
这里的路径填写的是之前设置的LOCAL_FILES_DOCUMENT_ROOT的路径,后面加了一个子文件夹Resume_Labeling(该文件夹需要提前创建),
填好之后可以点击Check Connection按钮检查路径是否配置正确
3.选择标注模板
Projects=>Resume_Labeling=>Settings=>Labeling Interface=>Browse Templates
选择我们刚刚添加的自定义模板
4.添加数据
把需要标注的文件和一个Import.json文件,放到Resume_Labeling文件夹下,再从界面导入Import.json文件,就可以了
导入数据的文件夹结构
点击Import按钮,选择Import.json文件
import.json文件内容
[{
"data": {
"labeler":"task3@qq.com",
"reviewver":"reviewver1@qq.com",
"resume_id":"fsdgsd",
"rules":"rules",
"source_resume": "/mydata/local-files/?d=Resume_Labeling/Round1/Import/LabelStudio/source_resume.html",
"resume": "/mydata/local-files/?d=Resume_Labeling/Round1/Import/LabelStudio/resume.html"
}
}
]
resume.html 和source_resume.html
<html>
<head>
<style>
.page[theme="beryl"] * {
user-select: text;
color: #333344;
font-size: 16px;
line-height: 1.6;
overflow-wrap: break-word;
}
.page[theme="beryl"] a {
text-decoration-color: #008117;
}
.page[theme="beryl"] {
width: 794px;
background: #ffffff;
padding: 72px;
margin-bottom: 32px;
border-radius: 4px;
box-shadow: 0px 4px 8px #d0d0d0;
position: relative;
}
/* 以下是页眉页脚样式 */
.page[theme="beryl"]>header,
footer {
position: absolute;
}
.page[theme="beryl"]>header {
top: 28px;
right: 72px;
}
.page[theme="beryl"]>footer {
bottom: 28px;
left: 397px;
transform: translate(-50%, 0);
}
.page[theme="beryl"]>footer>div::before {
content: "- ";
}
.page[theme="beryl"]>footer>div::after {
content: " -";
}
/* 以下是基本信息式 */
.page[theme="beryl"]>.head {
width: 100%;
display: inline;
grid-template-columns: auto 1fr auto;
grid-column-gap: 16px;
margin-bottom: 32px;
}
.page[theme="beryl"]>.head>div>.name {
font-size: 36px;
font-weight: bold;
margin-bottom: 32px;
text-align: center;
}
.page[theme="beryl"]>.head>.information {
display: grid;
grid-template-columns: auto auto auto;
/* grid-column-gap: 20px; */
}
.page[theme="beryl"]>.head>.information>.label {
display: flex;
/* justify-content: flex-end; */
margin-bottom: 8px;
}
.page[theme="beryl"]>.head>.information>.label>.title {
font-size: 16px;
font-weight: bold;
color: #008117;
}
.page[theme="beryl"]>.head>.information>.label>.msg {
font-size: 16px;
margin-left: 8px;
font-weight: bold;
}
.page[theme="beryl"]>.head>.information>.label>.icon {
width: 18px;
height: 22px;
object-fit: contain;
margin-right: 8px;
}
.page[theme="beryl"]>.head>.information>.label>.tag {
margin-right: 8px;
font-weight: bold;
}
.page[theme="beryl"]>.head>.portrait {
/* 48mm x 33mm */
height: 182px;
width: 125px;
object-fit: contain;
}
.page[theme="beryl"]>.head>.portrait:not([src]) {
width: 0;
opacity: 0;
}
/* 以下是详细信息式 */
.page[theme="beryl"]>.main {
margin-bottom: 36px;
}
.page[theme="beryl"]>.main>.mainhead {
display: flex;
margin-bottom: 8px;
background: #497089;
padding-left: 16px;
border-radius: 8px;
}
.page[theme="beryl"]>.main>.mainhead>.icon {
display: none;
}
.page[theme="beryl"]>.main>.mainhead>.t1 {
font-size: 24px;
font-weight: bold;
color: #ffffff;
}
.page[theme="beryl"]>.main>.subhead {
display: inline;
/* grid-template-columns: 1fr auto; */
}
.page[theme="beryl"]>.main>.subhead>.information {
display: grid;
grid-template-columns: auto;
margin-bottom:20px;
}
.page[theme="beryl"]>.main>.subhead>.information>.label {
display: flex;
}
.page[theme="beryl"]>.main>.subhead>.information>.label>.title {
font-size: 16px;
font-weight: bold;
color: #008117;
}
.page[theme="beryl"]>.main>.subhead>.information>.label>.value {
font-size: 16px;
margin-left: 8px;
font-weight: bold;
}
.page[theme="beryl"]>.main>.subhead>.t2 {
font-size: 16px;
font-weight: bold;
color: #008117;
}
.page[theme="beryl"]>.main>.subhead>.time {
font-weight: bold;
color: #008117;
}
.page[theme="beryl"]>.main>.subhead>.note {
font-weight: bold;
color: #555555;
}
.page[theme="beryl"]>.main>ol,
ul {
padding-left: 20px;
}
.page[theme="beryl"]>.main>.contents {
margin-bottom: 8px;
}
.page[theme="beryl"]>.main>.contents>div {
font-size: 16px;
}
/* 以下是打印样式处理 */
@media print {
.page[theme="beryl"] * {
color: #000000;
}
.page[theme="beryl"] {
border-radius: 0;
box-shadow: none;
}
}
* {
padding: 0;
margin: 0;
user-select: none;
box-sizing: border-box;
color: #333344;
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}
body {
background: #f0f0f0;
}
.themes {