Skip to content

Commit

Permalink
Rewrite calculation of expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed May 14, 2024
1 parent b22c326 commit 470a560
Show file tree
Hide file tree
Showing 6 changed files with 433 additions and 232 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ manual/img/n4o-classes.svg: voc/n4o-classes.pg
nmanual/img/n4o-all-classes.svg: voc/crm-classes.pg voc/n4o-classes.pg
cat $^ | pgraph --html -t mmd | mmdc -i - -o $@

crm-expand.txt: crm-expand.tsv
./expansion-list.pl < $< | sort > $@
crm-expand.txt: voc/*.pg
npm run --silent expansion $^ > $@

crm-expand.tsv: voc/*.pg
cat $^ | pgraph | jq -r 'select(.type=="edge" and any(.labels[]; .=="replacedBy" or .=="superClass" or .=="superProperty"))|[.from,.to]|@tsv' > $@
cat $^ | pgraph | jq -r 'select(.type=="node" and .properties.alias)|[.properties.alias[0],.id]|@tsv' >> $@
cat $^ | pgraph | jq -r 'select(.type=="node" and (.properties.alias| not))|[.id,.id]|@tsv' >> $@
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Erstellung, Management und Nutzung des NFDI4Objects Knowledge Graphen von TA5.

## Installation

Benötigt werden eine Standard-Unix-Tools sowie Docker, Perl (ohne zusätzliche
Libraries), Python3 und Node >= v18. Anschließend die weitere Abhängigkeiten:
Benötigt werden eine Standard-Unix-Tools sowie Docker, Python3 und Node >= v18.
Anschließend die weitere Abhängigkeiten:

Python-Umgebung

Expand All @@ -25,8 +25,6 @@ npm install pgraphs
npm install mermaid-cli
~~~

jq: `sudo apt-get install jq`

## Handbuch

Das Verzeichnis [`manual`](manual) enthält den Quelltext des Handbuchs für den
Expand Down
Loading

0 comments on commit 470a560

Please sign in to comment.