rolled back 'form_of'
This commit is contained in:
parent
106103b9ad
commit
4f1e3228b1
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd ../processing
|
cd ../processing
|
||||||
|
|
||||||
jq -r '. | select((.pos=="noun") or (.pos=="verb") or (.pos=="adj") or (.pos=="adv")) | select((.word | test("[^a-z]"))|not) | {word: .word, form_of: .senses[].tags | any(. == "form-of"), type: .pos, pronunciation: .sounds[0].ipa, definitions: (try .senses|map(.glosses|join(" ")))}' \
|
jq -r '. | select((.pos=="noun") or (.pos=="verb") or (.pos=="adj") or (.pos=="adv")) | select((.word | test("[^a-z]"))|not) | {word: .word, type: .pos, pronunciation: .sounds[0].ipa, definitions: (try .senses|map(.glosses|join(" ")))}' \
|
||||||
wiktionary.json > wiktionary-p1.json
|
wiktionary.json > wiktionary-p1.json
|
||||||
|
|
||||||
jq --slurp '. | group_by(.word)[] | {word:.[0].word, pronunciation:.[0].pronunciation, meanings:[.[]|{type:.type, definitions:[try .definitions[]]| select(.!=[]) |map({(.):1})|add|keys_unsorted}]}' \
|
jq --slurp '. | group_by(.word)[] | {word:.[0].word, pronunciation:.[0].pronunciation, meanings:[.[]|{type:.type, form_of:(try .form_of), definitions:[try .definitions[]]| select(.!=[]) |map({(.):1})|add|keys_unsorted}]}' \
|
||||||
wiktionary-p1.json > wiktionary-p2.json
|
wiktionary-p1.json > wiktionary-p2.json
|
||||||
|
|
||||||
jq --slurp '.' wiktionary-p2.json > wiktionary-p3.json
|
jq --slurp '.' wiktionary-p2.json > wiktionary-p3.json
|
||||||
|
|
Loading…
Reference in New Issue