You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
5.1 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # doccano
  2. doccano is an open source text annotation tool for human. It provides annotation features for text classification, sequence labeling and sequence to sequence. So, you can create labeled data for sentiment analysis, named entity recognition, text summarization and so on. Just create project, upload data and start annotation. You can build dataset in hours.
  3. ## Demo
  4. You can enjoy [annotation demo](http://doccano.herokuapp.com).
  5. ### [Named entity recognition](https://doccano.herokuapp.com/demo/named-entity-recognition/)
  6. First demo is one of the sequence labeling tasks, named-entity recognition. You just select text spans and annotate it. Since doccano supports shortcut key, so you can quickly annotate text spans.
  7. ![Named Entity Recognition](./docs/named_entity_annotation.gif)
  8. ### [Sentiment analysis](https://doccano.herokuapp.com/demo/text-classification/)
  9. Second demo is one of the text classification tasks, topic classification. Since there may be more than one category, you can annotate multi-labels.
  10. ![Text Classification](./docs/text_classification.gif)
  11. ### [Machine translation](https://doccano.herokuapp.com/demo/translation/)
  12. Final demo is one of the sequence to sequence tasks, machine translation. Since there may be more than one responses in sequence to sequence tasks, you can create multi responses.
  13. ![Machine Translation](./docs/translation.gif)
  14. ## Features
  15. * Collaborative annotation
  16. * Language independent
  17. * (future) Auto labeling
  18. ## Requirements
  19. * Python 3.6+
  20. * django 2.0.5+
  21. * Google Chrome(highly recommended)
  22. ## Installation
  23. To install doccano, simply run:
  24. ```bash
  25. $ git clone https://github.com/chakki-works/doccano.git
  26. $ cd doccano
  27. $ pip install -r requirements.txt
  28. $ cd app
  29. ```
  30. First we’ll need to create a user who can login to the admin site. Run the following command:
  31. ```bash
  32. $ python manage.py createsuperuser
  33. ```
  34. Enter your desired username and press enter.
  35. ```bash
  36. Username: admin
  37. ```
  38. You will then be prompted for your desired email address:
  39. ```bash
  40. Email address: admin@example.com
  41. ```
  42. The final step is to enter your password. You will be asked to enter your password twice, the second time as a confirmation of the first.
  43. ```bash
  44. Password: **********
  45. Password (again): *********
  46. Superuser created successfully.
  47. ```
  48. ## Usage
  49. ### Start the development server
  50. Let’s start the development server and explore it.
  51. If the server is not running start it like so:
  52. ```bash
  53. $ python manage.py runserver
  54. ```
  55. Now, open a Web browser and go to <http://127.0.0.1:8080/login/>. You should see the login screen:
  56. <img src="./docs/login_form.png" alt="Login Form" width=400>
  57. ### Create a project
  58. Now, try logging in with the superuser account you created in the previous step. You should see the doccano project list page:
  59. <img src="./docs/projects.png" alt="projects" width=600>
  60. You should see there is no project.
  61. To create your project, make sure you’re in the project list page and select `Create Project` button. You should see the following screen:
  62. <img src="./docs/create_project.png" alt="Project Creation" width=400>
  63. In project creation, you can select three project types: text classificatioin, sequence labeling and sequence to sequence. You should select a type with your purpose.
  64. ### Import text items
  65. Now that we’ve created a project. Now you’re at the “dataset” page for the project. This page displays all the documents in the project. You can see there is no documents.
  66. To import text items, select `Import Data` button in the navigation bar. You should see the following screen:
  67. <img src="./docs/upload.png" alt="Upload project" width=600>
  68. The text items should be provided in txt format. As of now, it must contain only texts. Each line must contain a text:
  69. ```python
  70. EU rejects German call to boycott British lamb.
  71. President Obama is speaking at the White House.
  72. He lives in Newark, Ohio.
  73. ...
  74. ```
  75. Once you select a csv file on your computer, select `Upload` button.
  76. ### Define labels
  77. Now we’ll define your labels. To define your labels, select `Labels` menu. You should see the label editor page:
  78. <img src="./docs/label_editor.png" alt="Edit label" width=600>
  79. In label editor page, we can create labels by specifying label text, shortcut key, background color and text color.
  80. ### Annotation
  81. Now, we are ready to annotate the texts. Back to the project list page and select the project. You can start annotation!
  82. <img src="./docs/annotation.png" alt="Edit label" width=600>
  83. I hope you are having a great day!
  84. ## Contribution
  85. As with any software, doccano is under continuous development. If you have requests for features, please file an issue describing your request. Also, if you want to see work towards a specific feature, feel free to contribute by working towards it. The standard procedure is to fork the repository, add a feature, fix a bug, then file a pull request that your changes are to be merged into the main repository and included in the next release.
  86. ## Contact
  87. For help and feedback, please feel free to contact [the author](https://github.com/Hironsan).
  88. **If you are favorite to doccano, please follow my [GitHub](https://github.com/Hironsan) and [Twitter](https://twitter.com/Hironsan13) account.**