tno-terminology-design / tev2-tools

The Terminology Engine (v2) is a set of specifications and tools that caters for the creation and maintenance (i.e. curation) of terminologies. This repository contains the sources for the tools.
Apache License 2.0
2 stars 3 forks source link

Add 'regularize' helper function to all relevant tools, and document (was: HRGT sorting has some unwanted side-effects) #32

Closed RieksJ closed 8 months ago

RieksJ commented 9 months ago

The tev2-glossaries-demo has a set of tabs that show different ways in which a glossary can be created. The tab "Latest eSSIF-Lab glossary" (at the right) has the MRGref {% hrg="essif-lab:latest" converter="markdown-section-3" sorter="{{glossaryText}}" %}, which means that the resulting glossary should be ordered according to the glossaryText of its entries. The screenshot below shows that this is not the case:

image

The reason for this would be that the first two entries start with a termref, i.e., with the [-character. I'm wondering if/what we should do about this.

RieksJ commented 9 months ago

Perhaps we can fix this by having a helper function regularize, that regularizes its argument. Regularizing glossaryText would certainly do the trick. Also, I think that having such a helper function may prove to be useful at some point in other contexts.

RieksJ commented 9 months ago

@Ca5e mentions that having the NoRefs helper function would be what you would really want, and this is true. However, it would require the NoRefs function to know what the TermRef interpreter would be, and then things become difficult.

Decision:

Ca5e commented 9 months ago

I've added all of the helper functions to the converter profile. @RieksJ please take a look.

RieksJ commented 8 months ago

Good start. @Ca5e, could you:

RieksJ commented 8 months ago

Since the code was updated, and I myself did documentation updates, I am satisfied to close this issue. If any documentation/code discrepancies exist, they should be addressed in a new issue (that also goes for the request for a 'remedy' feature)