Signbank / Global-signbank

An online sign dictionary and sign database management system for research purposes. Developed originally by Steve Cassidy/ This repo is a fork for the Dutch version, previously called 'NGT-Signbank'.
http://signbank.cls.ru.nl
BSD 3-Clause "New" or "Revised" License
19 stars 13 forks source link

Split Up Keywords into Different Senses #1273

Open susanodd opened 1 week ago

susanodd commented 1 week ago

There already is a batch edit for senses (#1268).

But after checking, it seems it doesn't load properly for NGT due to the extensive dataset. (FIXED)

Modified title of page to Batch Edit Senses

Reworking to use panels instead of modals (open/close panels instead of popups)

Here are some ORIGINAL screenshots for tstMH:

batch-edit-senses

batch-edit-senses-matrix-popup

susanodd commented 1 week ago

@uklomp can you try this out for dataset Oefen?

Unfortunately this page does not load for NGT. I will fix this so it loads for NGT. If you are able to use this page, it saves us oodles of work.

It's in-line batch editing of senses.

The page does not need to be reloaded at all. You can just keep editing the senses of different glosses.

susanodd commented 1 week ago

This page was intended to help update the original glosses that have all the keywords in one sense.

You can split those keywords (for the Dutch language, since most do not have any English) up into separate senses, and reorder them, without needing to type everything again.

susanodd commented 1 week ago

This has been deployed.

susanodd commented 1 week ago

I can put Dutch first.

[CODE SPECIFIC] There is not an easy way to do this globally. I modified the Batch Edit to do that, by ordering on "-id" the reverse of the Language ID. Probably something like a sorting order field in Dataset for translation languages of the dataset?

Care must be taken in the template to use the same iteration over languages so the sorting stays the same for all occurrences in the template. (i.e., if there are forms, the form language fields need to be associated with the correct language.)

uklomp commented 1 week ago

Hmmm. It still means a lot of clicking, because I first need to select which one I want to edit (English or Dutch), then I need to edit, but I can't just type in a text field going from one gloss to another in the same overview, if you know what I mean.

susanodd commented 1 week ago

Hmmm. It still means a lot of clicking, because I first need to select which one I want to edit (English or Dutch), then I need to edit, but I can't just type in a text field going from one gloss to another in the same overview, if you know what I mean.

You mean you don't like the pop-up "modals"?

These were made this way to hide all the "update" stuff. I will duplicate the page and make another that removes the code from the modals and shows it inline instead.

susanodd commented 1 week ago

@uklomp that there is a separate "edit area" for each language has to do with that there are thousands of glosses with only Dutch and no English.

The code is meant to be used so that you can "browse" the glosses, and click on "check senses" to add a TAG to those glosses that need to have multiple senses. Then you can search again on labels "Check Senses" to show only the glosses with tag Check Senses.

Then use Edit Dutch to "partition" the existing keywords into multiple senses. (Without needing to do any copy paste or typing! You just click on the number next to the keyword to move it to a different sense.)

Then you go to the Matrix Edit and add the translations for the separated senses there.

Likewise, if you have English filled in (or some other language) then you can start with Edit English, etc.

You can create senses both in the Edit Dutch area as well as the Matrix area.

It is not necessary to have all languages for the senses. The senses can be just one language. (In contrast, the lemmas and the annotations need all dataset languages to be filled in.)

susanodd commented 1 week ago

NEW SCREENSHOTS

batch-edit-senses-aka

batch-edit-senses-matrix

susanodd commented 1 week ago

This is already existing functionality. Revised so that the popup windows are shown as panels instead.

TO DO change specific language edit popups (invisible above) to panels dwz "split into senses" (whatever it should be called, when the keywords are redistributed among (new) senses instead of all of them in one sense.)

[CODE IMPLEMENTATION] That the keywords appear in separate rows within the same sense in the matrix has to do with the Gloss Edit view of senses, where the user can put the keywords of a sense in separate rows when editing in order to facilitate translation. Translations may be left empty. (But rows may not be empty, they are removed.) Adding a sense in the matrix creates a new row. But if you want the words in the row to appear in separate rows within the sense number, the other panel (for keywords) needs to be used. (This is hidden right now, but visible on signbank in Analysis -> Keywords Mapping for the button Edit Dutch.)

susanodd commented 1 week ago

My screen is too small to actually display everything above at the same time. (Lots of scrolling up and down. That's why the matrix is shown but you can't see the row above in the first screenshot, the matrix is shut.)

Ingebouwd beeldscherm
11.6-inch (1366 x 768)

I don't think anybody uses screens this small anymore.

susanodd commented 1 week ago

Language panel

batch-edit-senses-dutch-top

batch-edit-senses-dutch-bot

susanodd commented 1 week ago

When necessary, the existing keywords can be split up into separate senses.

susanodd commented 1 week ago

This is what the layout with panels looks like.

batch-edit-senses-panels

susanodd commented 1 week ago

This is live on signbank-susan

(Under the old name: Analysis -> Keywords Mapping)

susanodd commented 3 days ago

I revised the modals to make them less crowded, added boxes, and placeholders where fields empty.

split-senses-afhankelijk-A

split-senses-afhankelijk-A-2