SUTDAnnotator is developed for annotating chunk/entity/event on text manually. 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 and support export annotated text into sequence text.
This GUI annotation tool is developed with tkinter package in Python.
System required: Python 2.7
Author: Jie Yang, Phd Candidate of SUTD.
Just run the .py file. python SUTDAnnotator.py
- Set your shortcut map in the right side of annotation interface, you can leave other labels empty if the shortcut number is enough. For example:
a: Action; c: Cont
- Click the
Update map
button to store the map setting - Click
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:
- Select the text and press the corresponding shortcut (i.e.
c
for labelCont
). - Type the code at command line (at the bottom of the interface). For example, type
2c3b1a
end with<Enter>
, it will annotate the following2
character as typec: Cont
, the following3
character as typeb: Loc
, then the following1
character asa: Action
.
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"
- Type
ctrl + z
will undo the most recent modification - Put cursor within an entity span, press shortcut key (e.g.
x
) to update label (binded withx
) of the entity where cursor is belonging. (q
for remove the label) - Selected the annotated text, such as "[@美国#Location*]", then press
q
, the annotated text will be recoverd to unannotate format (i.e. "美国"). - Change label directly, such as select "[@美国#Location*]", then press
x
, the annotated text will change to new label mapped with shortcutx
(e.g. "[@美国#Organization*]"). - In the command entry, just type
Enter
without any command, the cursor in text will move to the head of next line. (You can monitor this through "Cursor"). - The "Cursor" shows the current cursor position in text widget, with
row
andcol
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.
- 2017-June-24, (V 0.6): support nested coloring; add event annotation beta version "SUTDAnnotator-event.py"
- 2017-May-31, (V 0.6): optimize for Windows OS.
- 2017-Apr-26, (V 0.5.3): fix bug with line merge when change entity type.
- 2017-Apr-20, (V 0.5.2): fix bugs with
newline
problem on MacOS/Linux/Windows. (\r
\n
\r\n
) - 2017-Apr-20, (V 0.5.1): change entity label more directly; optimize cursor figure.
- 2017-Apr-19, (V 0.5): update entity represent as [@Entity#Type*]; support change label directly; fix some bugs.
- 2017-Apr-15, (V 0.4): update example and readme.
- 2017-Apr-13, (V 0.4): modify color; support setting color single line or whole file (may be slow in large file) (
self.colorAllChunk
). - 2017-Apr-12, (V 0.4): support BMES/BIO export (
self.tagScheme
); support segmented sentence export(self.seged
); can save previous shortcut setting. - 2016-Mar-01, (V 0.3): fix export bug (bug: set space when sentence didn't include any effective label).
- 2016-Jan-11, (V 0.2): add sequence format export function.
- 2016-Jan-09, (V 0.1): init version.