ISO OBP data access in Ruby

Background

The ISO Online Browsing Platform (OBP) is the ISO official location to obtain informative content from ISO standards.

Note
Normative content of ISO standards is paywalled.

Informative content provided on the OBP include:

  • Introduction (if present)

  • Scope

  • Normative references

  • Terms and definitions

  • Bibliography

Use cases

There are many situations where the informative content is already useful:

  • ISO project editors: obtain machine-readable content of informative clauses to start a revision without waiting for the complicated STS XML file.

  • Terminology users: obtain term and definition details from a standard.

  • Bibliography users: find out what documents this standard refers to.

Usage

Single language

obp = Obp::Access.fetch("iso:std:iso:5598:ed-3:v1:en")
obp.to_xml(pretty: true) # => NISO STS XML string
obp.to_sts               # => #<Sts::NisoSts::Standard>
obp.to_xml_file          # => "/tmp/iso-std-iso-5598-.../iso-std-iso-5598-....xml"

Multilingual (specific languages)

obp = Obp::Access.fetch("iso:std:iso:5598:ed-3:v1:en", languages: ["fr", "de"])
obp.to_xml(pretty: true) # => NISO STS XML with en/fr/de langSets

Multilingual (all available languages)

obp = Obp::Access.fetch("iso:std:iso:5598:ed-3:v1:en", languages: :all)
obp.to_xml(pretty: true) # => NISO STS XML with all available language langSets

CLI

Fetch a single document (English only):

$ obp-access fetch iso:std:iso:5598:ed-3:v1:en

Fetch with all available languages:

$ obp-access fetch -l all iso:std:iso:5598:ed-3:v1:en

Fetch with specific languages and save to file:

$ obp-access fetch -l fr,de -o output/ iso:std:iso:5598:ed-3:v1:en

Generated XML

The output is NISO STS XML with TBX-Basic terminology markup:

  • Terms use <tbx:termEntry> with <tbx:langSet> per language

  • Grammar is encoded via <tbx:grammaticalGender> (values: masculine/feminine/neuter) and <tbx:partOfSpeech>

  • Domains are extracted as <tbx:subjectField>

  • Deprecated terms use <tbx:normativeAuthorization value="deprecatedTerm"/>

Credits

This gem is developed, maintained and funded by Ribose Inc.

License

The gem is available as open source under the terms of the 2-Clause BSD License.