Skip to content

Commit

Permalink
BUG: Add notice for downloading example documents
Browse files Browse the repository at this point in the history
Close #39
  • Loading branch information
ghisvail committed Apr 29, 2024
1 parent 8af3307 commit 2024a92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions docs/tutorial/context_detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ kernelspec:
# Context Detection

In this tutorial, we will use rule-based operations to attach additional contextual information to entities,
such has:
such as:
- the section in which the entity is located;
- is the entity negated;
- whether it appears as part of an hypothesis;
- whether it is related to the patient or part of their family's medical history.

Let's start by loading a document:
Let's start by loading a medical report to work on:

```{code-cell} ipython3
from pathlib import Path
from medkit.core.text import TextDocument
doc = TextDocument.from_file(Path("../data/mtsamplesfr/1.txt"))
# In case this notebook is executed outside medkit, download the example data with:
# !wget https://raw.githubusercontent.com/medkit-lib/medkit/main/docs/data/mtsamplesfr/1.txt
# and adjust the path below.
doc_file = Path("../data/mtsamplesfr/1.txt")
doc = TextDocument.from_file(doc_file)
print(doc.text)
```

Expand Down
6 changes: 5 additions & 1 deletion docs/tutorial/entity_matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ Let's start by loading a medical report to work on:
from pathlib import Path
from medkit.core.text import TextDocument
doc = TextDocument.from_file(Path("../data/mtsamplesfr/1.txt"))
# In case this notebook is executed outside medkit, download the example data with:
# !wget https://raw.githubusercontent.com/medkit-lib/medkit/main/docs/data/mtsamplesfr/1.txt
# and adjust the path below.
doc_file = Path("../data/mtsamplesfr/1.txt")
doc = TextDocument.from_file(doc_file)
print(doc.text)
```

Expand Down

0 comments on commit 2024a92

Please sign in to comment.