## 5 Conclusions  
Medical free-text data can hold critical information about patients and diseases that AI applications could benefit from. However, due to regulatory and ethical considerations to protect patient privacy, de-identification is required, which is challenging due to the unstructured format medical text can be stored in. Additionally, as was our case, handwritten text can include informal language, typing errors, and abbreviations and can be written by authors of diverse educational backgrounds. In this paper, an ensemble-based de-identification tool was presented that achieved high performance on such texts written in the German language, for which examples in the literature are comparatively sparse.  
Interest in medical free text is on the rise, especially considering the widespread availability of powerful LLM applications. To fully utilize their capabilities while protecting patient privacy and to be compliant with regulatory frameworks, tools like the presented _Masketeer_ algorithm are required. The presented methods and results aim to fill gaps in the literature concerning the applications of NLP in German medical texts (e.g., umlauts, salutations, hyphenated names). Furthermore, by presenting the advantages of an ensemble-based algorithm and analysis of performance, the study also intends to provide practical implementation ideas for other researchers and engineers trying to address similar issues, and the results could also serve as a potential baseline orientation to compare performances. Lastly, the ever-present dilemma of privacy versus utility was addressed by including a NER system that could further serve as inspiration for best practices in the de-identification of medical free text.  
The answer to the question of whether rule-based systems or ML-based tools will prevail as the de-identification standard in the future remains indeterminate. Successful examples for both cases are found in literature. However, research interest in LLMs is high for a reason. Their natural capabilities to process human language make them more flexible than handcrafted rules, which will always be at risk of missing edge cases. Ultimately, in many situations, deciding on one technique likely comes down to the type of application. If transparency (e.g., in certified applications) and performance (e.g., on massive datasets) are key, rule-based systems might still outperform LLMs. Improvements in the aspects of explainability and efficiency are certainly valuable directions of future LLM research. Furthermore, measures to prevent LLMs from leaking private training data into their answers should also be explored more deeply to make them more feasible for medical texts.  
Conceptualization, M.B. and K.K.; methodology, M.B. and K.K.; software, M.B. and K.K.; validation, M.B., K.K. and D.H.; formal analysis, M.B. and K.K.; investigation, M.B.; resources, G.S.; data curation, M.B., K.K. and F.W.; writing--original draft preparation, M.B.; writing--review and editing, M.B., K.K., F.W., D.H., C.P. and G.S.; visualization, M.B.; supervision, K.K., D.H. and G.S.; project administration, G.S.; funding acquisition, G.S. All authors have read and agreed to the published version of the manuscript.  
This work was supported by the D4 Health Triol project, which was funded by the state government of the Land Tirol.  
The data for this analysis are sensitive medical data from heart failure patients. Data can therefore not be made public for this publication.  
We thank our partners from the D4 Health Triol project: Medical University of Innsbruck, telbiomed Medizintechnik und IT Service GmbH, UMIT Tirol, and the Tyrolean Federal Institute for Integrated Care.  
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.