Skip to content

Commit

Permalink
core_vocab attr.exemplum added (see #14 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Mar 14, 2021
1 parent beba373 commit 7c367b3
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
34 changes: 34 additions & 0 deletions hxlm/core/schema/core_vocab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,40 @@ attr:
zxx:
id: 'desc'

exemplum:
# attr.exemplar is ...
# @see https://en.wiktionary.org/wiki/exemplum
# @see https://www.wikidata.org/wiki/Q14944328
ara:
id: 'مثال'
eng:
# from https://www.wikidata.org/wiki/Q14944328
id: 'example'
fra:
# from https://www.wikidata.org/wiki/Q14944328
id: 'exemple'
spa:
# from https://www.wikidata.org/wiki/Q14944328
id: 'ejemplo'
lat:
# @see https://en.wiktionary.org/wiki/exemplum
# @see https://www.wikidata.org/wiki/Q14944328
id: 'exemplum'
por:
# from https://www.wikidata.org/wiki/Q14944328
id: 'exemplo'
qaa:
# https://www.wikidata.org/wiki/Q14944328
id: 'q14944328'
rus:
# from https://www.wikidata.org/wiki/Q14944328
id: 'пример'
zho:
# from https://www.wikidata.org/wiki/Q14944328
id: '例子'
zxx:
id: 'exemplum'

id:
# attr.id
# @see https://en.wikipedia.org/wiki/Identifier
Expand Down
16 changes: 16 additions & 0 deletions tests/hrecipe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# tests/hrecipe
> The contents of this folder are strongly based on David Megginson work around
the "JSON processing specs for HXL data". The drafted YAML usage is mostly
an [Syntactic sugar](https://en.wikipedia.org/wiki/Syntactic_sugar).

Quick links:
- "JSON processing specs for HXL data, David Megginson, 2021-03-11"
- https://docs.google.com/presentation/d/17vXOnq2atIDnrODGLs36P1EaUvT-vXPjsc2I1q1Qc50/edit#slide=id.p
- JSON specs:
- https://github.com/HXLStandard/hxl-proxy/wiki/JSON-processing-specs
- Filter parameters:
- https://github.com/HXLStandard/hxl-proxy/wiki/JSON-recipes
- API endpoint:
- https://github.com/HXLStandard/hxl-proxy/wiki/Process-JSON-spec
- Test online
- https://proxy.hxlstandard.org/api/from-spec.html
19 changes: 19 additions & 0 deletions tests/hrecipe/hello-world.hrecipe.hdp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# cd tests/hrecipe
# hdpcli --export-to-hxl-json-processing-specs hello-world.hrecipe.hdp.yml
---
- hsilo:
name: hello-world.hrecipe.hdp.yml
hrecipe:
- id: example-processing-with-a-JSON-spec
recipe:
- filter: count
patterns: "adm1+name,adm1+code"
aggregators:
- "sum(population) as Population#population"
- filter: clean_data
number: "population"
number_format: .0f
iri_example:
- iri: https://data.humdata.org/dataset/yemen-humanitarian-needs-overview
sheet_index: 1
19 changes: 19 additions & 0 deletions tests/hrecipe/yemen-01.hrecipe.hdp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# cd tests/hrecipe
# hdpcli --export-to-hxl-json-processing-specs yemen-01.hrecipe.hdp.yml
---
- hsilo:
name: yemen-01.hrecipe.hdp.yml
hrecipe:
- id: example-processing-with-a-JSON-spec
recipe:
- filter: count
patterns: "adm1+name,adm1+code"
aggregators:
- "sum(population) as Population#population"
- filter: clean_data
number: "population"
number_format: .0f
iri_example:
- iri: https://data.humdata.org/dataset/yemen-humanitarian-needs-overview
sheet_index: 1

0 comments on commit 7c367b3

Please sign in to comment.