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 12 forks source link

Filter on glosses that have annotated sentences #1303

Open uklomp opened 1 month ago

uklomp commented 1 month ago

We'd like to be able to search for / filter on glosses that have annotated sentences (our new kind of 'example sentences') available.

uklomp commented 1 month ago

I noticed that we have 'search' and 'search sense' and that the latter already has the option to look for the old type of example sentences (panel: search sentences). But no morphology panel. Is it beneficial to have these two types of searches? Why isn't it all under 'search'? This is just out of curiosity.

susanodd commented 1 month ago

I noticed that we have 'search' and 'search sense' and that the latter already has the option to look for the old type of example sentences (panel: search sentences). But no morphology panel. Is it beneficial to have these two types of searches? Why isn't it all under 'search'? This is just out of curiosity.

It has to do with the models underneath. The senses have a model GlossSense where the senses are paired up with glosses. The list objects are actually GlossSense rather than Gloss.

This is intended to show senses "outside of the list of senses".

If you use the normal Gloss Search, you can search on senses, but you don't get "senses" as the result.

(We didn't have enough senses yet to develop this more. For a year or so there were only a handful of glosses with more than one sense.)

susanodd commented 1 month ago

We'd like to be able to search for / filter on glosses that have annotated sentences (our new kind of 'example sentences') available.

Do you want to be able to see a list of annotated sentences?

Related to the above (GlossSense), you can search on "has multiple senses" underneath Publication fields. Then retrieve glosses with multiple senses.

Simply, it this could be the same way with a boolean to search on glosses with annotated sentences. (But you get back a list of glosses.) So you may think about if you also want a list of annotated sentences. (Analogous to the above.)

uklomp commented 1 month ago

Yes, that would be nice. So also a list of the glosses where it appears, and then in a column next to it the translation(s). Maybe the Dutch translation if your interface is in Dutch, and the English translation in all other cases?

susanodd commented 1 month ago

First version screenshot showing Sentence ID. Sorted by Sentence ID so that glosses in the same sentences show together.

annotated-gloss-list-sorted-by-sentence-id

TO DO:

The "group by" toggle will make it possible to arrange the results in a different order. [details] This is done at the database query level and is based on fields of the annotated gloss or sentence. The query then has extra stuff in it that is used in the template by Django to swap the object list around. So most of that is on the Python side and makes use of the IDs of the objects. The search results need to be sorted in a particular way on the multiple object ids in order to work. So for example, above, a sort based on gloss id and sentence id would be used.

If farther down the line you have other sentence attributes like kind of sentence, that could be used as well.

susanodd commented 1 month ago

@uklomp you can provide

@Jetske is making a Manage page for the sentences.

uklomp commented 1 week ago

@uklomp you can provide

  • what kinds of search fields you would like to have specific to the sentences or properties of the annotated sentences.
  • details to view specific to the sentences
  • advanced properties for group Editor (if you need some view only properties that UvA users would need)

This page is for searching and viewing. I don't know whether the "Is representative" column is needed here. Maybe not.

@Jetske is making a Manage page for the sentences.

Search fields: I'm not sure if we would need specific search fields or that we need options to filter the search results. At least it would be good to differentiate between: 1. source (for now there's only one source but there will be more), 2. sentence type (we will have 'question', 'declarative' and 'negated' as options). Details: yes, we'd like to see if a sentence is representative. I don't think we need the link to the video, nor the sentence idea. But the two things mentioned above (source, type) might be good to have here as well. Advanced properties: can't think of any right now.

Happy with your suggestion of the 'group by' toggle by the way.

susanodd commented 1 week ago

@uklomp you can experiment with the search on Annotated Gloss on signbank-susan.

Signs -> Search Annotated Gloss

It returns the "group by" of gloss with sentences. You can click on the sentence ID to see a detail page. From that page you can go to the Edit page.

I need to merge the two kinds of searches so the manage sentences view is also there.

The scroll-bar shows the results of the query and you can navigate around. It's a search on Gloss plus extra fields for annotated gloss (is representative, and sentence contains)

susanodd commented 6 days ago

This is available on signbank under the Signs menu, Search Annotated Gloss

(The annotated glosses are those that have annotated sentences.)

There are two new commands in the menu, one under Signs and one under Datasets.