Maria-Liakata-NLP-Group / annotations-interface

New iteration of the Annotations Interface tool
MIT License
0 stars 0 forks source link

Improve SQL relationships between annotations and dialog turns/events #28

Closed dsj976 closed 11 months ago

dsj976 commented 12 months ago

With the current setup, every time a segment-level annotation is submitted, one annotation is saved to the SQL table per dialog turn in the segment. So if the segment consists of three dialog turns, three annotations will be saved to the table (these three annotations are actually the same, they only differ in that each one points to a different dialog turn). This allows to use a one-to-many relationship between the annotations table and the dialog turn table.

However, in the annotations form, we have now included a select multiple field that allows the annotator to select from the list of events in the segment to provide evidence for their annotation. The selected events could belong to different dialog turns. So one annotation could refer to many events, and the same event could be referenced in different annotations. One additional problem is that in relational databases you cannot save lists of values in the intersection of a row and a column, and the same annotation can refer to multiple events

dsj976 commented 11 months ago

This was solved with merge a09fab5. Have now included many-to-many relationships between annotations and dialog turns, and evidence events for the annotations are saved in separate tables linked to the annotations tables through one-to-many relationships.