Instructions to use Tomohiro/RealMedNLP_CR_JA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tomohiro/RealMedNLP_CR_JA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Tomohiro/RealMedNLP_CR_JA")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Tomohiro/RealMedNLP_CR_JA") model = AutoModelForTokenClassification.from_pretrained("Tomohiro/RealMedNLP_CR_JA") - Notebooks
- Google Colab
- Kaggle
This is a model for named entity recognition of Japanese medical documents.
How to use
Download the following five files and put into the same folder.
- id_to_tags.pkl
- key_attr.pkl
- text.txt
- NER_medNLP.py
- predict.py
You can use this model by running predict.py.
python3 predict.py
Input Example
肥大型心筋症、心房細動に対してWF投与が開始となった。
治療経過中に非持続性心室頻拍が認められたためアミオダロンが併用となった。
Output Example
<d certainty="positive">肥大型心筋症、心房細動</d>に対して<m-key state="executed">WF</m-key>投与が開始となった。
<timex3 type="med">治療経過中</timex3>に<d certainty="positive">非持続性心室頻拍</d>が認められたため<m-key state="executed">アミオダロン</m-key>が併用となった。
- Downloads last month
- 12