Comments (2)
negbio cannot handle this case right now because it should be "spinal canal hematoma" not just "spinal" to be recognized as C0856150. It is an error produced by MetaMap. An alternative way is creating a dictionary that contains "spinal canal hematoma" and then using the chexpert labeler to recognize it.
Please see https://negbio.readthedocs.io/en/latest/user_guide.html#named-entity-recognition
from negbio.
Hi @yfpeng
I checked the output of MetaMap and found that the issue is in NegBio.
There are four different ways of Positional Information as mentioned in Metamap documentation.
https://github.com/ncbi-nlp/NegBio/blob/master/negbio/pipeline/dner_mm.py#L58
m = re.match(r'(\d+)/(\d+)', concept.pos_info)
Here we are only handling the 1st type i.e. the simplest form where the concept's text is a contiguous block of characters.
Here's the output of pyMetaMap for the example case in this issue:
ConceptMMI(index='1', mm='MMI', score='16.15', preferred_name='Spinal Canal', cui='C0037922', semtypes='[bsoj]', trigger='["Spinal Canal"-tx-1-"spinal canal"-noun-0]', location='TX', pos_info='13/12', tree_codes='A02.835.232.834.803')
ConceptMMI(index='1', mm='MMI', score='16.09', preferred_name='Pulp Canals', cui='C0086881', semtypes='[bsoj]', trigger='["Canal"-tx-1-"canal"-noun-0]', location='TX', pos_info='20/5', tree_codes='A14.549.167.900.265')
ConceptMMI(index='1', mm='MMI', score='13.09', preferred_name='Hematoma', cui='C0018944', semtypes='[patf]', trigger='["HEMATOMA"-tx-1-"hematoma"-noun-1]', location='TX', pos_info='26/8', tree_codes='C23.550.414.838')
ConceptMMI(index='1', mm='MMI', score='3.78', preferred_name='spinal hematoma', cui='C0856150', semtypes='[inpo]', trigger='["spinal hematoma"-tx-1-"spinal hematoma"-noun-1]', location='TX', pos_info='13/6,26/8', tree_codes='')
ConceptMMI(index='1', mm='MMI', score='3.63', preferred_name='Hematoma Adverse Event', cui='C1962958', semtypes='[fndg]', trigger='["Hematoma"-tx-1-"hematoma"-noun-1]', location='TX', pos_info='26/8', tree_codes='')
ConceptMMI(index='1', mm='MMI', score='3.48', preferred_name='Body Parts - Canal', cui='C1550227', semtypes='[bpoc]', trigger='["Canal"-tx-1-"canal"-noun-0]', location='TX', pos_info='20/5', tree_codes='')
ConceptMMI(index='1', mm='MMI', score='3.48', preferred_name='Geographic canal', cui='C0442636', semtypes='[geoa]', trigger='["Canal"-tx-1-"canal"-noun-0]', location='TX', pos_info='20/5', tree_codes='')
The spinal hematoma concept [Positional Information: (13/6,26/8)] is of type (b) of positional information i.e. disjoint text strings.
Currently in the NegBio code, re.match() is only returning the 1st match.
from negbio.
Related Issues (20)
- Make GitHub releases that match with PyPi HOT 1
- jpype fails when using negbio in flask HOT 3
- [Feature Request] Word Sense Disambiguation option for MetaMap HOT 1
- Removing duplicates from locs (location range of CUI annotations) HOT 2
- A BioCAnnotation no longer has the attribute get_total_location() in the latest bioc version(1.3) HOT 3
- Version for Portuguese-BR HOT 1
- TypeError: convert_trees() got an unexpected keyword argument 'add_lemmas' HOT 1
- Problem loading bllipparser. HOT 28
- setup.py not able to install packages from requirements.txt
- How to write patterns based on other medical data HOT 6
- Warning in environment3.7.yml about pip-installed dependencies without pip as a dependency
- AttributeError: Java package 'edu' is not valid HOT 1
- phrases for the chexpert HOT 1
- Install Error HOT 2
- AttributeError: 'BioCAnnotation' object has no attribute 'get_total_location' HOT 2
- strange error occur, when I run python negbio/main_chexpert.py text --output=examples/test.neg.xml examples/00019248.txt examples/00000086.txt HOT 1
- When loading NegBioParser() the session crashes HOT 1
- "pip install negbio" doesn't work HOT 3
- Error downloading model (400 Bad Request)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from negbio.