-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use IEV OpenData interface rather than scraping #5
Comments
The IEV OpenData API doesn't quite work immediately for our case where we're importing only one term at once. Reasons below (also submitted as feedback to IEC Terminology team).
The query for /areas is in JSON, but the term results are returned in XML. In particular, the term results endpoint does not support JSON (it returns XML regardless of the format requested).
When using IEV terms in a standard document, it is most convenient to refer it using a “unique ID” (i.e. the IEV term ID like 101-12-09). Currently, the OpenData API only provides a method to load all entries within an area, such as: https://opendata-api.iec.ch/v1/opendata/iev/101/{yourKey} This request will receive a response with all terms under the 101 area, which is very long and mostly useless to the user. We hope there will be an additional endpoint like https://opendata-api.iec.ch/v1/opendata/iev/101/12-09/{yourKey} that will return a single term (and all its associated languages, or ability to load only one language).
The response of a “concept" is currently separately returned per language. However, the multiple languages of a term should be grouped under the same “concept”. Currently it is: <concept ievref="101-12-01">
<lang-set lang-id="en">
<term-name>information</term-name>
<definition>knowledge concerning objects, such as facts, events, things, processes, or ideas, including concepts, that within a certain context has a particular meaning</definition>
<pubdate>1998-04</pubdate>
<source>ISO/IEC 2382-1, 01.01.01, 701-01-01 MOD</source>
</lang-set>
</concept>
<concept ievref="101-12-01">
<lang-set lang-id="fr">
<term-name>information</term-name>
<attribute>f</attribute>
<definition>connaissance concernant un objet tel qu'un fait, un événement, une chose, un processus ou une idée, y compris une notion, et qui, dans un contexte déterminé, a une signification particulière</definition>
<pubdate>1998-04</pubdate>
<source>ISO/CEI 2382-1, 01.01.01, 701-01-01 MOD</source>
</lang-set>
</concept>
… It would be better to be: <concept ievref="101-12-01">
<lang-set lang-id="en">
<term-name>information</term-name>
<definition>knowledge concerning objects, such as facts, events, things, processes, or ideas, including concepts, that within a certain context has a particular meaning</definition>
<pubdate>1998-04</pubdate>
<source>ISO/IEC 2382-1, 01.01.01, 701-01-01 MOD</source>
</lang-set>
<lang-set lang-id="fr">
<term-name>information</term-name>
<attribute>f</attribute>
<definition>connaissance concernant un objet tel qu'un fait, un événement, une chose, un processus ou une idée, y compris une notion, et qui, dans un contexte déterminé, a une signification particulière</definition>
<pubdate>1998-04</pubdate>
<source>ISO/CEI 2382-1, 01.01.01, 701-01-01 MOD</source>
</lang-set>
</concept>
…
|
The IEV database structure is defined in IEC Directives Supplement Annex SK
|
The "opendata-api.iec.ch" host is gone. We need to ask IEC for an alternative. |
Load IEV areas: (this is in JSON)
curl --header "Content-Type: application/json" https://opendata-api.iec.ch/v1/opendata/areas
=>
Load 101 Mathematics: (this is in XML)
=>
The text was updated successfully, but these errors were encountered: