tematres / TemaTres-Vocabulary-Server

Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries
https://vocabularyserver.com
118 stars 52 forks source link

Terms with no subordinates are not displayed in tree #60

Closed olufine closed 2 years ago

olufine commented 2 years ago

I have a hierarchical vocabulary in which some of the terms have no relationship to any other terms. With parameter _SHOW_TREE=Yes, the unrelated terms do not show up in the hierarchy on the Home page. For all intents and purposes unrelated terms are top terms, and should as such be displayed in the hierarchy up front. As it is now, only top terms with subordinates are shown. Is there something we can do to correct this?

tematres commented 2 years ago

hi @olufine In Tematres displays as top terms are any term who have narrower terms and do not have broader terms. ¿In wich case one term can be a top term if the term do not have any narrower terms?

olufine commented 2 years ago

In cases where we don't want to subdivide the term, or just haven't done it yet. I would argue that the only requirement for being a top term should be that it has no broader terms (in the same vocabulary). SKOS doesn't even require that much, but recommends it as a convention (see https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/ ch 2.5). The vocabulary in question is a somewhat uneven (in terms of hierarchy depths) vocabulary of musical genres, with about 600 terms. About 110 are at top level, but only 19 of these are further subdivided. Hence there are about 90 terms with no BT nor NT, which I would like to appear in the hierarchical view as top terms. Moreover, I also notice that those terms are not exported as top concepts in the SKOS export, which they should have been

tematres commented 2 years ago

Hi @olufine sorry for delay in response (please be patient with my english :/ ). We see the problem/issue, may be we can think about this issue as a variant of structural warrant (Svenonius): some terms or relations are based on functional requirements but there havent semantic or logic impact. Some projects use the meta-term category (term to describe anothers terms) to create a dummy node and group there the terms (eg: https://vocabularyserver.com/udc/en/index.php?tema=1&/auxiliary-tables)

Another solution can be to add the capability to mark as "featured" some terms. The terms marked as "features" will be displayed in the home as top terms.

olufine commented 2 years ago

I think the best solution is to allow not subdivided terms as top terms, at least that it can be selected as a setting/configuration. For the time being, bundling the terms under a meta-term <X> may be the best solution. However, TemaTres doesn't really support this in a good way: From the new meta-term I select Add subordinated term, and then have the opportunity to select all free terms. So far so good. However, some of the terms to be added are not free, they may have USE or RT relations. These show up in the list Terms with no hierarchical relations, but can not be selected for subordination to <X>. If I go back to <X>:: Add subordinate term, and search for a term that I know exists, but has no hierarchical relation, it comes up with 0 hits. If I write the same term in the text field, it detects that the term is already existing, but clicking the Submit button then accuses me of adding a duplicate... The only thing that works, is to "open" each single term in turn, and select Options::Subordinate the term, then select <X>. This is a bit cumbersome, and it should have been possible to perform from <X>.

tematres commented 2 years ago

Hi @olufine ! yes yes and yes! you are right! thank you very much about your feedback! we checked the code and think we fixed the problem. You can check if now it works fine in this test environment: https://r020.com.ar/tematres/demo/index.php?setLang=en

Now you can select any term as narrower term if the term is not UF or associated as RT or BT (or in the same taxon) to the term.

thank you again and please let me know about any problem or doubt.