Code Monkey home page Code Monkey logo

public_labeling_tool's Introduction

环境

  • Python 3.4及以后
  • Django 1.11.3及以后
  • MySQL 5.5.24及以后

功能

实现了一个帮助用户进行语义标注的服务,从mysql中读取需要标注的语句,标注结果保存回mysql中

用法

  1. 准备数据 先按照django教程安装MySQL API dirver,在MySQL上新建一个待使用的数据库create database db_name character set utf8,并把数据库信息(用户名,密码,host,port,数据库名)填入settings.py的DATABASES中,然后运行python manage.py migratemodels.py中定义的数据结构导入数据库,最后把excel中待标注的文本导入到该数据库的sent_textload data infile 'path_to_file' into table classification_sentence terminated by '\n' (`sent_text`)

  2. 启动服务 python manage.py runserver

  3. domain/intent标注 浏览器地址栏输入http://127.0.0.1:8000/classification/进行标注 建议使用空格键确认,左右键选择,tab键跳转,回车键提交,完全脱离鼠标

  4. slots标注 地址栏输入http://127.0.0.1:8000/slots/左键选择文本,按键选择tag,点击go按钮使标注数据进入文本框,每行可标注0次或多次,也可直接在文本框内修改,点击submit按钮提交

  5. 结果查看 最后的结果可以在http://127.0.0.1:8000/admin/ 查看,也可以在MySQL命令行查看,每条数据有5个属性值,id也是主键,每条数据都不同,自动生成;sent_text待标注的句子,从excel或其他数据库导入;domain/intent来自classification的标注,用数字来代表类别;slots来自slots的标注,一句话有多个属性时用\t连接

注意

  1. domain/intent如果有漏标的情况,会跳回原页面并提示漏标,全部标注完成会提示成功。但slots并不检查是否漏标,因为有些句子确实没有属性标注
  2. domain/intent中数据库中存储的数字与类别的关系,slots中按键与属性标签的关系,分别在semantic_labeling/classification/template/classification/sentence_list.htmlsemantic_labeling/classification/static/slots/fillup.js中修改

public_labeling_tool's People

Contributors

lxww301pku avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.