Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphabet Letter not displayed if only present in altLabel #751

Open
Kordishal opened this issue Mar 28, 2018 · 3 comments
Open

Alphabet Letter not displayed if only present in altLabel #751

Kordishal opened this issue Mar 28, 2018 · 3 comments

Comments

@Kordishal
Copy link

At which URL did you encounter the problem?

http://bartoc-skosmos.unibas.ch/fast-chrono/en/index

What steps will reproduce the problem?

  1. Search for "Fra" and select the first suggestion (Francis I, Reign of (Austria))
  2. After the concept page is loaded click on the Alphabetical list.
  3. Displayed will be a list of altLabels which begin with letter A (instead of F or the numbers).
  4. Selected can only be S (Since 1900 etc.) T (To 250 B.C. etc) and numbers (all other prefLabels.

What is the expected output? What do you see instead?

The Alphabetical Listing is generated from the prefLabels. In this case the all of the prefLabels are numbers, while the altLabels are Names of the reigns/eras/etc. with this date range.

As a result the Numbers are properly listed. You can properly search for altLabels. But there is no display in the Alphabetical List since only 2 letters are included. This makes it hard to navigate this kind of vocabulary. It would be better to generate the Alphabet letters from altLabels as well.

Similar to #729

@osma osma added the bug label Apr 12, 2018
@osma
Copy link
Member

osma commented Apr 12, 2018

You are right that this is a limitation. Basically this involves a trade-off between completeness and performance. The SPARQL query that finds all the letters for a particular vocabulary and language is already quite heavy even though it only looks at prefLabels. I suspect that also checking altLabels would make it heavier/slower still. It would be easy to change (see here: https://github.com/NatLibFi/Skosmos/blob/master/model/sparql/GenericSparql.php#L1297) for example by changing skos:prefLabel to the path expression skos:prefLabel|skos:altLabel.

Since you host a large number of vocabularies, including some large ones, maybe you could try this out on your Skosmos installation and see whether it adversely affects performance? If you think it's worth changing, then open a PR.

@osma osma added this to the Contribution-dependent features milestone Apr 12, 2018
@Kordishal
Copy link
Author

Thanks Osma!

I have made the change and it is working. The performance hit for small and medium sized vocabularies is very small/barley noticeable, but for large vocabularies like MAO/TAO the load time for the Alphabetical list is a lot longer.

As such this change would only make sense for a small set of vocabularies. Would it be possible to make this a setting? Where would I have to start looking into this?

@osma
Copy link
Member

osma commented Apr 1, 2020

Sorry for the extremely late response @Kordishal - you are right that making this configurable would make a lot of sense. It could be a simple vocabulary-specific boolean setting, similar to e.g. skosmos:fullAlphabeticalIndex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants