Skip to content

Commit

Permalink
Merge pull request #337 from CogStack/master
Browse files Browse the repository at this point in the history
v1.8.0 Release PR
  • Loading branch information
tomolopolis authored Aug 2, 2023
2 parents 3396c4d + 1e500c5 commit be23503
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Medical <img src="https://github.com/CogStack/MedCAT/blob/master/media/cat-logo.png" width=45> oncept Annotation Tool
# Medical <img src="https://raw.githubusercontent.com/CogStack/MedCAT/master/media/cat-logo.png" width=45> oncept Annotation Tool

[![Build Status](https://github.com/CogStack/MedCAT/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/CogStack/MedCAT/actions/workflows/main.yml?query=branch%3Amaster)
[![Documentation Status](https://readthedocs.org/projects/medcat/badge/?version=latest)](https://medcat.readthedocs.io/en/latest/?badge=latest)
Expand Down Expand Up @@ -50,7 +50,6 @@ Since MedCAT is primarily a library, logging has been effectively disabled by de
The idea is that the user can directly modify the logging behaviour of either the entire library or a certain set of modules within as they wish. We have provided a convenience method to add default handlers that log into the console as well as _medcat.log_ (`medcat.add_default_log_handlers`).

Some details as to how one can configure the logging are described in the [MedCAT Tutorials](https://github.com/CogStack/MedCATtutorials).
PS: Currently (temporarily!) the tutorial is in the `tutorials` folder.

## Acknowledgements
Entity extraction was trained on [MedMentions](https://github.com/chanzuckerberg/MedMentions) In total it has ~ 35K entites from UMLS
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sphinx-rtd-theme~=1.0
myst-parser~=0.17
sphinx-autoapi~=1.8
setuptools>=60.0
aiohttp==3.8.3
aiohttp==3.8.5
13 changes: 10 additions & 3 deletions medcat/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,14 @@ def _print_stats(self,
anns_norm.append((ann['start'], cui))
anns_examples.append({"text": doc['text'][max(0, ann['start']-60):ann['end']+60],
"cui": cui,
"start": ann['start'],
"end": ann['end'],
"source value": ann['value'],
"acc": 1,
"project name": project.get('name'),
"document name": doc.get('name')})
"document name": doc.get('name'),
"project id": project.get('id'),
"document id": doc.get('id')})
elif ann.get('validated', True) and (ann.get('killed', False) or ann.get('deleted', False)):
anns_norm_neg.append((ann['start'], cui))

Expand All @@ -556,11 +560,14 @@ def _print_stats(self,
p_anns_norm.append((ann.start_char, cui))
p_anns_examples.append({"text": doc['text'][max(0, ann.start_char-60):ann.end_char+60],
"cui": cui,
"start": ann.start_char,
"end": ann.end_char,
"source value": ann.text,
"acc": float(ann._.context_similarity),
"project name": project.get('name'),
"document name": doc.get('name')})

"document name": doc.get('name'),
"project id": project.get('id'),
"document id": doc.get('id')})
for iann, ann in enumerate(p_anns_norm):
cui = ann[1]
if ann in anns_norm:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'pydantic>=1.10.0,<2.0', # for spacy compatibility; avoid 2.0 due to breaking changes
# the following are not direct dependencies of MedCAT but needed for docs/building
# hopefully will no longer need the transitive dependencies
'aiohttp==3.8.3', # 3.8.3 is needed for compatibility with fsspec <- datasets <- medcat
'aiohttp==3.8.5', # 3.8.3 is needed for compatibility with fsspec <- datasets <- medcat
'blis<0.8.0,>=0.7.8', # as required by thinc <- spacy <- medcat
# 'smart-open==5.2.1', # 5.2.1 is needed for compatibility with pathy
# 'joblib~=1.2',
Expand Down

0 comments on commit be23503

Please sign in to comment.