Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relations annotation added to SequenceLabeling task #1384

Merged
merged 26 commits into from
Jun 2, 2021
Merged

Relations annotation added to SequenceLabeling task #1384

merged 26 commits into from
Jun 2, 2021

Conversation

DavideAllavena
Copy link
Contributor

With this PR we introduce a new feature: the relation between annotations.

Each annotation can be linked to another with a "relation" (or link) which has a direction and a type (types can be added/modified in the "relations" page). Only one relation can exists from the same pair of source and target.

The relations are drawn as colored arrows.

How to use it

To try the new feature you should, first, create some relation type in the "relations" page. The relation semantics is free.
Then, to create a relation you can click the R icon (a new icon at the top right of any annotation).

This will open a menu showing the list of the outgoing relations (if any) and the option "new relation...".
Here the user can delete any existing relation by clicking the trashcan icon.

If the "new relation..." is selected the menu will ask to choose the relation type.
After that the R icon from the source annotation is shown in a blue background, and the other annotation, at the mouse hover, will show a + (plus) icon. Just click any + icon to select the relation target. This will create the relation and an arrow will appear at screen.

To abort the relation operation the user can click the R button again whenever he/she wants.

descansodj@hotmail.it and others added 19 commits April 21, 2021 17:08
- tentativo di creazione pagine di gestione tipi di relazioni
- lavori in corso sull'effettivo salvataggio dei link
aggiunte le api di lettura/inserimento relazioni
rimossa la modifica del tipo di relazione
# Conflicts:
#	app/api/models.py
#	backend/api/migrations/0009_annotations_relations_20210421_1445.py
#	backend/api/serializers.py
#	backend/api/urls.py
#	backend/api/views/annotation_relations.py
#	backend/api/views/relation_types.py
#	frontend/pages/projects/_id/sequence-labeling/index.vue
#	frontend/plugins/services.ts
@Hironsan
Copy link
Member

Thanks. Please pass CI.

@DavideAllavena
Copy link
Contributor Author

Thanks. Please pass CI.

Done some modification, I need CI approval run tests on dockerhub.

@DavideAllavena
Copy link
Contributor Author

DavideAllavena commented May 31, 2021

All test are green! To do the dockerhub part i had to change line 25 in .github/workflows/publish-image.yml

@Hironsan Hironsan merged commit 1cdb9d6 into doccano:master Jun 2, 2021
@Hironsan
Copy link
Member

Hironsan commented Jun 2, 2021

Thanks! Merged.

@sorenmc
Copy link

sorenmc commented Sep 2, 2021

In my team we have tried this feature, but we can't seem to find the relation in the exported data.
How does this work?

@DavideAllavena
Copy link
Contributor Author

The data are stored in the database but still not included in the export. I think the maintainers should study a clever format to add this data to the export.

@sorenmc
Copy link

sorenmc commented Sep 2, 2021

Thanks for the quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants