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

How to treat 'imported' TermRefs such that they become convertable #25

Open RieksJ opened 8 months ago

RieksJ commented 8 months ago

When the HRGT generates a HRG from an MRGRef which specifies (a particular version of) some MRG, that may have been generated in the current scope, or imported from some external scope, it is very likely that the HRG entries that are generated will include TermRefs, and the idea is that such TermRefs should be resolvable from the MRG for which the HRG was created (even though this is may not be true in all cases).

Let's think a bit about this before taking actions to resolve this

RieksJ commented 8 months ago

I can see various options:

  1. have a mechanism that allows TRRT to shift current-scope dynamically (and back)
  2. have the HRGT call the TRRT (with custom importer/converter) to act on the HRGlist after it has been generated
  3. create a tool that allows actual insertion of predefined textfiles at particular locations; then, the HRGT can write a HRG-file that can be inserted, and the curators will then need to provide the actions that call the TRRT for such files to convert termrefs to other termrefs (changing the scope, for example), which then can be inserted at the right position and the TRRT can then be called as usual
RieksJ commented 8 months ago

The basic problem seems to be that if an MRG entry is imported from an external scope (be it as part of a completely imported MRG or as an MRG entry that was selected from an MRG imported from an external scope), their TermRefs are to be interpreted as they would have been in their originating scope. Problems this may pose include:

  1. the termref interpreter used in the external scope differs from what is used in the current scope;
  2. default values for named capturing groups in the termref may differ between the external scope and the current scope;
  3. ...???

We need to find out if there are more such discrepancies, and then think about whether this is an issue to address, and if so, how to do that.

RieksJ commented 8 months ago

Analogous to #27, we might make maps of interpreters and converters (naming the interpreters and converters, as if we have additional 'predefined' ones). The idea could be that we might think of how to employ this, e.g., by stuffing them into the MRG, such that in other contexts, this can be used to interpret and convert termrefs found in MRG entries (e.g. by specifying 'defaults' for them in the MRG), or as values in glossaryTermRefInterpreter and glossaryTermRefConverter fields of MRG entries.

we must PROPERLY DEFINE if/how this might work

RieksJ commented 7 months ago

Let's do it as follows:

Ca5e commented 7 months ago

While working on the code regarding the conversion of termrefs included within mrg entries imported from an external scope, I came to realise that a good amount of work still has to be done in order to achieve the desirable result. The following observations are related to this, and give an update about the status of this issue.

RieksJ commented 5 months ago

A workaround could consist of the following: