diff --git a/NLP_tools-EZmaster/README.md b/NLP_tools-EZmaster/README.md index bfc79df..4cb6914 100644 --- a/NLP_tools-EZmaster/README.md +++ b/NLP_tools-EZmaster/README.md @@ -6,27 +6,20 @@ Liste des traitements NLP disponibles : -* Stemming (stemmer), français et anglais -* Etiquettage en partie du discours (POStagger), français et anglais -* Reconnaissance de termes contrôlés (termMatcher) -* Reconnaissance d'entités nommées (ner) -* Chunking nominal (NPchunker) -* Chunking nominal issu d'une analyse en dépendance (NPchunkerDP) + +| Composant |français | anglais | name | +|---|---|---|---| +|Stemming| X | X | stemmer | +|Etiquettage en partie du discours | X | X | POStagger | +|Reconnaissance de termes contrôlés | | X | termMatcher | +|Reconnaissance d'entités nommées | | X |ner | +|Chunking nominal | | X |NPchunker | +|Chunking nominal issu d'une analyse en dépendance | | X | NPchunkerDP | -Deux types d'OUTPUT sont disponibles pour chaque traitement. +Deux types de sortie (output) sont disponibles pour chaque traitement. Le résultat est présenté soit : - -intégré au texte d'origine (option -o doc) -sous la forme d'une liste (option -o list) - - -#### Test d'intégation EZmaster like -``` -cd public -sed -e '1d; $d' ../data/data_en.json | sed 's/\,$/ /g' | python3 analyze.py stemmer -o doc -lang en -log - analayze.log -``` -#### Test solliciation Web Service EZmaster +* présenté sous la forme du texte d'origine (doc) +* sous la forme d'un structure json (json) #### Interrogation du WebService @@ -36,22 +29,26 @@ ``` https://nlp-tools-1.services.inist.fr/v1/{langue}/{engine}/analyze?output={val} ``` -* paramètres : -**{langue}** = la langue à analyser           [en , fr] -**{engine}** = nom pipeline de traitement à appliquer : + +> **{langue}** = la langue à analyser           [en , fr] +>**{engine}** = nom pipeline de traitement à appliquer : *anglais* :           [stemmer ,ner , postagger, npchunker, npchunkerdp, termmatcher] - *francais* :          [stemmer , postagger] - **{output}** = format du résulat           [doc , json] -                 doc = le resultat est reinseré dans le document -                 json = le produit de l'analyse au frmat json + *francais* :          [stemmer , postagger] +* paramètres : + + **{output}** = format du résultat           [doc , json] +                 doc = le + resultat est reinséré dans le document +                 json = le + resultat de l'analyse au format json -* Code de retour +* Code retour : 200 si OK 404 si service non contacté -Exemple d'appel du POStagger, sortie liste : +Exemple d'appel du POStagger, sortie doc : ``` -cat data/data.json | curl --proxy "" -X POST --data-binary @- "https://nlp-tools-1.services.inist.fr/v1/en/postagger/analyze?indent=true&output=doc" +cat data/data_en.json | curl --proxy "" -X POST --data-binary @- "https://nlp-tools-1.services.inist.fr/v1/en/postagger/analyze?indent=true&output=doc" ``` Exemple d'appel du termmatcher, sortie doc : ``` @@ -65,7 +62,30 @@ "idt":"06-0488289","value":"Weyl gravity and Cartan geometry. We point out that the Cartan geometry known as the second-order conformalstructure provides a natural differential geometric framework underlying gaugetheories of conformal gravity. We are concerned by two theories: the first onewill be the associated Yang-Mills-like Lagrangian, while the second, inspiredby J.T. Wheeler in Phys. Rev. D90 (2014), will be a slightly more general one which will relax theconformal Cartan geometry. The corresponding gauge symmetry is treated withinthe BRST language. We show that the Weyl gauge potential is a spurious degreeof freedom, analogous to a Stueckelberg field, that can be eliminated throughthe dressing field method. We derive sets of field equations for both thestudied Lagrangians. For the second one, they constrain the gauge field to bethe normal conformal Cartan connection. Finally, we provide in a Lagrangianframework a justification of the identification, in dimension $4$, of the Bachtensor with the Yang-Mills current of the normal conformal Cartan connection,as proved in Class" }] EOF +``` +#### Test d'intégation EZmaster like +``` +cd public +sed -e '1d; $d' ../data/data_en.json | sed 's/\,$/ /g' | python3 analyze.py stemmer -o doc -lang en +``` +**Usage** : +``` +analyze.py [-h] [-ini INIT_FILE] [-log LOG] [-lang {fr,en}] [-param PARAM] [-o doc] + {stemmer,termMatcher,ner,NPchunker,POStagger,gazetteer,NPchunkerDP,lefff_tagger} +positional arguments: + {stemmer,termMatcher,ner,NPchunker,POStagger,gazetteer,NPchunkerDP,lefff_tagger} + Name oh the NLPpipe -``` +optional arguments: + -h, --help show this help message and exit + -ini INIT_FILE, --init-file INIT_FILE + initialisation file [default config.ini] + -log LOG, --log LOG log file + -lang {fr,en}, --language {fr,en} + language + -param PARAM, --param PARAM + initialisation param in json + -o doc, --output doc Format result +``` diff --git a/NLP_tools-EZmaster/public/conf_EZ.ini b/NLP_tools-EZmaster/public/conf_EZ.ini deleted file mode 100644 index d723f6f..0000000 --- a/NLP_tools-EZmaster/public/conf_EZ.ini +++ /dev/null @@ -1,42 +0,0 @@ -;param for stemmer -[stemmer] -stemmer_algo=snowball - -;param for ner -[ner] -ENT_blacklist=("CARDINAL","ORDINAL") -;ENT_blacklist=("DATE","CARDINAL","ORDINAL", "QUANTITY", "MONEY","PERCENT","TIME") - -;param for POS tagger -[POStagger] -POS_whitelist=('ADJ','NOUN', 'PROPN') -POS_blacklist=('ADP','ADV','AUX','CONJ','CCONJ','DET','INTJ','PART','PRON','X','NUM','SYM','PUNCT') - -;param for termMatcher -[termMatcher] -;value=string, etiquette servant a marquer les termes reperes -termMatcher_tag=MX -;value in [stem,lemme], pretraitement appliquer au texte, stemming(stem) ou POStagger(lemme) -termMatcher_lemma=lemme -;value in [liste des noms symboliques de voc], nom symbolique de de la ressource termino -;specifie l'algo de stemming, uniquement si termMatcher_lemma=stem -termMatcher_stemmer=snowball -termMatcher_vocabulary=MX_jsonl_lemme -#termMatcher_POS_whitelist=('ADJ','NOUN','PROPN','ADP','ADV','AUX','CONJ','CCONJ','DET','INTJ','PART','PRON','X','NUM','SYM','PUNCT') -termMatcher_POS_whitelist=() - -;param for gazetteer -[gazetteer] -;nom symbolique de de la ressource termino -gazetteer_vocabulary=MX_tsv -; value=string, etiquette servant a marquer les termes reperes -gazetteer_tag=MX - -;param for NPchunker -[NPchunker] -NPchunker_rules = NPchunker_rules_gen - -; cat non prise en compte par le NPchunkerDP -[NPchunkerDP] -blacklist_NPDP=('DET', 'PRON', 'VERB') -