Perte de d'éléments (expand?) #1

Closed parmentf opened this issue on 15 Sep 2022 - 6 comments

@parmentf parmentf commented on 15 Sep 2022

Je n'arrive pas à créer un exemple en dehors de ces données qui reproduise le problème:

$ jq < data/corpus-simple-instituts-50.json length
50
$ npx ezs -e enrich-teeft-en.ini # lit le corpus de la ligne du dessus, et enrichit les données, sauve dans le fichier de la ligne suivante
$  jq < data/corpus-simple-teeft-en-50.json length
39

Ce comportement se produit avec le paramètre size par défaut de [expand] (1).

Script en question: enrich-teeft-en.ini (c'est le seul où j'ai remarqué le problème, les scripts précédents ne l'ont pas).

Quand je mets 100 (comme dans la doc ezs), je récupère moins de résultats !

$ jq < data/corpus-simple-teeft-en-50.json length 
5

Je ne comprends pas, @thouveni !

@parmentf parmentf add the bug label on 15 Sep 2022

Information supplémentaire: il y a 5 documents sur les 50 qui n'ont pas de champ abstract (celui qu'on utilise pour enrichir).

Les scripts d'enrichissement précédents ont deux niveaux d'expand, et pourtant tout se passe correctement.

bizarre avec un autre web service ça fonctionne exemple
url = https://terms-extraction.services.inist.fr/v1/tools/normalize

je regarde...

Oui, teeft s'attend à recevoir une chaîne de caractères, et pour les 11 documents qui ne passent pas, c'est un tableau.
D'où une erreur dans le log du service web:

Error: item #1 [delegate] <Error: [TeeftToLowerCase] <TypeError: ["The effect of ocean heat uptake (OHU) on transient global warming is studied in a multimodel framework. Simple heat sinks are prescribed in shallow aquaplanet ocean mixed layers underlying atmospheric general circulation models independently and combined with CO2 forcing. Sinks are localized to either tropical or high latitudes, representing distinct modes of OHU found in coupled simulations. Tropical OHU produces modest cooling at all latitudes, offsetting only a fraction of CO2 warming. High-latitude OHU produces three times more global mean cooling in a strongly polar-amplified pattern. Global sensitivities in each scenario are set primarily by large differences in local shortwave cloud feedbacks, robust across models. Differences in atmospheric energy transport set the pattern of temperature change. Results imply that global and regional warming rates depend sensitively on regional ocean processes setting the OHU pattern, and that equilibrium climate sensitivity cannot be reliably estimated from transient observations.", "Key Points", "Climate response depends strongly on spatial pattern of ocean heat uptake Different radiative feedbacks govern transient and equilibrium CO2 warming Results are robust across an ensemble of aquaplanet climate models"] does not have a method named "toLowerCase">>
@parmentf parmentf referenced the issue on 15 Sep 2022

la version @ezs/analytics@1.19.5 corrige le problème et elle ne supprime plus les items refusés par le ws

Trop fort ! :)
Merci.

@parmentf parmentf referenced the issue on 23 Sep 2022

À partir de cette version, ça marche.

@parmentf parmentf closed this issue on 23 Sep 2022
Labels

Priority
default
Milestone
No milestone
Assignee
No one
2 participants
@parmentf @thouveni