Week Beginning 8th April 2024
I’d taken a day off this week, so only worked four. I began the week continuing to work on the Anglo-Norman Dictionary, making a tweak to the publications scripts I was working on last week and then planning a new search of language tags that the editor wanted to be added. Language tags are at entry level (i.e. they apply to the whole entry) and are used to denote loanwords.
There are only 2660 entries that currently feature the language tag (and 24,762 that don’t) so the search is going to be fairly limited. I explored two possible developments. Firstly, we could have a separate tab on the ‘Advanced Search’ page for ‘Language’, as we do for ‘Semantic & Usage Labels’. The new tab would work in a similar way to this (see https://anglo-norman.net/search/), with a list of languages and a count of the number of associated entries. We could either then make a search run as soon as a language is clicked on, or we could allow multiple languages to be selected and then joined with Booleans as with the ‘Label’ search. The latter would be more consistent, but I’m not sure how useful it would be as there aren’t many entries that have multiple language tags (so ‘AND’ and ‘NOT’ would not be so helpful). I guess ‘OR’ would be more useful, but the user could just perform separate searches as there won’t be huge number of results anyway.
Secondly, we could add a language selector to the ‘Headwords & Forms’ search tab, underneath ‘Citation date’. We could provide a list of languages (including a note explaining how the languages are used and that they are not widely applied), with each language appearing as a checkbox (checking multiple will act as ‘OR’). The language search could then be used on its own (leaving ‘Headword’ and ‘Citation date’ blank) or in conjunction with the other search options.
So for example
- Retrieve all of the words of Scandinavian origin
- Retrieve all of the words of Scandinavian origin that have a headword / form beginning ‘sc’
- Retrieve all of the words of Scandinavian origin that have a headword / form beginning ‘sc’ whose entries feature a citation with a date between 1400 and 1450
After further consultation with the editor, Geert, we decided that I’d start by developing the separate tab option and if we may expand the headword search to incorporate language at a later date, if it’s still considered necessary.
Incorporating a language search is going to mean updating the database and the entry publication scripts (both in the management system and my batch scripts) to extract language data from the entries when they are edited or created. I’ll also need to update the ‘view entry’ page in the DMS so the language data is listed.
My plan of action is to do the following:
- Create a new database table that will hold entry IDs, language IDs and whether the entry is a compound. Where an entry has multiple languages it will have multiple rows in this table.
- Write a script that will iterate through the entries, will extract language data and will populate this table
- Incorporate the script into the publication workflow and ensure an entry’s language listing is cleared when an entry is deleted prior to a major batch upload.
- Update the ‘entry search’ facility in the site’s API to add a new search type for language. This will accept similar arguments to the existing ‘label’ search type: one or more language IDs, Booleans to be used between the language IDs and whether the search should be limited to compound words
- Add a further endpoint that will return a list of all languages together with a count of the number of entries that feature each language
- Update the advanced search page to add in a new ‘Language’ tab. This will have a similar structure to the ‘Labels’ tab and will feature a list of languages together with counts of associated entries in a scrollable area on the left. It will be possible to click on a language to add or remove it from a further section on the right of the page where selected languages will be listed. If multiple languages are selected a drop-down list of Boolean options will appear between each language. Pressing on the ‘Search’ button after selecting one or more languages will perform a language search. This will list all corresponding entries in the same way as a Headword search.
I managed to complete the first two tasks, extracting 3097 language tags and adding these to the database.
Also this week I had discussions with the Books and Borrowing people about the official launch of the resource that’s taking place in a couple of weeks. I’m going to be speaking at the launch so I needed to figure out what I should be talking about. I also returned to the ‘Browse book editions’ page on the website (https://borrowing.stir.ac.uk/books/) which was at this point taking a long time to load. This is because the page defaults to displaying all book editions in the system that have a title beginning with ‘A’- almost 3000 books. I did consider adding pagination to the facility, but I personally find it easier to scroll through a long page rather than flicking between many smaller pages, plus it means a user can use ‘Find’ in their browser to search the listing. Another option I considered was to limit the default display to a particular genre of book rather than all genres, but I decided that this might confuse people if they don’t notice the limit has been applied. Instead I set the page to not load a specific letter tab by default. The tabs load, but to view the content of one of them the user actually has to select one. This means the page now loads instantaneously and people get to choose what options they want to view without having a long wait.
Also this week I made some further updates to the Speech Star websites, adding in new ExtIPA animation videos to both the ‘pre’ and ‘post’ 2015 charts. This was a bit fiddly and took some time but we now have most of the animations in place. I also exported all of the Historical Thesaurus data for Fraser, as a project needs an up to date copy of it.