Code Monkey home page Code Monkey logo

prescription-understanding's Introduction

#prescription parser

基于正则表达式和AC自动机多模匹配进行不规则处方文本理解,识别药品名、给药总量、用法用量等目标内容。

For example:

Input: 多巴丝肼(合资) 0.25g40*40.000 Sig.0.125g bid po

Output: {"Type": "Medicine_Name", "Offset_Begin": 0, "Offset_End": 3, "Original_Text": "多巴丝肼", "Interpretation": null, "Attributes": [{"PrescriptionComponent": {"Type": "Brand_Type", "Offset_Begin": 0, "Offset_End": 3, "Original_Text": "(合资)", "Interpretation": null}}, {}, {}, {"PrescriptionNumericalComponent": {"Type": "Specification", "Offset_Begin": 9, "Offset_End": 14, "Original_Text": "0.25g", "Interpretation": "每片/粒/袋/支 0.25克", "Value_Unit": [{"value": 0.25, "unit": "克"}]}}, {"PrescriptionNumericalComponent": {"Type": "Total_Amount", "Offset_Begin": 9, "Offset_End": 24, "Original_Text": "0.25g*40×40.000", "Interpretation": "每片/粒/袋/支 0.25克,每盒40.0片/粒/袋/支,共40.0盒,共计400.0克", "Value_Unit": null}}, [{"PrescriptionComponent": {"Type": "Frequency", "Offset_Begin": 39, "Offset_End": 41, "Original_Text": "bid", "Interpretation": "每天两次"}}], {"PrescriptionComponent": {"Type": "Route", "Offset_Begin": 36, "Offset_End": 37, "Original_Text": "po", "Interpretation": "经口,口服"}}, [{"PrescriptionNumericalComponent": {"Type": "Dosage", "Offset_Begin": 29, "Offset_End": 35, "Original_Text": "0.125g", "Interpretation": "0.5片/粒/袋/支", "Value_Unit": {"value": 0.125, "unit": "克"}}}], []]}

prescription-understanding's People

Contributors

menglinlu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.