The Medical Decomponder splits Swedish medical terms in its 
compounds. It is written in Java by Amanda Sjöberg and Petter Andersson for their Master thesis with the title "Generating and evaluating an automatic mapping between SNOMED-CT and the Swedish extension codes of ICD-10 based on lexical similarities" in May 2016.

From the thesis
The aim of the medical compound splitter is to
split different compound variations of medical terms. The compound splitter has two conditions regarding the splitting. First, the medical term in the wordlist has to be an identical portion of the word to be considered as a potential split-point. Second, the compounder splits where the longest (characters) identified medical term could be found. For example, if the medical terms “cox”, “coxa”, and “coxsackie” is included in the dictionary it would split the word “coxsackievirus” into “coxsackie” and “virus”. The medical term “cox” can be identified at the beginning of “coxsackievirus”, but is not selected as split-point, since coxsackie contains more characters. The word “coxa” cannot be found as an identical portion, and is therefore not a potential split-point.

This piece of code is an extract from the big program from the master thesis and it is not made particularly userfriendly, but it works and can be used for other researchers.

The content of medicalWords.txt is from two medical wordlists. One obtained from Belfrage Förlag (2016), http://medicinskordbok.se and one called the Semantic Mining Multilingual Medical Dictionary that was used in a study at the Linköping University.

To run the Medical Decomponder
Use either Netbeans or Eclipse or just the command prompt.

The input file names are hard coded into the code.
The format of the input and output files are in text.

From command prompt

Compile:
User@MedicalDecompounder$ javac masterthesis/*java

Execute
User@MedicalDecompounder$ java masterthesis/MasterThesis

The program contains three parts: MasterThesis, Preprocessing och
MedDecompounder. The file MasterThesis is the main class.
Choice 1. starts the preprocessing.
It removes period, hyphen, changes capital letters to lowercase letters.
Choice 2. starts the decompounder MedDecompounder. The compound splitter adds a vertical bar between the compounded words.
coxsackievirus -->  coxsackie | virus
The preprocessing program choice 1. removes the vertical bars.


