Skip to content

Commit db2bcda

Browse files
committed
Version 0.1.
1 parent 4fc093e commit db2bcda

File tree

14 files changed

+768
-78
lines changed

14 files changed

+768
-78
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
.idea
2-
venv
1+
.idea/
2+
build/
3+
dist/
4+
streamside.egg-info/
5+
venv/

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# StreamSide
22

3-
StreamSide is an annotation toolkit developed by Emory University.
3+
StreamSide is a annotation toolkit that derives a semantic network from plain text.
4+
This project is maintained by the [Emory NLP](http://nlp.cs.emory.edu/) research laboratory and under the [Apache 2](http://www.apache.org/licenses/LICENSE-2.0) license.
45

5-
* [Tutorial](docs/tutorials.md)
6+
* Latest release: 0.1 (8/12/2020).
7+
8+
## Documentations
9+
10+
* [Getting Started](docs/getting_started.md)
11+
* [Graph Annotator](docs/graph_annotator.md)

docs/getting_started.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Getting Started
2+
3+
Upgrade the pip version of Python 3 if needed:
4+
5+
```bash
6+
$ python3 -m pip install --upgrade pip
7+
$ python3 -m pip --version
8+
```
9+
10+
Install a virtual environment using Python 3 if needed:
11+
12+
```bash
13+
$ python3 -m pip install --user virtualenv
14+
```
15+
16+
Create a virtual environment:
17+
18+
```bash
19+
$ python3 -m venv venv
20+
```
21+
22+
Activate the virtual environment:
23+
24+
```bash
25+
$ source venv/bin/activate
26+
```
27+
28+
Under the virtual environment, install StreamSide:
29+
30+
```bash
31+
(venv) $ pip install streamside
32+
```
33+
34+
Launch the [Graph Annotator](graph_annotator.md) using the following command where `AID` is the ID of the annotator:
35+
36+
```bash
37+
(venv) $ python -m streamside.annotator -a AID &
38+
```
Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
# Tutorials
1+
# Graph Annotator
22

3-
> If you are using a mac, use the `Cmd` key instead of the `Ctrl` key.
3+
## Launch
44

5-
## Open File
5+
The following describes the command to launch the graph annotator:
6+
7+
```bash
8+
python -m streamside.annotator -a ANNOTATOR_ID [-m wisen|amr -r RESOURCE_DIR] &
9+
```
10+
* `-a` or `--annotator`: the ID of the annotator (required).
11+
* `-m` or `--mode`: choose the representation `wisen` (default) or `amr`.
12+
* `-r` or `--resources`: the path to a custom resource directory; if not specified, it uses the default [resources](../streamside/resources/).
13+
14+
15+
## Annotate
16+
17+
> If you are using a mac, replace the `Ctrl` key with the `Cmd` key .
18+
19+
### Open File
620

721
Press `Ctrl+o` to prompt a file dialog:
822

9-
* For the initial annotation, choose a text file that consists of a sentence per line.
10-
* For a returning annotation, choose a JSON file that is previously saved.
23+
* For the initial annotation, choose a text file comprising a sentence per line (e.g., [training-examples.txt](training-examples.txt)).
24+
* For a returning annotation, choose a JSON file that is previously saved (e.g., [training-examples.jdchoi.json](training-examples.jdchoi.json)).
1125

12-
## Save File
26+
### Save File
1327

14-
Press `Ctrl+s` to save the current annotation to the JSON file whose name indicates the annotator ID.
28+
Press `Ctrl+s` to save the current annotation to the JSON file whose name includes the annotator ID.
1529

16-
## Create Concept
30+
### Create Concept
1731

1832
Any of the following actions will prompt the input dialog to create a concept:
1933

@@ -32,13 +46,15 @@ To deselect spans:
3246
Once the input dialog is prompted:
3347

3448
* Type the concept name; predefined concepts will be auto-completed by the input textbox.
35-
* To see the description of a predefined concept, press `Ctrl+d` or the `Describe` button.
36-
* To make this concept as an attribute, press `Ctrl+r` or check the `Attribute` box.
3749
* Press `Enter` or the `OK` button to create the concept.
3850

3951
Once the concept is created, its spans are displayed in <span style="background-color:lightgray;">gray</span> on the text.
4052

41-
## Create Relation
53+
### Create Attribute
54+
55+
Attribute can be created in the exact same way as the concept by pressing `a` instead of `c`.
56+
57+
### Create Relation
4258

4359
The following actions will prompt the input dialog to create a relation:
4460

@@ -56,12 +72,32 @@ To deselect the IDs:
5672
Once the input dialog is prompted:
5773

5874
* Type the relation label; predefined labels will be auto-completed by the input textbox.
59-
* To see the description of a predefined concept, press `Ctrl+d` or the `Describe` button.
6075
* To make the child concept as a referent argument, press `Ctrl+r` or check the `Referent` box.
6176
* To make an inverse relation (`*-of`), press `Ctrl+f` or check the `Inverse` box.
6277
* Press `Enter` or the `OK` button to create the concept.
6378

64-
## Navigate
79+
### Delete
80+
81+
To delete a concept or an attribute:
82+
83+
* Highlight the ID of the concept/attribute and press `Ctrl+d`.
84+
85+
To delete a relation:
86+
87+
* Highlight the label of the relation and press `Ctrl+d`.
88+
89+
### Update
90+
91+
To update the name of a concept or an attribute:
92+
93+
* Highlight the ID of the concept/attribute and press `Ctrl+f`.
94+
95+
To update the label of a relation:
96+
97+
* Highlight the label of the relation and press `Ctrl+f`.
98+
99+
100+
### Navigate
65101

66102
* To move to the previous sentence, press `,`.
67103
* To move to the next sentence, press `.`.

0 commit comments

Comments
 (0)