This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import json | ||
import pickle | ||
|
||
import pytest | ||
|
||
from clin_nlp_metrics import Dataset | ||
|
||
|
||
@pytest.fixture | ||
def mctrainer_data(): | ||
with open("tests/data/medcattrainer_export.json", "rb") as f: | ||
return json.load(f) | ||
|
||
|
||
@pytest.fixture | ||
def mctrainer_dataset(mctrainer_data): | ||
return Dataset.from_medcattrainer(data=mctrainer_data) | ||
|
||
|
||
@pytest.fixture | ||
def clinlp_docs(): | ||
with open("tests/data/clinlp_docs.pickle", "rb") as f: | ||
return pickle.load(f) | ||
|
||
|
||
@pytest.fixture | ||
def clinlp_dataset(clinlp_docs): | ||
ids = list(f"doc_{x}" for x in range(0, 15)) | ||
|
||
return Dataset.from_clinlp_docs(nlp_docs=clinlp_docs, ids=ids) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters