Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.3 #112

Merged
merged 62 commits into from
Jan 23, 2024
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
2aade13
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Jan 9, 2023
fdd1993
update git tag versioning changes from #70
Jan 19, 2023
e387e30
added confidence to meta to match for API compatibility
Jan 31, 2023
f7d0b82
:rotating_light: Black
Feb 1, 2023
5a2a16b
A little manual merge? added latest updated negex meta priority for t…
Feb 1, 2023
3a072fc
Merge branch 'feature/logging-config' into dev
Feb 17, 2023
cce70e1
Merge branch 'feature/logging-config' into dev
Feb 17, 2023
3405ae9
:white_check_mark: Updated tests
Feb 17, 2023
dbc5b62
Merge branch 'feature/logging-config' into dev
Feb 17, 2023
f9b46e0
Merge branch 'hotfix-negex-config' into dev
Feb 21, 2023
6eaaf66
Merge branch 'feature/74-blacklist-filtering' into dev
Mar 3, 2023
1fbfae3
Merge remote-tracking branch 'origin/feature/filter-debug-logs' into dev
Mar 10, 2023
cfb1578
Pull bug fixes and medcat upgrade: Merge branch 'master' of https://g…
Apr 21, 2023
202dfad
Remove Debug Mode - Merge branch 'master' of https://github.com/uclh-…
Apr 26, 2023
508f1d1
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Apr 27, 2023
31749ac
Merge branch 'feature/48-allergy-postprocessing' into dev
Jul 27, 2023
9924b5d
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Jul 27, 2023
a958139
Merge branch 'feature/48-allergy-postprocessing' into dev
Jul 28, 2023
1a1e2bc
Remove converted tag
jamesbrandreth Sep 6, 2023
1747d5f
:arrow_up: Upgrade python to 3.11
jamesbrandreth Sep 7, 2023
5362af1
:sparkles: paragraph chunking wip
Sep 22, 2023
f9c0109
Added loading regex config for paragraphs and capping problem concept…
Sep 28, 2023
bc5c973
Keep n dash between numbers, update tests
Sep 29, 2023
06adfde
:white_check_mark:
Sep 29, 2023
c0b39ad
Merge branch 'feature/paragraph-chunking' into dev
Sep 29, 2023
f0acfec
:bug::loud_sound: Fixed negex bug and added logs for paragrapher
Oct 2, 2023
f4708f4
:loud_sound: Log message adjustments to make it more readable
Oct 4, 2023
a5d3f54
:building_construction: Changed the way annotators and negex pipeline…
Oct 4, 2023
c85172a
:bug: Fixed historic concepts with no conversion are returned as is
Oct 4, 2023
088c810
:white_check_mark: forgot to commit updated tests
Oct 4, 2023
7920df1
Added error handling for config loading
Oct 5, 2023
50e4aec
Merge branch 'bug-fix/negex-config-and-improve-logging' into dev
Oct 6, 2023
cd7b5b8
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Oct 6, 2023
72f31cf
:arrow_up: MedCAT==1.9.3
Oct 10, 2023
a370269
Merge branch 'hotfix/medcat-patch' into dev
Oct 10, 2023
60e02fd
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Oct 10, 2023
5c2eb5a
Algorithm tweak to default to adverse reaction in allergy paragraphs …
jenniferjiangkells Oct 30, 2023
8956c18
:construction_worker: Install pytorch cpu
Oct 30, 2023
3109cd0
Update lookup data (#94)
jenniferjiangkells Oct 30, 2023
95bbfeb
:bug: Fixed vtm deduplication bug (#96)
jenniferjiangkells Oct 30, 2023
8bf1bfb
:construction_worker: Run tests on dev PRs
Oct 30, 2023
ca7dbe0
:bug: Fixed prob list cap bug to return exactly first 10 prob concepts
Oct 30, 2023
dbb165d
:wrench: Update sample miade config
Oct 30, 2023
3bffac2
Revert long problems list filtering and add numbering to problems lis…
jenniferjiangkells Nov 2, 2023
a1b9aa8
Streamlit trainer preprocessing (#97)
jenniferjiangkells Nov 6, 2023
4f41854
Update problem blacklist
Nov 14, 2023
656b613
Merge branch 'update-blacklist' into dev
Nov 14, 2023
46e7d86
Update blacklist
Nov 14, 2023
57e2a97
Merge branch 'dev' of https://github.com/uclh-criu/miade into dev
Nov 14, 2023
69eeb57
Update blacklist
Nov 14, 2023
75c8695
:card_file_box: Update problems blacklist v2
Nov 15, 2023
4ceab93
Switch to Ruff for formatting and Linting (#104)
jamesbrandreth Nov 21, 2023
8ec874f
Merge branch 'blacklist' into dev
jamesbrandreth Nov 23, 2023
ecb9e93
:bug: Fix allergy_type and reaction filtering bug
Nov 29, 2023
6eab644
Merge branch 'master' of https://github.com/uclh-criu/miade into bugf…
Nov 30, 2023
17cf7ed
Remove debug logging
Nov 30, 2023
1d595e3
Merge branch 'bugfix/allergy-reactions-postprocess' into dev
Nov 30, 2023
a587eb3
Remove (converted) tag
Nov 30, 2023
18ac309
:truck: Move lookup data outside package (#107)
jenniferjiangkells Nov 30, 2023
e074b8f
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Dec 18, 2023
9bb6fda
Merge branch 'master' of https://github.com/uclh-criu/miade into dev
Jan 9, 2024
57728d7
Put paragraph body in header (#111)
jenniferjiangkells Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/miade/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Note(object):
def __init__(self, text: str, regex_config_path: str = "./data/regex_para_chunk.csv"):
self.text = text
self.raw_text = text
self.regex_config = load_regex_config_mappings("./data/regex_para_chunk.csv")
self.regex_config = load_regex_config_mappings(regex_config_path)
self.paragraphs: Optional[List[Paragraph]] = []

def clean_text(self) -> None:
Expand Down Expand Up @@ -74,12 +74,9 @@ def get_paragraphs(self) -> None:
if match:
heading = match.group(1)
body = match.group(2)
if body == "":
body = heading
heading = ""
else:
heading = ""
body = text
heading = text
body = ""

end = start + len(text)
paragraph = Paragraph(heading=heading, body=body, type=paragraph_type, start=start, end=end)
Expand Down
Loading