# Usage: npx ezs detect-cnrs.ini < data/corpus-simple-label-pascal.json > data/corpus-simple-cnrs.json # To see the enriched notices: # $ fx < data/corpus-simple-cnrs.json '.filter(o => o.ws.rnsr[0]?.length)' [use] # JSONParse plugin = basics [JSONParse] [assign] path = ws.cnrsAffiliations value = get('affiliations').filter(a => a.includes('CNRS') || a.includes('UMR')) [assign] path = ws.cnrs value = get('ws.cnrsAffiliations', []).thru(affiliations => affiliations.length ? "oui" : "non") [exchange] value = omit('ws.cnrsAffiliations') [dump] indent = true