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

Export proper Glossarist dataset that can be read by Geolexica #3

Open
ronaldtse opened this issue Nov 18, 2023 · 0 comments
Open

Export proper Glossarist dataset that can be read by Geolexica #3

ronaldtse opened this issue Nov 18, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Member

ronaldtse commented Nov 18, 2023

As per: glossarist/glossarist-ruby#83 (comment) by @HassanAkbar

we need 2 folders for creating a concept dataset (both folder names are singular)

  • concept
  • localized_concept

In this gem, we have a Cli#convert method that converts a Termium dataset into Glossarist.

However, the files generated do not show this structure. Instead, it is the older structure where the "concept" and "localized concept" are within the same YAML file:

puts "Converting to Glossarist..."
glossarist_col = termium_extract.to_concept
# pp glossarist_col.first
output_path = output_dir_as_path(options[:output_file], input_path)
puts "Writing Glossarist dataset to: #{output_path.relative_path_from(Dir.pwd)}"
glossarist_col.save_to_files(output_path.expand_path)

sources/concepts in iso-iec-2382 repo (link):

concept-10031778.yaml
concept-10031781.yaml
concept-2120533.yaml
concept-2120534.yaml
...

concept-2120533.yaml:

---
termid: '2120533'
term: network
eng:
  id: '2120533'
  terms:
  - type: expression
  # ...
  definition:
  - content: arrangement of entities and their interconnections
  # ...
fre:
  id: '2120533'
  terms:
  - type: expression
  # ...

This task is to update the following method so that it exports a Glossarist dataset that is immediately useable by Geolexica:

glossarist_col.save_to_files(output_path.expand_path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants