🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@ezs/conditor

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ezs/conditor

ezs statements for Conditor

Source
npmnpm
Version
1.9.15
Version published
Maintainers
2
Created
Source

conditor

Présentation

Ce plugin est propose une série d'instructions pour traiter (aligner les affiliations avec le RNSR), requêter les documents de l'API Conditor.

installation

npm install @ezs/core
npm install @ezs/conditor

Scripts

$ ./bin/affAlign.js < data/1000-notices-conditor-hal.json | ./bin/compareRnsr.js
recall: 0.7104885057471264
correct: 989
total: 1392

Warning: to use the scripts, you need to install @ezs/basics too.

Règles certaines

Les règles certaines utilisées par affAlign, appliquées à l'adresse de l'affiliation à aligner sont les suivantes:

  • le code_postal ou la ville_postale de la structure doivent ĂŞtre prĂ©sents,
  • et pour au moins une des tutelles (etabAssoc.*.etab, et etabAssoc.*.etab.natTutEtab vaut TUTE):
    • soit etabAssoc.*.etab.sigle ou le etabAssoc.*.etab.libelle sont prĂ©sents,
    • soit etabAssoc.*.etab.libelle commence par UniversitĂ© et le etabAssoc.*.etab.libelle est prĂ©sent (mais pas le etabAssoc.*.etab.sigle).
  • et on trouve la bonne structure:
    • soit etabAssoc.*.label et etabAssoc.*.numero sont prĂ©sents proches et en sĂ©quence (ex: GDR2945, GDR 2945 ou GDR mot 2945),
    • soit sigle est prĂ©sent,
    • soit intitule est prĂ©sent.
  • et la structure existait lors de la publication: une des xPublicationDate est entre annee_creation et l'Ă©ventuelle an_fermeture.

Sachant qu'on appauvrit (casse, accents, tiret, apostrophe) tous les champs.

usage

Table of Contents

RNSR

compareRnsr

Take Conditor JSON documents and compute the recall of authors.affiliations.conditorRnsr in relation to authors.affiliations.rnsr.

Examples

Input

[{
     "authors": [{
         "affiliations": [{
             "address": "GDR 2989 Université Versailles Saint-Quentin-en-Yvelines, 63009",
             "rnsr": ["200619958X"],
             "conditorRnsr": ["200619958X"]
         }]
     }]
}]

Output

{
     "correct": 1,
     "total": 1,
     "recall": 1
}

conditorScroll

Use scroll to return all results from Conditor API.

:warning: you have to put a valid token into a .env file, under CONDITOR_TOKEN variable:

CONDITOR_TOKEN=eyJhbG...

Parameters

  • q string query (optional, default "")
  • scroll string duration of the scroll (optional, default "5m")
  • page_size number size of the pages (optional, default 1000)
  • max_page number maximum number of pages (optional, default 1000000)
  • includes string fields to get in the response
  • excludes string fields to exclude from the response
  • sid string User-agent identifier (optional, default "ezs-conditor")
  • progress boolean display a progress bar in stderr (optional, default false)

Examples

Input

{
  "q": "Test",
  "page_size": 1,
  "max_page": 1,
  "includes": "sourceUid"
}

Output

[[
    {
        "sourceUid": "hal$hal-01412764",
        "_score": 5.634469,
        "_sort": [
            0
        ]
    }
]]

Returns Array<object>

affAlign

Find the RNSR identifiers in the authors affiliation addresses.

Input file:

[{
     "xPublicationDate": ["2012-01-01", "2012-01-01"],
     "authors": [{
         "affiliations": [{
             "address": "GDR 2989 Université Versailles Saint-Quentin-en-Yvelines, 63009"
         }]
     }]
}]

Script:

[use]
plugin = basics
plugin = conditor

[JSONParse]
[affAlign]
[JSONString]
indent = true

Output:

[{
     "xPublicationDate": ["2012-01-01", "2012-01-01"],
     "authors": [{
         "affiliations": [{
             "address": "GDR 2989 Université Versailles Saint-Quentin-en-Yvelines, 63009",
             "conditorRnsr": ["200619958X"]
         }]
     }]
}]

xPublicationYears

Keywords

conditor

FAQs

Package last updated on 17 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts