LexFCS Data View Schema and Examples
Schema-Document (XSD 1.1): DataView-Lex.xsd
Specification (WIP): spec/
Examples: examples/
Validate Examples
# # install XSD 1.1 validator if not already done
# python3 -m venv venv
# source venv/bin/activate
# pip install xmlschema
xmlschema-validate --version 1.1 --schema DataView-Lex.xsd examples/*.lex.xml
# to see details add the `-v` flag
xmlschema-validate --version 1.1 --schema DataView-Lex.xsd examples/*.lex.xml -v
Convert Examples to JSON
Convert XML examples to JSON resembling output from FCS Aggregator:
./convertjson.sh
And to combine all the JSON together:
jq -s '{ lexEntries: [ .[].lexEntries[] ] }' examples/*.lex.json > lexEntries.json
# or assign pid
jq -s '{ lexEntries: [ .[].lexEntries[] | .pid = (.fields[] | if .type == "entryId" then select(.type == "entryId") else select(.type == "lemma") end | .values[0].value) ] }' examples/*.lex.json > lexEntries.json