diff --git a/loterre-resolvers/v1/combine.ini b/loterre-resolvers/v1/combine.ini index 592d02f..7f4f7c3 100644 --- a/loterre-resolvers/v1/combine.ini +++ b/loterre-resolvers/v1/combine.ini @@ -19,8 +19,25 @@ plugin = analytics # Flow configuration -[URLStream] -path = false +[debug] + +[replace] +path = primer +value = self() +[debug] + +[expand] +path = primer +cacheName = fix(`post-v1-primer-week-${env('loterreID')}-${env('weekNumber')}`) + +[expand/URLFetch] +timeout = 300000 +url = get('value') +path = null +target = value + +[exchange] +value = get('primer') [XMLParse] separator = /rdf:RDF/skos:Concept diff --git a/terms-extraction/examples.http b/terms-extraction/examples.http index 0c59076..1389478 100644 --- a/terms-extraction/examples.http +++ b/terms-extraction/examples.http @@ -1,7 +1,10 @@ +# To test locally, replace with +@baseUrl = http://localhost:31976 +#@baseUrl = https://terms-extraction.services.inist.fr # These examples can be used directly in VSCode, using REST Client extension (humao.rest-client) # Extraction des termes de deux textes en français -POST https://terms-extraction.services.inist.fr/v1/teeft/fr?indent=true HTTP/1.1 +POST {{baseUrl}}/v1/teeft/fr?indent=true HTTP/1.1 Content-Type: application/json [ @@ -21,7 +24,7 @@ ### # Extraction des termes de deux textes en anglais -POST https://terms-extraction.services.inist.fr/v1/teeft/en?indent=true HTTP/1.1 +POST {{baseUrl}}/v1/teeft/en?indent=true HTTP/1.1 Content-Type: application/json [ @@ -37,17 +40,21 @@ ### # Normalisation des termes de deux textes -POST https://terms-extraction.services.inist.fr/v1/tools/normalize?indent=true HTTP/1.1 +POST {{baseUrl}}/v1/tools/normalize?indent=true HTTP/1.1 Content-Type: application/json [ - { - "value": "Les dinosaures, de leur nom scientifique Dinosauria (du grec ancien deinόs « terrible » et saûros « lézard »), forment un super-ordre ainsi qu'un clade extrêmement diversifié de sauropsides de la sous-classe des diapsides et dont les uniques représentants actuels sont les oiseaux", - "id": "https://fr.wikipedia.org/wiki/Dinosauria" - }, - { - "value": "Café de Côte d'Ivoire", - "id": 1 - } + { + "id": 1, + "value": "café !" + }, + { + "id": 2, + "value": "Côte d'Ivoire" + }, + { + "id": 3, + "value": "Ça c'\'' est plus probant. À la rigueur, il faudrait aussi des accents en majuscules. ÉÈÔÇŒœ" + } ] ###