Skip to content

Commit 01a5d09

Browse files
committed
Sort relations by token ids.
1 parent 6e143d2 commit 01a5d09

File tree

11 files changed

+97
-36
lines changed

11 files changed

+97
-36
lines changed

README.md

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

3-
StreamSide is a annotation toolkit that derives a semantic network from plain text.
4-
This is an open-source project led by the [Emory NLP Research Laboratory](http://nlp.cs.emory.edu).
5-
6-
* Latest release: [0.2](../../releases/tag/streamside-0.2) (8/13/2020).
3+
StreamSide provides you an open-source framework to annotate meaning representations such as [Abstract Meaning Representation](https://amr.isi.edu) (AMR) or [Widely Interpretable Semantic Representation](https://github.com/emorynlp/wiser) (WISeR) that can be easily customized for any representation in any language.
4+
This project is led by the [Emory NLP Research Laboratory](http://nlp.cs.emory.edu) and under the [Apache 2.0](https://github.com/emorynlp/StreamSide/blob/master/LICENSE) license.
5+
* Latest release: [0.4](https://github.com/emorynlp/StreamSide/releases/tag/streamside-0.4) (6/25/2021).
76

87
## Documentations
98

10-
* [Getting Started](docs/getting_started.md)
11-
* [Graph Annotator](docs/graph_annotator.md)
12-
* [JSON to Penman Convertor](docs/json_to_penman.md)
9+
* [Getting Started](https://github.com/emorynlp/StreamSide/blob/master/docs/getting_started.md)
10+
* [Graph Annotator](https://github.com/emorynlp/StreamSide/blob/master/docs/graph_annotator.md)
11+
* [JSON to Penman Convertor](https://github.com/emorynlp/StreamSide/blob/master/docs/json_to_penman.md)
12+
* [Penman to JSON Convertor](https://github.com/emorynlp/StreamSide/blob/master/docs/penman_to_json.md)
1313

1414
## Contact
1515

docs/getting_started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Under the virtual environment, install StreamSide:
3131
(venv) $ pip install streamside
3232
```
3333

34-
Launch the [Graph Annotator](graph_annotator.md) using the following command (replace `AID` with your ID):
34+
Launch the [Graph Annotator](graph_annotator.md) using the following command (replace `ANNOTATOR_ID` with your ID):
3535

3636
```bash
37-
(venv) $ python -m streamside.annotator -a AID &
38-
```
37+
(venv) $ python -m streamside.annotator -a ANNOTATOR_ID &
38+
```

docs/graph_annotator.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,32 @@ python -m streamside.annotator -a ANNOTATOR_ID [-m wiser|amr -r RESOURCE_DIR] &
1111
* `-m` or `--mode`: choose the representation `wisen` (default) or `amr`.
1212
* `-r` or `--resources`: the path to a custom resource directory; if not specified, it uses the default [resources](../streamside/resources/).
1313

14+
> For the following sections, replace the `Ctrl` key with the `Cmd` key if you are using a mac.
1415
15-
## Annotate
1616

17-
> If you are using a mac, replace the `Ctrl` key with the `Cmd` key .
17+
## File Menu
1818

19-
### Open File
19+
### Open
2020

2121
Press `Ctrl+o` to prompt a file dialog:
2222

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)).
23+
* For the initial annotation, choose a text file comprising a sentence per line (e.g., [sample-amr.txt](../samples/sample-amr.txt)).
24+
* For a returning annotation, choose a JSON file that is previously saved (e.g., [sample-amr.jdchoi.json](../samples/sample-amr.jdchoi.json)).
25+
* If you have an existing annotation in the Penman notation, choose a Penman file (e.g., [sample-amr.penman](../samples/sample-amr.penman)).
2526

26-
### Save File
27+
> StreamSide supports only the following file extensions: `txt`, `json`, `penman`.
28+
29+
### Save
2730

2831
Press `Ctrl+s` to save the current annotation to the JSON file whose name includes the annotator ID.
2932

33+
### Quit
34+
35+
Press `Ctrl+q` to quit the annotator.
36+
37+
38+
## Edit Menu
39+
3040
### Create Concept
3141

3242
Any of the following actions will prompt the input dialog to create a concept:
@@ -76,6 +86,18 @@ Once the input dialog is prompted:
7686
* To make an inverse relation (`*-of`), press `Ctrl+f` or check the `Inverse` box.
7787
* Press `Enter` or the `OK` button to create the concept.
7888

89+
> The `Referent` box gets automatically checked if (1) the child concept already has another parent concept or (2) if the child concept is an ancestor of the parent concept.
90+
91+
### Update
92+
93+
To update the name of a concept or an attribute:
94+
95+
* Highlight the ID of the concept/attribute and press `Ctrl+f`.
96+
97+
To update the label of a relation:
98+
99+
* Highlight the label of the relation and press `Ctrl+f`.
100+
79101
### Delete
80102

81103
To delete a concept or an attribute:
@@ -86,16 +108,13 @@ To delete a relation:
86108

87109
* Highlight the label of the relation and press `Ctrl+d`.
88110

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`.
111+
### Add/Remove Text Span
94112

95-
To update the label of a relation:
96-
97-
* Highlight the label of the relation and press `Ctrl+f`.
113+
To add/remove certain text spans to an existing concept (or attribute):
98114

115+
* Highlight the ID of the concept and press `z` that shows it as well as text spans associated with the concept in a <span style="background-color:burlywood;">burlywood</span> background.
116+
* Highlight text spans you want to add/remove to/from the concept and press `v`.
117+
* To deselect the concept/attribute, press `Shift+z`.
99118

100119
### Navigate
101120

docs/json_to_penman.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The following command converts the JSON files generated by StreamSide to the Pen
66
python -m streamside.json_to_penman -i INPUT_PATH [-o OUTPUT_PATH]
77
```
88
* `-i` or `--input`: the path to a JSON file or a directory containing JSON files (required).
9-
* `-o` or `--output`: the path to the output file(s) (default: the input directory).
9+
* `-o` or `--output`: the path to the Penman output file(s) (default: the input directory).

docs/penman_to_json.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Penman to JSON Converter
2+
3+
The following command converts the JSON files generated by StreamSide to the Penman notation:
4+
5+
```bash
6+
python -m streamside.penman_to_json -i INPUT_PATH [-o OUTPUT_PATH]
7+
```
8+
* `-i` or `--input`: the path to a Penman file or a directory containing Penman files (required).
9+
* `-o` or `--output`: the path to the JSON output file(s) (default: the input directory).

0 commit comments

Comments
 (0)