diff --git a/domains-classifier/v1/en/classify.ini b/domains-classifier/v1/en/classify.ini index 9278aac..2515f95 100644 --- a/domains-classifier/v1/en/classify.ini +++ b/domains-classifier/v1/en/classify.ini @@ -35,8 +35,8 @@ # cache = boost #------------------------ pretraitement nlptools ----------------- -[expand/URLConnect] -timeout = 100000 +#[expand/URLConnect] +#timeout = 100000 #pointe vers dev #url = http://nlptools-02.tdmservices.intra.inist.fr/v1/en/postagger/analyze?output=doc¶m=%7B%22POStagger%22%3A%20%7B%22POS_whitelist%22%3A%5B%22ADJ%22%2C%22NOUN%22%2C%20%22PROPN%22%5D%7D%7D #pointe vers prod diff --git a/geo-tagger/README.md b/geo-tagger/README.md index b8ac581..fcac567 100755 --- a/geo-tagger/README.md +++ b/geo-tagger/README.md @@ -1,20 +1,20 @@ # geo-tagger -Cette instance propose un outil de détéction d'entité géographique dans des textes anglais. +Cette instance propose un outil de détéction d'entités géographiques dans des textes anglais. ## utilisation -- [v1/geoTagger](#v1%2fgeoTagger) +- [v1/geoTagger/geoTagger](#v1%2fgeoTagger) -Ce service permet de détecter des entité géographique dans des textes anglais. -Prend en entrée du JSON avec deux champs: `id` et `value`, et renvoie un JSON +Ce service permet de détecter des entités géographiques dans des textes anglais. +Ce web service prend en entrée du JSON avec deux champs: `id` et `value`, et renvoie un JSON avec les entités géographiques détéctées dans le champ `value`. ## Exemple ```bash -$ cat < 2: - for borg in uniqueOrg: - if entity.text.lower().startswith(borg): - basicOrg.append(borg) - if entity.text not in orgL: - orgL.append(entity.text) - if len(org)>1: - for k in ["à","de","l'","d'","'","du","la"]: - if org[-2] == k: - if org[-1] not in locL: - locL.append(org[-1]) - break + for sentence in sentences: + for entity in sentence.get_spans('ner'): + if (entity.labels[0].value == "LOC"): + if entity.text not in locL: + locL.append(entity.text) + if entity.labels[0].value == "ORG": + org = entity.text.split(" ") + if len(org[-1]) > 2: + for borg in uniqueOrg: + if entity.text.lower().startswith(borg): + basicOrg.append(borg) + if entity.text not in orgL: + orgL.append(entity.text) + if len(org)>1: + for k in ["à","de","l'","d'","'","du","la"]: + if org[-2] == k: + if org[-1] not in locL: + locL.append(org[-1]) + break returnDic = {"loc":locL,"org":orgL,"basicOrg":basicOrg,"operation":operation} data['value'] = returnDic diff --git a/nlp-tools/test_EZ/run_test_NLPtools_EZ.py b/nlp-tools/test_EZ/run_test_NLPtools_EZ.py index ae750ba..c501b9e 100755 --- a/nlp-tools/test_EZ/run_test_NLPtools_EZ.py +++ b/nlp-tools/test_EZ/run_test_NLPtools_EZ.py @@ -29,7 +29,7 @@ uri_dev="http://nlptools-02.tdmservices.intra.inist.fr" uri_prod_sp="http://vptdmservices.intra.inist.fr:35268" #changer la valeur de uri pour pointer vers la dev ou la prod -uri=uri_dev +uri=uri_prod # parameter headers = {'content-type': 'application/octet-stream'} diff --git a/www-home/index.html b/www-home/index.html index 41dcd03..c83b981 100644 --- a/www-home/index.html +++ b/www-home/index.html @@ -31,6 +31,7 @@ { url: "https://authors-tools-1.services.inist.fr/", name: "Outils de traitements basés sur les auteurs"}, { url: "https://terms-extraction.services.inist.fr", name: "Extraction de termes" }, { url: "https://hal-classifier.services.inist.fr", name: "Classification HAL" }, + { url: "https://ner-tagger-1.services.inist.fr", name: "Détection d'entités nommées" }, ], queryConfigEnabled: true, dom_id: '#swagger-ui',