YEDDA: A Lightweight Collaborative Text Span Annotation Tool. Code for ACL 2018 Best Demo Paper Nomination.
YEDDA (the previous SUTDAnnotator) is developed for annotating chunk/entity/event on text (almost all languages including English, Chinese), symbol and even emoji. It supports shortcut annotation which is extremely efficient to annotate text by hand. The user only need to select text span and press shortcut key, the span will be annotated automatically. It also support command annotation model which annotates multiple entities in batch and support export annotated text into sequence text. Besides, intelligent recommendation and adminstrator analysis is also included in updated version. It is compatiable with all mainstream operating systems includings Windows, Linux and MacOS.
For more details, please refer to our paper (ACL2018:demo, best demo nomination).
This GUI annotation tool is developed with tkinter package in Python.
System required: Python 3.6 or above
Author: Jie Yang, Assistant Professor at Zhejiang University, China.
It provides both annotator interface for efficient annotatation and admin interface for result analysis.
python YEDDA.py
./configs/
in the right bottom drop-down lista: Action; b: Loc; c: Cont
. You can also change the map directly on the file./configs/XX.config
which is in JSON format.ReMap
button to overwrite and store the map setting, or click the NewMap
button to store the map setting in a new file under ./configs/
Open
button and select your input file. (You may set your file name ended with .txt or .ann if possible)This tool supports two ways of annotation (annotated text format [@the text span#Location*]
):
c
for label Cont
).2c3b1a
end with <Enter>
, it will annotate the following 2
character as type c: Cont
, the following 3
character as type b: Loc
, then the following 1
character as a: Action
.Intelligent recommendation:
RMOn
and RMOff
, respectively.[$the text span#Location*]
in green color. (Notice the difference of annotated and recommended span, the former starts with [@
while the later starts with [$
)The annotated results will be stored synchronously. Annotated file is located at the same directory with origin file with the name of “origin name + .ann”
Please also note that the shortcut map can be switched seamlessly in the right bottom drop-down list
YEDDA provides a simple interface for administartor to evaluate and analyze annotation quality among multiple annotators. After collected multiple annotated *.ann
files from multiple annotators (annotated on same plain text), YEDDA can give two toolkits to monitor the annotation quality: multi-annotator analysis and pairwise annotators comparison.
python YEDDA_Admin.py
Multi-Annotator Analysis
and select multiple annotated *.ann
files, it will give f-measure matrix among all annotators. The result matrix is shown below:Pairwise Comparison
and select two annotated *.ann
files, it will generate a specific comparison report (in .tex
format, can be compiled as .pdf
file). The demo pdf file is shown below:ctrl + z
will undo the most recent modificationx
) to update label (binded with x
) of the entity where cursor is belonging. (q
for remove the label)[@美国#Location*]
, then press q
, the annotated text will be recoverd to unannotate format (i.e. “美国”).[@美国#Location*]
), then press x
, the annotated text will change to new label mapped with shortcut x
(e.g. [@美国#Organization*]
).y
(yes) or q
(quit).Enter
without any command, the cursor in text will move to the head of next line. (You can monitor this through “Cursor”).row
and col
represent the row and column number, respectively.Export
button will export the “.ann” file as a identity name with “.anns” in the same directory. The exported file list the content in sequence format. In the source code, there is a flag self.seged
which controls the exported bahaviour. a). If your sentences are consist of words seperated with space (e.g. segmentated Chinese and English), then you may set self.seged=True
. b). If your sentences are consist of characters without space (e.g. unsegmentated Chinese text), set self.seged=False
. Another flag self.tagScheme
controls the exporting format, the exported “.anns” will use the BMES
format if this flag is set to "BMES"
, otherwise the exported file is formatted as "BIO".
If you use YEDDA for research, please cite our ACL paper as follows:
@article{yang2017yedda,
title={YEDDA: A Lightweight Collaborative Text Span Annotation Tool},
author={Yang, Jie and Zhang, Yue and Li, Linwei and Li, Xingxuan},
booktitle={Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics},
url={http://aclweb.org/anthology/P18-4006},
year={2018}
}
newline
problem on MacOS/Linux/Windows. (\r
\n
\r\n
)[@Entity#Type*]
; support change label directly; fix some bugs.self.colorAllChunk
).self.tagScheme
); support segmented sentence export(self.seged
); can save previous shortcut setting.