[Lire le billet qui introduit cette série « OpenRefine au service de BACON : quelle évaluation pour les fichiers KBART ? »]
Dans le cadre de l’accompagnement des éditeurs scientifiques francophones à la mise en œuvre de la recommandation KBART, les fichiers sont évalués par l’Abes à l’aide d’OpenRefine.
Les tests menés sont de différents types : syntaxiques et sémantiques. Les premiers vérifient la conformité du format des métadonnées au regard des règles édictées par la recommandation. Les seconds comparent les informations contenues dans le fichier à celles du SUDOC.
Un script GREL a été réalisé, pour l’évaluation des périodiques d’une part, des livres électroniques d’autre part.
La dernière version du script utilisé pour l’évaluation des périodiques est la suivante :
[ { "op": "core/text-transform", "description": "Script syntaxique : pour chaque ligne, test l'ensemble des champs. Si une ligne ne contient que des champs vides, alors la mention « ligne vide » apparaît dans le champ publication_title de la ligne concernée", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "publication_title", "expression": "grel:if(cells.publication_title.value.length()==0,(if(cells.print_identifier.value.length()==0,(if(cells .online_identifier.value.length()==0,(if(cells.date_first_issue_online.value.length()==0,(if(cells.num_first_vol_online.value.length()==0,(if(cells.num_first_issue_online.value.length()==0,(if(cells.date_last_issue_online.value.length()==0,(if(cells.num_last_vol_online.value.length()==0,(if(cells.num_last_issue_online.value.length()==0,(if(cells.title_url.value.length()==0,(if(cells .first_author.value.length()==0,(if(cells.title_id.value.length()==0,(if(cells.embargo_info.value.length()==0,(if(cells.coverage_depth.value.length()==0,(if(cells.notes.value.length()==0,(if(cells.publisher_name.value.length()==0,(if(cells.publication_type.value.length()==0,(if(cells.date_monograph_published_print.value.length()==0,(if(cells.date_monograph_published_online.value.length()==0,(if(cells.monograph_volume.value.length()==0,(if(cells.monograph_edition.value.length()==0,(if(cells.first_editor.value.length()==0,(if(cells.parent_publication_title_id.value.length()==0,(if(cells.preceding_publication_title_id.value.length()==0,(if(cells.access_type.value.length()==0,'ligne vide',value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_first_issue_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_vol_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_issue_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_last_issue_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_vol_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_issue_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "embargo_info", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "preceding_publication_title_id", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_first_issue_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_vol_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_issue_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_last_issue_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_vol_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_issue_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "embargo_info", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "notes", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "preceding_publication_title_id", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access-type", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_first_issue_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_vol_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_issue_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_last_issue_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_vol_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_issue_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "embargo_info", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "SScript syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "notes", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "preceding_publication_title_id", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne et du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : remplace le x minuscule par un X majuscule pour les p-ISSN", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "print_identifier", "expression": "grel:value.replace(\"x\",\"X\")", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : remplace le x minuscule par un X majuscule pour les e-ISSN", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "online_identifier", "expression": "grel:value.replace(\"x\",\"X\")", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script syntaxique : doublons sur le publication_title", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "publication_title_doublon", "columnInsertIndex": 25, "baseColumnName": "publication_title", "expression": "grel:forNonBlank(value,v,facetCount(v,'value','publication_title'),'')", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : vérifie qu'aucun champ du publication_title n'est vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "grel:if(isBlank(value)==true,'titre manquant',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script syntaxique : doublons sur le print_identifier", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "print_identifier_doublon", "columnInsertIndex": 26, "baseColumnName": "print_identifier", "expression": "grel:forNonBlank(value,v,facetCount(v,'value','print_identifier'),'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script syntaxique : doublons sur le online_identifier", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "online_identifier_doublon", "columnInsertIndex": 27, "baseColumnName": "online_identifier", "expression": "grel:forNonBlank(value,v,facetCount(v,'value','online_identifier'),'')", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : ne conserve que les quatre premiers caractères contenus dans le date_first_issue_online, à condition qu'ils respectent le format YYYY. Sinon, renvoie un message d'erreur", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_first_issue_online", "expression": "grel:if(value.match(/.*(\\d{4}).*/)[0]==null,value+' : format incorrect',value.match(/.*(\\d{4}).*/)[0])", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : ne conserve que les quatre premiers caractères contenus dans le date_last_issue_online, à condition qu'ils respectent le format YYYY. Sinon, informe d'une erreur de format", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_last_issue_online", "expression": "grel:if(isNonBlank(value),if(value.match(/.*(\\d{4}).*/)[0]==null,value+' : format incorrect',value.match(/.*(\\d{4}).*/)[0]),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script syntaxique : le contenu du num_first_vol_online, lorsqu'il n'est pas numérique, suit-il une cohérence ?", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "num_first_vol_non_numérique", "columnInsertIndex": 28, "baseColumnName": "num_first_vol_online", "expression": "grel:if(isNotNull(value.match(/[0-9]*/)),'','cohérent ? '+value)", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script syntaxique : le contenu du num_first_issue_online, lorsqu'il n'est pas numérique, suit-il une cohérence ?", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "num_first_issue_non_numérique", "columnInsertIndex": 29, "baseColumnName": "num_first_issue_online", "expression": "grel:if(isNotNull(value.match(/[0-9]*/)),'','cohérent ? '+value)", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script syntaxique : le contenu du num_last_vol_online, lorsqu'il n'est pas numérique, suit-il une cohérence ?", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "num_last_vol_non_numérique", "columnInsertIndex": 30, "baseColumnName": "num_last_vol_online", "expression": "grel:if(isNotNull(value.match(/[0-9]*/)),'','cohérent ? '+value)", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script syntaxique : le contenu du num_last_issue_online, lorsqu'il n'est pas numérique, suit-il une cohérence ?", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "num_last_issue_non_numérique", "columnInsertIndex": 31, "baseColumnName": "num_last_issue_online", "expression": "grel:if(isNotNull(value.match(/[0-9]*/)),'','cohérent ? '+value)", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : URL manquante", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "grel:if(isBlank(value)==true,'URL obligatoire',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script syntaxique : la partie fixe du title_url mise de côté, la partie évolutive restante correspond-elle au title_id ? Test I ATTENTION : A ACTUALISER AVANT D'UTILISER LE SCRIPT : remplacer [X] par la partie fixe de l'URL", "engineConfig": { "mode": "record-based", "facets": [] }, "newColumnName": "title_url_bis", "columnInsertIndex": 32, "baseColumnName": "title_url", "expression": "grel:value.replace('[X]','')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script syntaxique : la partie fixe du title_url mise de côté, la partie évolutive restante correspond-elle au title_id ? Test II", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "title_url_vs_title_id", "columnInsertIndex": 33, "baseColumnName": "title_url_bis", "expression": "grel:if(value==cells['title_id'].value,'','erreur ? '+value)", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_author", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_print", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_volume", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_edition", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_editor", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "parent_publication_title_id", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : peut être vide ou contient strictement : P ou R + 1 à 9999 + Y ou M ou D", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "embargo_info", "expression": "grel:if(isBlank(value),value,if(isNotNull(value.match(/[PR]\\d{1,4}[YMD]/)),'',value+': format incorrect'))", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : contient obligatoirement « fulltext », « selected articles » ou abstract", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "grel:if(isNotNull(value.match(/fulltext|selected articles|abstracts/)),'',value+' : format incorrect')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : ne peut pas être vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "grel:if(isBlank(value)!=false,'doit être renseigné',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : contient obligatoirement « serial »", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "grel:if(isNotNull(value.match(/serial/)),value,value+' : format incorrect')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : contient obligatoirement P ou F", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "grel:if(isNotNull(value.match(/[PF]/)),value,value+' : format incorrect')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script sémantique : création d'une nouvelle colonne, qui récupère la valeur du date_first_issue_online et lui donne le format Number", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "year_first_issue", "columnInsertIndex": 34, "baseColumnName": "date_first_issue_online", "expression": "grel:value.split(\"-\")[0].toNumber()", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : création d'une nouvelle colonne, qui récupère la valeur du date_last_issue_online et lui donne le format Number", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "last_year_issue", "columnInsertIndex": 35, "baseColumnName": "date_last_issue_online", "expression": "grel:value.split(\"-\")[0].toNumber()", "onError": "set-to-blank" }, { "op": "core/column-addition-by-fetching-urls", "description": "Script sémantique : indique quel webservice (issnbacon) interroger pour la récupération des informations de référence dans le SUDOC", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "sudoc_print_identifier", "columnInsertIndex": 36, "baseColumnName": "print_identifier", "urlExpression": "grel:'https://bacon.abes.fr/issnbacon/'+value+'.json'", "onError": "set-to-blank", "delay": 10 }, { "op": "core/column-addition", "description": "Script sémantique : indiquer, le cas échéant, l'écart entre le type de média donné par le SUDOC et le type d'identifiant (en l'occurrence papier)", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "erreur_print_media", "columnInsertIndex": 37, "baseColumnName": "sudoc_print_identifier", "expression": "grel:if(value!=null+isNonBlank(cells[\"print_identifier\"].value),(if(value.parseJson()[\"sudoc\"][\"ppn\"][\"media\"]!=\"a\",cells[\"print_identifier\"].value+\" n'est pas un imprime\",forEach(value.parseJson().sudoc,v,[v.ppn.media,v.ppn.content].join(':')).join(' '))),'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : récupérer les informations associées au webservice issnbacon pour la date de début de couverture", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "sudoc_startdate", "columnInsertIndex": 38, "baseColumnName": "sudoc_print_identifier", "expression": "grel:value.parseJson()[\"sudoc\"][\"ppn\"][\"startdate\"]", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : renvoie le ppn de la notice si la date SUDOC est plus récente que la date de début de couverture, indice d'une métarevue non déployée", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "erreur_print_date", "columnInsertIndex": 39, "baseColumnName": "year_first_issue", "expression": "grel:if(value<cells[\"sudoc_startdate\"].value, cells[\"sudoc_print_identifier\"].value.parseJson()[\"sudoc\"][\"ppn\"][\"content\"],\"\")", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : si la colonne erreur_print_date contient un élément, rappel des dates : date SUDOC > date_first_issue_online", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "date_sudoc>date_first", "columnInsertIndex": 40, "baseColumnName": "erreur_print_date", "expression": "grel:if(isBlank(value),'',cells[\"sudoc_print_identifier\"].value.parseJson()[\"sudoc\"][\"ppn\"][\"startdate\"]+' > '+cells[\"date_first_issue_online\"].value)", "onError": "set-to-blank" }, { "op": "core/column-addition-by-fetching-urls", "description": "Script sémantique : indique quel webservice (issnbacon) interroger pour la récupération des informations de référence dans le SUDOC, pour le online_identifier", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "sudoc_online_identifier", "columnInsertIndex": 41, "baseColumnName": "online_identifier", "urlExpression": "grel:'https://bacon.abes.fr/issnbacon/'+value+'.json'", "onError": "set-to-blank", "delay": 10 }, { "op": "core/column-addition", "description": "Script sémantique : indiquer, le cas échéant, l'écart entre le type de média donné par le SUDOC et le type d'identifiant (en l'occurrence électronique)", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "erreur_online_media", "columnInsertIndex": 42, "baseColumnName": "sudoc_online_identifier", "expression": "grel:if(value!=null+isNonBlank(cells[\"online_identifier\"].value),(if(value.parseJson()[\"sudoc\"][\"ppn\"][\"media\"]!=\"l\",cells[\"online_identifier\"].value+\" n'est pas un imprime\",forEach(value.parseJson().sudoc,v,[v.ppn.media,v.ppn.content].join(':')).join(' '))),'')", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Script sémantique : supprime la colonne year_first_issue", "columnName": "year_first_issue" }, { "op": "core/column-removal", "description": "Script sémantique : supprime la colonne last_year_issue", "columnName": "last_year_issue" }, { "op": "core/column-removal", "description": "Script sémantique : supprime la colonne sudoc_startdate", "columnName": "sudoc_startdate" }, { "op": "core/text-transform", "description": "Script syntaxique : p-ISSN non conforme", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:forNonBlank(value,v,if(v.match(/^\\d{4}-\\d{3}(\\d|X)$/)!=null,value,value+\" n'est pas un ISSN conforme\"),'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : e-ISSN non conforme", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:forNonBlank(value,v,if(v.match(/^\\d{4}-\\d{3}(\\d|X)$/)!=null,value,value+\" n'est pas un ISSN conforme\"),'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : vérifie qu'un titre dispose au moins d'un ISSN", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:if(isBlank(value),(if(isBlank(cells[\"online_identifier\"].value),'aucun ISSN',value)),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : aucun p-ISSN mais un e-ISSN : s'agit-il d'une revue numérique native ?", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:if(isBlank(value)==true,'revue numerique native ?',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : tous les eISSN doivent être renseignés, y compris si la revue a été numérisée (demande à faire auprès du CIEPS)", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:if(isBlank(value)==true,'ISSN obligatoire',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 } ]
Celle pour l’évaluation des livres électroniques :
[ { "op": "core/text-transform", "description": "Script syntaxique : pour chaque ligne, test l'ensemble des champs. Si une ligne ne contient que des champs vides, alors la mention « ligne vide » apparaît dans le champ publication_title de la ligne concernée", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "publication_title", "expression": "grel:if(cells.publication_title.value.length()==0,(if(cells.print_identifier.value.length()==0,(if(cells .online_identifier.value.length()==0,(if(cells.date_first_issue_online.value.length()==0,(if(cells.num_first_vol_online.value.length()==0,(if(cells.num_first_issue_online.value.length()==0,(if(cells.date_last_issue_online.value.length()==0,(if(cells.num_last_vol_online.value.length()==0,(if(cells.num_last_issue_online.value.length()==0,(if(cells.title_url.value.length()==0,(if(cells .first_author.value.length()==0,(if(cells.title_id.value.length()==0,(if(cells.embargo_info.value.length()==0,(if(cells.coverage_depth.value.length()==0,(if(cells.notes.value.length()==0,(if(cells.publisher_name.value.length()==0,(if(cells.publication_type.value.length()==0,(if(cells.date_monograph_published_print.value.length()==0,(if(cells.date_monograph_published_online.value.length()==0,(if(cells.monograph_volume.value.length()==0,(if(cells.monograph_edition.value.length()==0,(if(cells.first_editor.value.length()==0,(if(cells.parent_publication_title_id.value.length()==0,(if(cells.preceding_publication_title_id.value.length()==0,(if(cells.access_type.value.length()==0,'ligne vide',value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_author", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_print", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_online", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_volume", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_edition", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_editor", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "parent_publication_title_id", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Suppression des espaces en début et en fin de cellule", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "value.trim()", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_author", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_print", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_online", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_volume", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_edition", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_editor", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "parent_publication_title_id", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : Si plusieurs caractères d’espaces consécutifs, fusion en un seul", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "value.replace(/\\s+/,' ')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_author", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_print", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_volume", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_edition", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_editor", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "parent_publication_title_id", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "SScript syntaxique : suppression du caractère de retour à la ligne", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_title", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_url", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_author", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publisher_name", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_print", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_online", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_volume", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_edition", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_editor", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "parent_publication_title_id", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : suppression du caractère d'espace insécable", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "grel:value.replace(/\\u000a/,'').replace(/\\u00A0/,'')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition-by-fetching-urls", "description": "Script sémantique : création d'une colonne contenant les informations du Sudoc à partir du online_identifier grâce au webservice 'isbnbacon'", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "E-ISBN_sudoc_json", "columnInsertIndex": 25, "baseColumnName": "online_identifier", "urlExpression": "grel:if(value!=null,'https://bacon.abes.fr/isbnbacon/'+value+'.json','')", "onError": "set-to-blank", "delay": 10 }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant le publication_title nettoyé", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "pub_title_clean", "columnInsertIndex": 25, "baseColumnName": "publication_title", "expression": "grel:toLowercase(trim(value.replace(/\\u00A0/, ' '))).replace(/\\p{Punct}/,' ').replace(/\\u2019/, ' ').replace(/\\u200E/, ' ').replace(/\\s+/, ' ')", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : remplace le x minuscule par un X majuscule pour les p-ISBN", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "print_identifier", "expression": "grel:value.replace(\"x\",\"X\")", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : remplace le x minuscule par un X majuscule pour les e-ISBN", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "online_identifier", "expression": "grel:value.replace(\"x\",\"X\")", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant le titre sudoc", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-sudoc_title", "columnInsertIndex": 25, "baseColumnName": "E-ISBN_sudoc_json", "expression": "grel:value.parseJson()['sudoc']['ppn']['title']", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant le E-sudoc_title nettoyé", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-sudoc_title_clean", "columnInsertIndex": 25, "baseColumnName": "E-sudoc_title", "expression": "grel:toLowercase(trim(value.replace(/\\u00A0/, ' '))).replace(/\\p{Punct}/,' ').replace(/\\u2019/, ' ').replace(/\\u200E/, ' ').replace(/\\s+/, ' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : préparation du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-min_clean_title", "columnInsertIndex": 25, "baseColumnName": "pub_title_clean", "expression": "grel:min(length(value),length(cells['E-sudoc_title_clean'].value))", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : résultat du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-dist_title", "columnInsertIndex": 25, "baseColumnName": "E-min_clean_title", "expression": "grel:jarowinkler(stripAccents(substring(cells['pub_title_clean'].value,0,value)),stripAccents(substring(cells['E-sudoc_title_clean'].value,0,value)))", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "E-sudoc_title" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "E-min_clean_title" }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant la valeur 'NOK' si l'ISBN n'est pas électronique", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "error_online_media", "columnInsertIndex": 25, "baseColumnName": "E-ISBN_sudoc_json", "expression": "grel:if(value!=null,if(value.parseJson()['sudoc']['ppn']['media']!='l','NOK',''),'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Gestion des ppn multiples", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "E-ISBN_multi-ppn", "columnInsertIndex": 25, "baseColumnName": "E-ISBN_sudoc_json", "expression": "grel:forEach(value.parseJson().sudoc,v,[v.ppn.media,v.ppn.content].join(':')).join(' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Test sur le type de média", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "E-ISBN_multi-ppn_final", "columnInsertIndex": 25, "baseColumnName": "E-ISBN_multi-ppn", "expression": "grel:if(isBlank(value)==false,if(value.match(/.*l.*/)==null,value,''),'')", "onError": "set-to-blank" }, { "op": "core/column-split", "description": "Séparer le contenu de la colonne P-ISBN_multi_ppn_final en autant de colonnes qu'il y a de ppn", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "E-ISBN_multi-ppn_final", "guessCellType": true, "removeOriginalColumn": true, "mode": "separator", "separator": " ", "regex": false, "maxColumns": 0 }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant le first_author nettoyé", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "first_author_clean", "columnInsertIndex": 25, "baseColumnName": "first_author", "expression": "grel:toLowercase(trim(value.replace(/\\u00A0/, ' '))).replace(/\\p{Punct}/,' ').replace(/\\u2019/, ' ').replace(/\\u200E/, ' ').replace(/\\s+/, ' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : extraire l'auteur pour comparaison", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-sudoc_author", "columnInsertIndex": 25, "baseColumnName": "E-ISBN_sudoc_json", "expression": "grel:value.parseJson()['sudoc']['ppn']['marcautrel']", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant l'auteur sudoc nettoyé", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-sudoc_author_clean", "columnInsertIndex": 25, "baseColumnName": "E-sudoc_author", "expression": "grel:toLowercase(trim(value.replace(/\\u00A0/, ' '))).replace(/\\p{Punct}/,' ').replace(/\\u2019/, ' ').replace(/\\u200E/, ' ').replace(/\\s+/, ' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : préparation du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-min_clean_author", "columnInsertIndex": 25, "baseColumnName": "first_author_clean", "expression": "grel:min(length(value),length(cells['E-sudoc_author_clean'].value))", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : résultat du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-dist_author", "columnInsertIndex": 25, "baseColumnName": "E-min_clean_author", "expression": "grel:if(value!=0,(jarowinkler(stripAccents(substring(cells['first_author_clean'].value,0,value)),stripAccents(substring(cells['E-sudoc_author_clean'].value,0,value)))),'')", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "E-sudoc_author" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "E-min_clean_author" }, { "op": "core/column-addition-by-fetching-urls", "description": "Script sémantique : création d'une colonne contenant les informations du Sudoc à partir du print_identifier grâce au webservice 'isbnbacon'", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "P-ISBN_sudoc_json", "columnInsertIndex": 25, "baseColumnName": "print_identifier", "urlExpression": "grel:if(value!=null,'https://bacon.abes.fr/isbnbacon/'+value+'.json','')", "onError": "set-to-blank", "delay": 10 }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant le titre sudoc", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-sudoc_title", "columnInsertIndex": 25, "baseColumnName": "P-ISBN_sudoc_json", "expression": "grel:if(cells['E-ISBN_sudoc_json']==null,value.parseJson()['sudoc']['ppn']['title'],'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : création, en 16ème position, d'une colonne contenant le P-sudoc_title nettoyé", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-sudoc_title_clean", "columnInsertIndex": 25, "baseColumnName": "P-sudoc_title", "expression": "grel:toLowercase(trim(value.replace(/\\u00A0/, ' '))).replace(/\\p{Punct}/,' ').replace(/\\u2019/, ' ').replace(/\\u200E/, ' ').replace(/\\s+/, ' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : préparation, en 17ème position, du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-min_clean_title", "columnInsertIndex": 25, "baseColumnName": "pub_title_clean", "expression": "grel:min(length(value),length(cells['P-sudoc_title_clean'].value))", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : résultat du calcul de distance, en 18ème position", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-dist_title", "columnInsertIndex": 25, "baseColumnName": "P-min_clean_title", "expression": "grel:if(cells['P-min_clean_title'].value!=0,jarowinkler(stripAccents(substring(cells['pub_title_clean'].value,0,value)),stripAccents(substring(cells['P-sudoc_title_clean'].value,0,value))),'')", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "P-sudoc_title" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "P-min_clean_title" }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant la valeur 'NOK' si l'ISBN n'est pas papier", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "erreur_print_media", "columnInsertIndex": 25, "baseColumnName": "P-ISBN_sudoc_json", "expression": "grel:if(value!=null,if(value.parseJson()['sudoc']['ppn']['media']!='a','NOK',''),'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Gestion des ppn multiples", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "P-ISBN_multi-ppn", "columnInsertIndex": 25, "baseColumnName": "P-ISBN_sudoc_json", "expression": "grel:forEach(value.parseJson().sudoc,v,[v.ppn.media,v.ppn.content].join(':')).join(' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Test sur le type de média", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "P-ISBN_multi-ppn_final", "columnInsertIndex": 25, "baseColumnName": "P-ISBN_multi-ppn", "expression": "grel:if(isBlank(value)==false,if(value.match(/.*a.*/)==null,value,''),'')", "onError": "set-to-blank" }, { "op": "core/column-split", "description": "Séparer le contenu de la colonne P-ISBN_multi_ppn_final en autant de colonnes qu'il y a de ppn", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "P-ISBN_multi-ppn_final", "guessCellType": true, "removeOriginalColumn": true, "mode": "separator", "separator": " ", "regex": false, "maxColumns": 0 }, { "op": "core/column-addition", "description": "Script sémantique : extraire l'auteur du json pour comparaison", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-sudoc_author", "columnInsertIndex": 25, "baseColumnName": "P-ISBN_sudoc_json", "expression": "grel:if(cells['E-sudoc_author']==null,value.parseJson()['sudoc']['ppn']['marcautrel'],'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : création d'une colonne contenant l'auteur sudoc nettoyé", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-sudoc_author_clean", "columnInsertIndex": 25, "baseColumnName": "P-sudoc_author", "expression": "grel:toLowercase(trim(value.replace(/\\u00A0/, ' '))).replace(/\\p{Punct}/,' ').replace(/\\u2019/, ' ').replace(/\\u200E/, ' ').replace(/\\s+/, ' ')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : préparation du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-min_clean_author", "columnInsertIndex": 25, "baseColumnName": "first_author_clean", "expression": "grel:min(length(value),length(cells['P-sudoc_author_clean'].value))", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : résultat du calcul de distance", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-dist_author", "columnInsertIndex": 25, "baseColumnName": "P-min_clean_author", "expression": "grel:if(value!=0,(jarowinkler(stripAccents(substring(cells['first_author_clean'].value,0,value)),stripAccents(substring(cells['P-sudoc_author_clean'].value,0,value)))),'')", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "P-sudoc_author" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "P-min_clean_author" }, { "op": "core/text-transform", "description": "Script syntaxique : ne conserve que les quatre premiers caractères contenus dans le date_monograph_published_online, à condition qu'ils respectent le format YYYY. Sinon, informe d'une erreur de format", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_online", "expression": "grel:if(value.match(/.*(\\d{4}).*/)[0]==null,value+' : format incorrect',value.match(/.*(\\d{4}).*/)[0])", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : ne conserve que les quatre premiers caractères contenus dans le date_last_issue_online, à condition qu'ils respectent le format YYYY. Sinon, informe d'une erreur de format", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_monograph_published_print", "expression": "grel:if(isNonBlank(value),if(value.match(/.*(\\d{4}).*/)[0]==null,value+' : format incorrect',value.match(/.*(\\d{4}).*/)[0]),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script sémantique : extraire la date pour comparaison", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-sudoc_date", "columnInsertIndex": 19, "baseColumnName": "E-ISBN_sudoc_json", "expression": "grel:toString(value.parseJson()['sudoc']['ppn']['pubdate'])", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script sémantique : crée une nouvelle colonne, résultat de la comparaison sur les dates de l'électronique", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "E-sudoc_date_check", "columnInsertIndex": 20, "baseColumnName": "E-sudoc_date", "expression": "grel:if(isNonBlank(cells['date_monograph_published_online'].value),(if(contains(cells['date_monograph_published_online'].value,'format incorrect'),'',(if(value!=cells['date_monograph_published_online'].value,value,'')))),'')", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "E-sudoc_date" }, { "op": "core/column-addition", "description": "Script sémantique : extraire la date pour comparaison", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-sudoc_date", "columnInsertIndex": 18, "baseColumnName": "P-ISBN_sudoc_json", "expression": "grel:toString(value.parseJson()['sudoc']['ppn']['pubdate'])", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Crée une nouvelle colonne, résultat de la comparaison sur les dates du papier", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "P-sudoc_date_check", "columnInsertIndex": 19, "baseColumnName": "P-sudoc_date", "expression": "grel:if(isNonBlank(cells['date_monograph_published_print'].value),(if(contains(cells['date_monograph_published_print'].value,'format incorrect'),'',(if(value!=cells['date_monograph_published_print'].value,value,'')))),'')", "onError": "set-to-blank" }, { "op": "core/column-removal", "description": "Suppression d'une colonne devenue inutile", "columnName": "P-sudoc_date" }, { "op": "core/column-addition", "description": "Script syntaxique : doublons sur le publication_title", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "publication_title_doublon", "columnInsertIndex": 27, "baseColumnName": "publication_title", "expression": "grel:forNonBlank(value,v,facetCount(v,'value','publication_title'),'')", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : vérifie qu'aucun champ du publication_title ne soit vide", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "publication_title", "expression": "grel:if(isBlank(value)==true,'titre manquant',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script syntaxique : doublons sur le print_identifier", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "print_identifier_doublon", "columnInsertIndex": 28, "baseColumnName": "print_identifier", "expression": "grel:forNonBlank(value,v,facetCount(v,'value','print_identifier'),'')", "onError": "set-to-blank" }, { "op": "core/column-addition", "description": "Script syntaxique : doublons sur le online_identifier", "engineConfig": { "mode": "row-based", "facets": [] }, "newColumnName": "online_identifier_doublon", "columnInsertIndex": 29, "baseColumnName": "online_identifier", "expression": "grel:forNonBlank(value,v,facetCount(v,'value','online_identifier'),'')", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_first_issue_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_vol_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_first_issue_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "date_last_issue_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_vol_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "num_last_issue_online", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : aucun champ vide", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "title_url", "expression": "grel:if(isBlank(value)==true,'URL obligatoire',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/column-addition", "description": "Script syntaxique : la partie fixe du title_url mise de côté, la partie évolutive restante correspond-elle au title_id ? Test I ATTENTION : A ACTUALISER AVANT D'UTILISER LE SCRIPT : remplacer [X] par la partie fixe de l'URL", "engineConfig": { "facets": [], "mode": "row-based" }, "newColumnName": "title_url_bis", "columnInsertIndex": 10, "baseColumnName": "title_url", "expression": "grel:value.replace('[X]','')", "onError": "set-to-blank" }, { "op": "core/text-transform", "description": "Script syntaxique : la partie fixe du title_url mise de côté, la partie évolutive restante correspond-elle au title_id ? Test II", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "title_id", "expression": "grel:if(cells[\"title_url_bis\"].value==cells[\"title_id\"].value,value,\"erreur ? \"+value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "embargo_info", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : contient obligatoirement « fulltext », « selected articles » ou abstract", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "coverage_depth", "expression": "grel:if(isNotNull(value.match(/fulltext|selected articles|abstract/)),value,value+' format incorrect')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : ne peut pas être vide", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "publisher_name", "expression": "grel:if(isBlank(value)!=false,'doit être renseigné',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : contient obligatoirement « monograph »", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "publication_type", "expression": "grel:if(isNotNull(value.match(/monograph/)),value,value+' : format incorrect')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : le contenu du monograph_volume, lorsqu'il n'est pas numérique, suit-il une cohérence ?", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_volume", "expression": "grel:if(isNotNull(value.match(/[0-9]*/)),value,'cohérent ? '+value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : le contenu du monograph_edition, lorsqu'il n'est pas numérique, suit-il une cohérence ?", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "monograph_edition", "expression": "grel:if(isNotNull(value.match(/[0-9]*/)),value,'cohérent ? '+value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : le contenu du first_author est-il une suite de lettres, majuscules ou minuscules, formant un mot unique ?", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "first_author", "expression": "grel:if(isNull(value.match(/[a-zA-Z]*/))==true,value+ ' : erreur ?',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : champ obligatoirement vide", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "preceding_publication_title_id", "expression": "grel:if(isBlank(value)!=true,value+' : doit être vide',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : contient obligatoirement P ou F", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "access_type", "expression": "grel:if(isNotNull(value.match(/[PF]/)),value,value+' : format incorrect')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : print_identifier et online_identifier ne peuvent être vides à la fois, TEST 1", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "print_identifier", "expression": "grel:if(cells.print_identifier.value.length()==0,(if(cells.online_identifier.value.length()==0,'manque ISBN',value)),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : print_identifier et online_identifier ne peuvent être vides à la fois, TEST 2", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "online_identifier", "expression": "grel:if(cells.print_identifier.value=='manque ISBN',(if(cells.online_identifier.value.length()==0,'manque ISBN',value)),value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : aucun e-ISBN mais un p-ISBN : s'agit-il d'un e-book numérique natif ?", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "print_identifier", "expression": "grel:if(isBlank(value)==true,'e-book natif numérique ?',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : tous les eISBN doivent être renseignés, y compris si le livre a été numérisé (demande à faire auprès du CIEPS)", "engineConfig": { "mode": "row-based", "facets": [] }, "columnName": "online_identifier", "expression": "grel:if(isBlank(value)==true,'ISBN obligatoire',value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : p-ISBN non conforme I", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:value.replace('-','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : p-ISBN non conforme II", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "print_identifier", "expression": "grel:if(value.match(/^(97(8|9))?\\d{9}(\\d|X)$/)==null,value+\" n'est pas un isbn conforme\",value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : e-ISBN non conforme I", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:value.replace('-','')", "onError": "keep-original", "repeat": false, "repeatCount": 10 }, { "op": "core/text-transform", "description": "Script syntaxique : e-ISBN non conforme II", "engineConfig": { "facets": [], "mode": "row-based" }, "columnName": "online_identifier", "expression": "grel:if(value.match(/^(97(8|9))?\\d{9}(\\d|X)$/)==null,value+\" n'est pas un isbn conforme\",value)", "onError": "keep-original", "repeat": false, "repeatCount": 10 } ]
Avant d’appliquer ces scripts dans OpenRefine et après avoir déposé les fichiers sur un serveur dédié, cinq critères syntaxiques sont préalablement vérifiés :
- la syntaxe du nom de fichier [6.5.1] (la numérotation entre crochets renvoie à la documentation KBART Phase II)
- la présence de vingt-cinq colonnes, correctement nommées et ordonnées [6.4.4, 6.4.5]
- l’obligation de renseigner certaines colonnes, d’en laisser d’autres vides, selon le type de document [6.6]
- l’encodage du texte en UTF-8 [6.4.3]
- le séparateur de champs, qui doit être la tabulation [6.4.1]
Ces critères doivent être remplis pour passer à l’étape suivante. Ils sont par ailleurs obligatoires pour un chargement dans la base.
Si un fichier ne répond pas à l’un de ces critères, l’éditeur en est informé. L’évaluation ne peut aller plus loin avant qu’une nouvelle version, corrigée, ne nous soit parvenue.
Dans le cas contraire, le fichier est chargé dans OpenRefine et le script correspondant au type de document est appliqué. Le script applicable aux périodiques contient 97 opérations. Celui pour les e-books, 145. Ce nombre peut varier selon la qualité du fichier, certaines opérations n’ayant pas lieu si aucune correction n’est nécessaire.
Les erreurs de type syntaxique sont mentionnées directement dans la cellule qui les contient. En revanche, les opérations de type sémantique nécessitent de créer des colonnes supplémentaires pour l’affichage des erreurs. En effet, les erreurs sémantiques sont des erreurs potentielles, qui doivent être vérifiées avant d’être validées. Il est nécessaire, pour comprendre ce choix, de savoir que nous communiquons à l’éditeur un fichier, au format html, qui accompagne le rapport écrit transmis après chaque évaluation. Ce fichier est le résultat d’un différentiel entre le fichier KBART qui nous a été transmis par l’éditeur et le fichier évalué sur lequel le script a été appliqué et enrichi des corrections de celui qui l’évalue. L’outil utilisé est DAFF.
Les scripts ont donc été pensés selon le type de document, selon le type d’erreur, mais aussi selon l’usage qui en est fait par les éditeurs. Disposer de ce fichier html leur permet, grâce à un code couleur, de repérer facilement les lignes qui ont été modifiées lors de l’évaluation, qu’il s’agisse d’une modification automatisée grâce au script ou d’une modification manuelle effectuée par l’évaluateur.
Pour résumer, prenons deux exemples d’opérations : celui du format des identifiants, ISSN et ISBN, qui est une opération syntaxique ; celui des métarevues, qui permet de déceler la présence de titres non déployés dans le fichier.
Un identifiant non conforme sera décelé par le script sans équivoque. Un ISSN sans tiret ou contenant la lettre ‘X’ en deuxième position contient nécessairement une erreur.
En revanche, le script permettra de repérer une date de début de couverture (date_first_issue_online) inférieure à la date de début de la publication contenue dans le SUDOC, indice susceptible de révéler la présence d’une métarevue non déployée, mais ne sera pas en mesure d’apporter une réponse plus aboutie afin d’aider l’éditeur à corriger son fichier. Une intervention humaine sera nécessaire afin de consulter le registre ISSN et enrichir le fichier des titres de la métarevue qui en sont absents.
Vous comprenez maintenant pourquoi certaines modifications du fichier par le script doivent être faites non pas directement dans les cellules que contient la version qui nous est livrée par l’éditeur, mais dans des colonnes supplémentaires : pour les tests sémantiques, l’évaluateur modifie les cellules du fichier qui contiennent des erreurs, tout en s’appuyant sur les informations contenues dans les colonnes générées par le script.
Une fois le fichier corrigé des erreurs syntaxiques et sémantiques qu’il contient, il est exporté d’OpenRefine.
Le différentiel est alors généré et son résultat transmis à l’éditeur comme illustration des informations contenues dans le rapport.
Peut-être vous êtes-vous déjà lancé dans l’utilisation des scripts avant d’en arriver là dans la lecture du billet. J’en serais heureux ! Peut-être alors vous êtes-vous trouvé confronté à certaines incompréhensions dans l’analyse du résultat. Rien de plus normal, surtout si vos interrogations portent sur les deux points suivants :
- les scripts ont été élaborés sous la version 2.5 d’OpenRefine, qui s’appelait encore GoogleRefine à l’époque de sa conception, c’est-à-dire en 2011. Depuis, deux nouvelles versions ont vu le jour. Mais ces dernières sont des versions beta. Nous avons préféré nous appuyer sur la dernière version stable, la 2.5. Bien que les scripts semblent compatibles avec les versions plus récentes, tous les tests n’ont pas encore été effectués pour le confirmer.
- la colonne ‘P-dist_author’ du script e-books ne laisse apparaître aucune information, voire n’a pas été générée. Rien de plus normal : elle contient le résultat d’un calcul de distance entre les chaînes de caractères contenues dans le ‘publication_title’ et la zone 200 de la notice SUDOC renvoyée par l’ISBN papier. Or ce calcul de distance s’appuie sur une fonction présente sur le serveur qui héberge OpenRefine à l’Abes. Vous ne pouvez donc pas y faire appel. Cette restriction est valable pour d’autres opérations. Notez, pour les plus curieux, qu’OpenRefine dispose de tels outils par défaut.
Ne pas être en mesure d’exploiter pleinement ces scripts pourrait être frustrant… C’est pourquoi nous proposons à ceux qui souhaitent en savoir plus sur la manière de les utiliser de rejoindre le premier des CERCLES mené dans le cadre de BACON. Pour en savoir plus, rendez-vous au prochain (et dernier) billet de la série.
N.B. : les scripts communiqués correspondent à une version. Ils ne sont en rien figés et nous serions très heureux de les enrichir de vos suggestions.
Cyril Leroy
Ping : OpenRefine au service de BACON : quelle évaluation pour les fichiers KBART ? [1] – Introduction | Punktokomo ;