dmis-lab / bern

A neural named entity recognition and multi-type normalization tool for biomedical text mining
https://bern.korea.ac.kr
BSD 2-Clause "Simplified" License
173 stars 44 forks source link

POST request to local server #1

Closed shiva1387 closed 5 years ago

shiva1387 commented 5 years ago

Hi, this is an amazing tool. The normalisation function is critical and very useful for bio ner. I setup BERN in a local server, however while i am able to submit get requests using PMID, the POST request using raw text is successful, but does not return any annotated entities. Could you help provide examples on submitting POST request?

This is the code i used

body_data = {'param': {"text":'CLAPO syndrome: identification of somatic activating PIK3CA mutations and delineation of the natural history and phenotype. PURPOSE: CLAPO syndrome is a rare vascular disorder characterized by capillary malformation of the lower lip, lymphatic malformation predominant on the face and neck, asymmetry, and partial/generalized overgrowth. Here we tested the hypothesis that, although the genetic cause is not known, the tissue distribution of the clinical manifestations in CLAPO seems to follow a pattern of somatic mosaicism. METHODS: We clinically evaluated a cohort of 13 patients with CLAPO and screened 20 DNA blood/tissue samples from 9 patients using high-throughput, deep sequencing. RESULTS: We identified five activating mutations in the PIK3CA gene in affected tissues from 6 of the 9 patients studied; one of the variants (NM_006218.2:c.248T>C; p.Phe83Ser) has not been previously described in developmental disorders. CONCLUSION: We describe for the first time the presence of somatic activating PIK3CA mutations in patients with CLAPO. We also report an update of the phenotype and natural history of the syndrome.'}}

response = requests.post( 'http://0.0.0.0:8888', data = body_data)

donghyeonk commented 5 years ago

Try to run the following code.

import requests import json body_data = {"param": json.dumps({"text": "CLAPO syndrome: identification of somatic activating PIK3CA mutations and delineation of the natural history and phenotype. PURPOSE: CLAPO syndrome is a rare vascular disorder characterized by capillary malformation of the lower lip, lymphatic malformation predominant on the face and neck, asymmetry, and partial/generalized overgrowth. Here we tested the hypothesis that, although the genetic cause is not known, the tissue distribution of the clinical manifestations in CLAPO seems to follow a pattern of somatic mosaicism. METHODS: We clinically evaluated a cohort of 13 patients with CLAPO and screened 20 DNA blood/tissue samples from 9 patients using high-throughput, deep sequencing. RESULTS: We identified five activating mutations in the PIK3CA gene in affected tissues from 6 of the 9 patients studied; one of the variants (NM_006218.2:c.248T>C; p.Phe83Ser) has not been previously described in developmental disorders. CONCLUSION: We describe for the first time the presence of somatic activating PIK3CA mutations in patients with CLAPO. We also report an update of the phenotype and natural history of the syndrome."})} response = requests.post('http://:8888', data=body_data) print(response.json())

shiva1387 commented 5 years ago

Thank you for your fast reply! This works