Task #1032
closedFeature #960: Base Term definition on selected portion of text in File
Allow marking portion of text as definition source in annotator
Description
Annotator needs to allow the user to select a part of text and mark this text as a source of definition of a Term.
Acceptance criteria:- On text selection, Annotator allows to mark the selected text as definition source.
- If one creates a new term from it, copy the marked text to Term definition content.
If one assigns the text to an existing Term without definition, copy the marked text to Term definition content.- Otherwise, just link the definition to the Term.
- A suitable locator is generated for the selected text portion.
- The locator is assigned to the term as its definitional occurrence, which is a new attribute that has to be added to the model.
- Tested.
*Removed the assigning of selected text to an existing term definition, as it would be inconsistent with selecting definition of a term which already has a definition.
Related issues
Updated by Martin Ledvinka almost 5 years ago
- Related to Task #1034: Human-readable Term definition source locator added
Updated by Martin Ledvinka over 4 years ago
- Status changed from New to In Progress
Updated by Martin Ledvinka over 4 years ago
- Blocked by Bug #1075: Annotation terms is unable to resolve vocabulary unless it is already in store added
Updated by Martin Ledvinka over 4 years ago
- Start date deleted (
16.12.2019) - Status changed from In Progress to Resolved
Updated by Miroslav Blaško over 4 years ago
- Status changed from Resolved to Feedback
- Option for "Plain selection" is good idea !
- Legend should be unified:
- There is "Loading confirmed annotation" but "Pending definition of unknown Term". I suggest to rename it so it is unified, either have everywere "Pending" or "Loading" ... I vote for "Loading", as I am not sure if "Pending" is understandable to end users.
- Moreover I think that there are already quite a lot of colors in the annotator. I suggest to have one color for all "Loading annotations". This color should be very light so it does not distract user too much (e.g. current light yellow color for white background). Thus, I would make "Pending definition of unknown term" same color as "Loading confirmed annotation" ..
- I was not able to "Mark term definiton" within mpp-3.5. (https://kbss.felk.cvut.cz/termit-dev/#/resources/file/annotate?namespace=http://onto.fel.cvut.cz/ontologies/slovn%C3%ADk/datov%C3%BD/mpp-3.5-np/document/)
- I selected text "Jinou stavbouse pro účely Metropolitního plánu rozumí mimo budov všechny stavby, zařízení a opatření ve smyslu stavebního zákona"
- then I hit "Mark term defition"
- Nothing happened (Also no error in console).
- Just a note (not a bug i guess):
- When I "Mark term definition" and then remove it, it will leave the "span" with no attributes from the removed annotation within the text.
Updated by Martin Ledvinka over 4 years ago
1. Pending is not meant as in loading, but as in not assigned. It corresponds to the "Confirmed occurrence of a missing term". But confirmed is in this case imprecise (it was never suggested by anything) and there is no missing term, the term is unknown (unassigned). But I agree that the legend should be unified. I still believe unassigned term definition should have its own color, so that it is not confused with term occurrence.
2. It works, but the annotator is sensitive to selection starting in one element and ending in another, because adding a new element in this case would lead to invalid HTML. I don't know of any better ways to handle it.
3. This is intentional. Since the annotation may contain other elements besides plain text, it is not possible to just replace it with text (as you did originally). And inserting an element in the middle of a text node is rather difficult. Deleting RDFa annotations was the easier way. Feel free to propose a different solution.
Updated by Martin Ledvinka over 4 years ago
- Status changed from Feedback to Resolved
Update: Unified legend content.
Updated by Miroslav Blaško over 4 years ago
I have decided to not reopen the issue but instead, I have created new relevant issue here #1178.