Skip to main content

Combining Regular Expressions and Supervised Algorithms for Clinical Text Classification

  • Conference paper
  • First Online:
Intelligent Data Engineering and Automated Learning – IDEAL 2023 (IDEAL 2023)

Abstract

Clinical text classification allows assigning labels to content-based data using machine learning algorithms. However, unlike other study domains, clinical texts present complex linguistic diversity, including abbreviations, typos, and numerical patterns that are difficult to represent by the most-used classification algorithms. In this sense, sequences of character strings and symbols, known as Regular Expressions (RegExs), offer an alternative to represent complex patterns from the texts and could be used jointly with the most commonly used classification algorithms for accurate text classification. Thus, a classification algorithm can label test texts when RegExs produce no matches. This work proposes a method that combines automatically-generated RegExs and supervised algorithms for classifying clinical texts. RegExs are automatically generated using alignment algorithms in a supervised manner, filtering out those that do not meet a minimum confidence threshold and do not contain specific keywords for the classification problem. At prediction time, our method assigns the class of the most confident RegEx that matches a test text. When no RegExs matches a test text, a supervised algorithm assigns a class. Three clinical datasets with textual information on obesity and smoking habits were used to assess the performance of four classifiers based on Random Forest (RF), Support Vector Machine (SVM), Naive Bayes (NB), and Bidirectional Encoder Representations from Transformers (BERT). Classification results indicate that our method, on average, improved the classifiers’ performance by up to 12% in all performance metrics. These results show the ability of our method to generate confident RegExs that capture representative patterns from the texts for use with supervised algorithms.

