glossarist / glossarist-ruby

Concept modeller in Ruby
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Glossarist v2 enhancements and fixes #85

Closed HassanAkbar closed 10 months ago

HassanAkbar commented 10 months ago

closes #82 closes #84

ronaldtse commented 10 months ago

@HassanAkbar thanks for this! Could you please try:

  1. Using the newly created functionality to migrate the iso-iec-2382 collection
  2. Try loading the dataset in Glossarist ?

This is related to this task:

ronaldtse commented 10 months ago

At the iso-iec-2382 repository: (https://github.com/metanorma/iso-iec-2382/pull/23)

$ bundle exec termium convert -i reference-docs/xml/ISO-IEC_2382.xml -o sources/concepts
Reading TERMIUM export file: reference-docs/xml/ISO-IEC_2382.xml
Size of TERMIUM dataset: 3263
Converting to Glossarist...
Using existing directory: sources/concepts
Writing Glossarist dataset to: sources/concepts
bundler: failed to load command: termium (/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bin/termium)
/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/concept_manager.rb:64:in `save_concept_to_file': undefined method `each' for nil:NilClass (NoMethodError)

      concept.localized_concepts.each do |lang, uuid|
                                ^^^^^
    from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/concept_manager.rb:32:in `each_value'
    from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/concept_manager.rb:32:in `save_to_files'
    from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/glossarist-ruby-915cf0005a43/lib/glossarist/managed_concept_collection.rb:76:in `save_to_files'
    from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/termium-0.1.2/lib/termium/cli.rb:58:in `convert'
    from /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
ronaldtse commented 10 months ago

Thanks @HassanAkbar I can see the concept dataset format is now correct.

In this case, can you please help update the metanorma-plugin-glossarist plugin to work with the new dataset as well?

There are 2 documents that use metanorma-plugin-glossarist we need to update:

HassanAkbar commented 10 months ago

@ronaldtse created a new issue for this change here -> https://github.com/metanorma/metanorma-plugin-glossarist/issues/20