# Usage: npx ezs -e enrich-teeft-en.ini
# To see the enriched notices:
# $ fx < data/corpus-simple-teeft-en.json '.filter(o => o.ws.rnsr[0]?.length)'
[use]
# JSONParse URLConnect FILELoad FILESave
plugin = basics
# expand
plugin = analytics
[exchange]
value = [ "corpus-simple-instituts.json" ]
[JSONParse]
[FILELoad]
location = data
[JSONParse]
#2 - Teeft
[assign]
path = ws.teeft
value = fix(_.get(self, "abstract", ""), _.get(self, "title")).join(" ; ")
[expand]
path = ws.teeft
# WARNING: using the line below sometimes leads to unexpected results
size = 100
[expand/URLConnect]
url = https://terms-extraction.services.inist.fr/v1/teeft/en?nb=10
retries = 3
timeout = 6000000
noerror = true
[dump]
indent = true
[FILESave]
location = data
identifier = corpus-simple-teeft-en.json
[dump]
indent = true