Supported by ANID FONDECYT Postdoctorado 3220803 and ANID FONDEQUIP Mediano EQM170041.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Abeyrathna, K.D., Granmo, O.C., Goodwin, M.: Extending the Tsetlin machine with integer-weighted clauses for increased interpretability. IEEE Access 9, 8233–8248 (2021)

    Article  Google Scholar 

  2. Arockiya Jerson, J., Preethi, N.: An analysis of Levenshtein distance using dynamic programming method. In: Gunjan, V.K., Zurada, J.M. (eds.) Proceedings of 3rd International Conference on Recent Trends in Machine Learning, IoT, Smart Cities and Applications. LNCS, vol. 540, pp. 525–532. Springer, Singapore (2023). https://doi.org/10.1007/978-981-19-6088-8_46

  3. Balagopalan, A., Eyre, B., Robin, J., Rudzicz, F., Novikova, J.: Comparing pre-trained and feature-based models for prediction of Alzheimer’s disease based on speech. Front. Aging Neurosci. 13, 635945 (2021)

    Article  Google Scholar 

  4. Bui, D.D.A., Zeng-Treitler, Q.: Learning regular expressions for clinical text classification. J. Am. Med. Inform. Assoc. 21(5), 850–857 (2014)

    Article  Google Scholar 

  5. Chen, S., Webb, G.I., Liu, L., Ma, X.: A novel selective Naïve Bayes algorithm. Knowl.-Based Syst. 192, 105361 (2020)

    Article  Google Scholar 

  6. Chicco, D., Jurman, G.: The advantages of the Matthews correlation coefficient (MCC) over f1 score and accuracy in binary classification evaluation. BMC Genomics 21, 1–13 (2020)

    Article  Google Scholar 

  7. Devlin, J., Chang, M., Lee, K., Toutanova, K.: BERT: pre-training of deep bidirectional transformers for language understanding. In: Burstein, J., Doran, C., Solorio, T. (eds.) Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, 2–7, June 2019, vol. 1 (Long and Short Papers), pp. 4171–4186. Association for Computational Linguistics (2019). https://doi.org/10.18653/v1/n19-1423

  8. Flores, C.A., Figueroa, R.L., Pezoa, J.E.: FREGEX: a feature extraction method for biomedical text classification using regular expressions. In: 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pp. 6085–6088. IEEE (2019)

    Google Scholar 

  9. Flores, C.A., Figueroa, R.L., Pezoa, J.E., Zeng-Treitler, Q.: CREGEX: a biomedical text classifier based on automatically generated regular expressions. IEEE Access 8, 29270–29280 (2020). https://doi.org/10.1109/ACCESS.2020.2972205

    Article  Google Scholar 

  10. Gal, Y., Ghahramani, Z.: Dropout as a Bayesian approximation: representing model uncertainty in deep learning. In: Balcan, M., Weinberger, K.Q. (eds.) Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, 19–24, June 2016. JMLR Workshop and Conference Proceedings, vol. 48, pp. 1050–1059. JMLR.org (2016). http://proceedings.mlr.press/v48/gal16.html

  11. Kashina, M., Lenivtceva, I., Kopanitsa, G.: Preprocessing of unstructured medical data: the impact of each preprocessing stage on classification. Procedia Comput. Sci. 178, 284–290 (2020)

    Article  Google Scholar 

  12. Kowsari, K., Jafari Meimandi, K., Heidarysafa, M., Mendu, S., Barnes, L., Brown, D.: Text classification algorithms: a survey. Information 10(4), 150 (2019)

    Article  Google Scholar 

  13. Li, X., Cui, M., Li, J., Bai, R., Lu, Z., Aickelin, U.: A hybrid medical text classification framework: integrating attentive rule construction and neural network. Neurocomputing 443, 345–355 (2021)

    Article  Google Scholar 

  14. Luo, X., et al.: Applying interpretable deep learning models to identify chronic cough patients using EHR data. Comput. Meth. Programs Biomed. 210, 106395 (2021)

    Article  Google Scholar 

  15. Rios, A., Kavuluru, R.: Convolutional neural networks for biomedical text classification: application in indexing biomedical articles. In: Proceedings of the 6th ACM Conference on Bioinformatics, Computational Biology and Health Informatics, pp. 258–267 (2015)

    Google Scholar 

  16. Saha, R., Granmo, O.C., Goodwin, M.: Using Tsetlin machine to discover interpretable rules in natural language processing applications. Expert. Syst. 40(4), e12873 (2023)

    Article  Google Scholar 

  17. Sharaff, A., Pathak, V., Paul, S.S.: Deep learning-based smishing message identification using regular expression feature generation. Expert Syst. 40, e13153 (2022)

    Google Scholar 

  18. Subramanian, S., Thomas, T.: Regular expression based pattern extraction from a cell-specific gene expression data. Inform. Med. Unlocked 17, 100269 (2019)

    Article  Google Scholar 

  19. Vora, S., Yang, H.: A comprehensive study of eleven feature selection algorithms and their impact on text classification. In: 2017 Computing Conference, pp. 440–449. IEEE (2017)

    Google Scholar 

  20. Vranken, H., Alizadeh, H.: Detection of DGA-generated domain names with TF-IDF. Electronics 11(3), 414 (2022)

    Article  Google Scholar 

  21. Wennberg, S., Karlsen, L.A., Stalfors, J., Bratt, M., Bugten, V.: Providing quality data in health care-almost perfect inter-rater agreement in the Norwegian tonsil surgery register. BMC Med. Res. Methodol. 19(1), 1–9 (2019)

    Article  Google Scholar 

  22. Yao, L., Mao, C., Luo, Y.: Clinical text classification with rule-based features and knowledge-guided convolutional neural networks. BMC Med. Inform. Decis. Mak. 19(3), 31–39 (2019)

    Google Scholar 

Download references

Acknowledgements

This work was partially supported by ANID FONDECYT Postdoctorado 3220803 and ANID FONDEQUIP Mediano EQM170041. The authors thank the Informatics Unit with the HGGB, Concepción, Chile, for providing datasets.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christopher A. Flores .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Flores, C.A., Verschae, R. (2023). Combining Regular Expressions and Supervised Algorithms for Clinical Text Classification. In: Quaresma, P., Camacho, D., Yin, H., Gonçalves, T., Julian, V., Tallón-Ballesteros, A.J. (eds) Intelligent Data Engineering and Automated Learning – IDEAL 2023. IDEAL 2023. Lecture Notes in Computer Science, vol 14404. Springer, Cham. https://doi.org/10.1007/978-3-031-48232-8_35

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-48232-8_35

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-48231-1

  • Online ISBN: 978-3-031-48232-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics