added 'form_of' boolean field
This commit is contained in:
parent
379c1b0b77
commit
106103b9ad
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
cd ../processing
|
||||
|
||||
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(" ")))}' \
|
||||
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(" ")))}' \
|
||||
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}]}' \
|
||||
|
|
Loading…
Reference in New Issue