Medical Korean: applying medical term and abbreviation dictionaries
Medical text (medical records, nursing records, consultation notes) is packed with medical terms and abbreviations. A general morphological analyzer treats such terms as out-of-vocabulary words (OOV) or splits them wrongly, which throws off symptom and drug statistics and searches. Bareun recognizes medical terms accurately when you register them in a custom dictionary.
The problem
- Medical terms such as
고혈압성심장질환(hypertensive heart disease) and급성심근경색(acute myocardial infarction) get chopped up. - English abbreviations such as
EKGandCTare caught only as generic foreign-language tokens, so their meaning is lost. - When terms are unstable, patient record searches and cohort extraction become inaccurate.
How to apply Bareun
Register medical terms in the compound noun dictionary (cp_set) or the proper noun dictionary (np_set) to keep them as single words.
If you also register English abbreviations in the dictionary, you can treat them as units of meaning. For the procedure of collecting and registering domain terms, see
Domain dictionary workflow, and for why out-of-vocabulary words occur, see
Handling out-of-vocabulary words (OOV).
graph TD REC[Medical and nursing records] --> DICT[Custom dictionary of medical terms and abbreviations]; DICT --> TAG[Bareun morphological analysis]; TAG --> TERM[Accurate recognition of medical terms]; TERM --> STAT[Symptom and drug statistics, search];
from bareunpy import Tagger
tagger = Tagger("koba-XXXX-...", "localhost")
# Register medical terms and abbreviations
cust = tagger.custom_dict("medical_terms")
cust.copy_cp_set({"고혈압성심장질환", "급성심근경색"})
cust.copy_np_set({"EKG", "CT"})
cust.update()
tagger.set_domain("medical_terms")
res = tagger.tags(["급성심근경색 의심되어 EKG 시행함."])
print(res.nouns())
['급성심근경색', 'EKG']
Both the long medical term and the English abbreviation are each recognized as a single word.
Results and benefits
| Item | Without a dictionary | With a medical term dictionary |
|---|---|---|
| Long medical terms | Split into several nouns | Kept as one word |
| English abbreviations | Meaningless foreign-language tokens | Recognized as registered terms |
| Statistics and search | Inaccurate | Consistent |
Privacy caution
Medical text contains sensitive information. If you need an air-gapped network, process it with on-premises (self-hosted) Bareun rather than the cloud. Morphological analysis can be run as a self-hosted installation.
Frequently asked questions
Q. What if an abbreviation overlaps with an ordinary word?
For abbreviations that are interpreted differently depending on context, run separate domain dictionaries, or
check for conflicts with CheckConflict and specify the higher-priority dictionary first.
For running multiple dictionaries, see Using multiple dictionaries together.
Q. I have thousands of terms. Can I register them all at once?
You can register custom dictionary entries in bulk, by set. Build a set of terms,
pass it to copy_cp_set and copy_np_set, and apply it with update().
Q. Sensitive information means I cannot use the cloud.
Morphological analysis can run in an air-gapped network as a self-hosted installation (Linux .deb, Windows .exe, macOS .pkg, or Docker). Process patient data internally without sending it outside.
Q. Can I register medical terms in bulk?
Yes. You can register custom dictionary entries in bulk, by set. Build a set of terms, with long medical terms in the compound noun dictionary (cp_set)
and English abbreviations in the proper noun dictionary (np_set), pass them to copy_cp_set and copy_np_set, and apply with
update(). Even thousands of terms are registered at once and recognized as single words.
Related documents
- Domain dictionary workflow: registering medical terms in a dictionary
- Using multiple dictionaries together: running separate dictionaries per department
- Handling out-of-vocabulary words (OOV): why abbreviations and technical terms get missed