Using natural language processing to automatically classify written self-reported narratives by patients with migraine or cluster headache

Nicolas Vandenbussche, Cynthia Van Hee, Véronique Hoste, Koen Paemeleire, Nicolas Vandenbussche, Cynthia Van Hee, Véronique Hoste, Koen Paemeleire

Abstract

Background: Headache medicine is largely based on detailed history taking by physicians analysing patients' descriptions of headache. Natural language processing (NLP) structures and processes linguistic data into quantifiable units. In this study, we apply these digital techniques on self-reported narratives by patients with headache disorders to research the potential of analysing and automatically classifying human-generated text and information extraction in clinical contexts.

Methods: A prospective cross-sectional clinical trial collected self-reported narratives on headache disorders from participants with either migraine or cluster headache. NLP was applied for the analysis of lexical, semantic and thematic properties of the texts. Machine learning (ML) algorithms were applied to classify the descriptions of headache attacks from individual participants into their correct group (migraine versus cluster headache).

Results: One-hundred and twenty-one patients (81 participants with migraine and 40 participants with cluster headache) provided a self-reported narrative on their headache disorder. Lexical analysis of this text corpus resulted in several specific key words per diagnostic group (cluster headache: Dutch (nl): "oog" | English (en): "eye", nl: "pijn" | en: "pain" and nl: "terug" | en: "back/to come back"; migraine: nl: "hoofdpijn" | en: "headache", nl: "stress" | en: "stress" and nl: "misselijkheid" | en: "nausea"). Thematic and sentiment analysis of text revealed largely negative sentiment in texts by both patients with migraine and cluster headache. Logistic regression and support vector machine algorithms with different feature groups performed best for the classification of attack descriptions (with F1-scores for detecting cluster headache varying between 0.82 and 0.86) compared to naïve Bayes classifiers.

Conclusions: Differences in lexical choices between patients with migraine and cluster headache are detected with NLP and are congruent with domain expert knowledge of the disorders. Our research shows that ML algorithms have potential to classify patients' self-reported narratives of migraine or cluster headache with good performance. NLP shows its capability to discern relevant linguistic aspects in narratives from patients with different headache disorders and demonstrates relevance in clinical information extraction. The potential benefits on the classification performance of larger datasets and neural NLP methods can be investigated in the future.

Trial registration: This study was registered with clinicaltrials.gov with ID NCT05377437.

Keywords: Cluster headache; Machine learning; Migraine; Natural language processing.

Conflict of interest statement

None.

© 2022. The Author(s).

Figures

Fig. 1
Fig. 1
Key words per diagnosis (red colour migraine, blue colour cluster headache). Legend: (*) = p < 1*10–2, (**) = p < 1*10–5, (***) = p < 1*10–8. Abbreviations: chi2abs = absolute value of the chi-squared statistic, en = English, nl = Dutch

References

    1. Vos T, et al. Global, regional, and national incidence, prevalence, and years lived with disability for 328 diseases and injuries for 195 countries, 1990–2016: a systematic analysis for the Global Burden of Disease Study 2016. Lancet. 2017;390(10100):1211–1259. doi: 10.1016/S0140-6736(17)32154-2.
    1. GBDH Collaborators Global, regional, and national burden of migraine and tension-type headache, 1990–2016: a systematic analysis for the Global Burden of Disease Study 2016. The Lancet Neurology. 2018;17(11):954–976. doi: 10.1016/S1474-4422(18)30322-3.
    1. Headache Classification Committee of the International Headache Society (IHS) (2018) The International Classification of Headache Disorders, 3rd edition. Cephalalgia : an international journal of headache 38(1):1–211. 10.1177/0333102417738202
    1. Steiner TJ. Headache * commentary: headache in South America. BMJ. 2002;325(7369):881–886. doi: 10.1136/bmj.325.7369.881.
    1. Goadsby PJ, Holland PR, Martins-Oliveira M, Hoffmann J, Schankin C, Akerman S. Pathophysiology of migraine: a disorder of sensory processing. Physiol Rev. 2017;97(2):553–622. doi: 10.1152/physrev.00034.2015.
    1. Wei DY, Goadsby PJ. Cluster headache pathophysiology - insights from current and emerging treatments. Nat Rev Neurol. 2021;17(5):308–324. doi: 10.1038/s41582-021-00477-w.
    1. Lund N, Barloese M, Petersen A, Haddock B, Jensen R. Chronobiology differs between men and women with cluster headache, clinical phenotype does not. Neurology. 2017;88(11):1069–1076. doi: 10.1212/WNL.0000000000003715.
    1. Rozen TD, Fishman RS. Cluster headache in the United States of America: demographics, clinical characteristics, triggers, suicidality, and personal burden. Headache. 2012;52(1):99–113. doi: 10.1111/j.1526-4610.2011.02028.x.
    1. Sanchez Del Rio M, Leira R, Pozo-Rosich P, Lainez JM, Alvarez R, Pascual J. Errors in recognition and management are still frequent in patients with cluster headache. Eur Neurol. 2014;72(3–4):209–212. doi: 10.1159/000362517.
    1. Van Alboom E, Louis P, Van Zandijcke M, Crevits L, Vakaet A, Paemeleire K. Diagnostic and therapeutic trajectory of cluster headache patients in Flanders. Acta Neurol Belg. 2009;109(1):10–17.
    1. Vikelis M, Rapoport AM. Cluster headache in Greece: an observational clinical and demographic study of 302 patients. J Headache Pain. 2016;17(1):88. doi: 10.1186/s10194-016-0683-0.
    1. Jurafsky D, Martin JH (eds) (2020) Speech and Language Processing. An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition (Third Edition draft). Available via
    1. Harris PA, Taylor R, Thielke R, Payne J, Gonzalez N, Conde JG. Research electronic data capture (REDCap)-A metadata-driven methodology and workflow process for providing translational research informatics support. J Biomed Inform. 2009;42(2):377–381. doi: 10.1016/j.jbi.2008.08.010.
    1. Harris PA et al (2019) The REDCap consortium: Building an international community of software platform partners. J Biomed Inform 95:103208. 10.1016/j.jbi.2019.103208
    1. Manning CD, Raghavan P, Schütze H. Introduction to Information Retrieval. New York, NY, USA: Cambridge University Press; 2008.
    1. Dunning T. Accurate methods for the statistics of surprise and coincidence. Comput Linguist. 1993;19(1):61–74.
    1. Bondi M (2010) Perspectives on keywords and keyness. In: Bondi M, Scott M (eds) Keyness in Texts. Studies in Corpus Linguistics. John Benjamins Publishing Company, Amsterdam. pp 1–18. 10.1075/scl.41.01bon
    1. Scott M, Tribble C (eds) (2006) Textual Patterns: Key words and corpus analysis in language education. John Benjamins Publishing Company, Amsterdam.
    1. Stubbs M (2010) Three concepts of keywords. In: Bondi M, Scott M (eds) Keyness in Texts. Studies in Corpus Linguistics. John Benjamins Publishing Company, Amsterdam, pp 21–42.
    1. Benoit K, Watanabe K, Wang H, Nulty P, Obeng A, Müller S, Matsuo A (2018) quanteda: An R package for the quantitative analysis of textual data. Journal of Open Source Software 3(30): 774. 10.21105/joss.00774
    1. Mitchell T. MACHINE LEARNING (Int'l Ed) New York City: McGraw-Hill Science/Engineering/Math; 1997.
    1. Refaeilzadeh P, Tang L, Liu H (2009). Cross-Validation. In: LIU L, ÖZSU MT (eds) Encyclopedia of Database Systems. Springer, Boston
    1. Van de Kauter M, Coorman G, Lefever E, Desmet B, Macken L, Hoste V (2013) LeTs Preprocess: The multilingual LT3 linguistic preprocessing toolkit. Computational Linguistics in the Netherlands Journal 3:103–120
    1. Luhn HP. Key word-in-context index for technical literature (kwic index) Am Doc. 1960;11(4):288–295. doi: 10.1002/asi.5090110403.
    1. Cuingnet R, et al. Spatial regularization of svm for the detection of diffusion alterations associated with stroke outcome. Med Image Anal. 2011;15(5):729–737. doi: 10.1016/j.media.2011.05.007.
    1. Team RC . R: A Language and Environment for Statistical Computing. 2017.
    1. Bird S, Klein E, Loper E. Natural language processing with Python: analyzing text with the natural language toolkit. O'Reilly; 2009.
    1. Wickham H, et al. Welcome to the {tidyverse} Journal of Open Source Software. 2019;4(43):1686. doi: 10.21105/joss.01686.
    1. Pedregosa F et al (2011) Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12:2825–2830
    1. Mohammad SM, Turney PD. Crowdsourcing a Word-Emotion Association Lexicon. Comput Intell-Us. 2013;29(3):436–465. doi: 10.1111/j.1467-8640.2012.00460.x.
    1. De Smedt T, Daelemans W (2012) "Vreselijk mooi!" (terribly beautiful): A Subjectivity Lexicon for Dutch Adjectives. In: Proceedings of the Eighth International Conference on Language Resources and Evaluation, LREC 2012, Istanbul, Turkey, May 23-25, pp 3568–3572
    1. Jijkoun V, Hofmann K (2009) Generating a Non-English Subjectivity Lexicon: Relations That Matter. In: Proceedings of the 12th Conference of the European Chapter of the Association for Computational Linguistics:398–405. 10.3115/1609067.1609111
    1. Nichols VP, Ellard DR, Griffiths FE, Kamal A, Underwood M, Taylor SJC, Team C The lived experience of chronic headache: a systematic review and synthesis of the qualitative literature. BMJ Open. 2017;7(12):e019929. doi: 10.1136/bmjopen-2017-019929.
    1. Montagna P, Pierangeli G. The primary headaches as a reflection of genetic darwinian adaptive behavioral responses. Headache. 2010;50(2):273–289. doi: 10.1111/j.1526-4610.2009.01584.x.
    1. Silberstein S, Loder E, Diamond S, Reed ML, Bigal ME, Lipton RB, Group AA Probable migraine in the United States: results of the American Migraine Prevalence and Prevention (AMPP) study. Cephalalgia. 2007;27(3):220–229. doi: 10.1111/j.1468-2982.2006.01275.x.
    1. Krawczyk B, Simic D, Simic S, Wozniak M. Automatic diagnosis of primary headaches by machine learning methods. Cent Eur J Med. 2013;8(2):157–165. doi: 10.2478/s11536-012-0098-5.
    1. Katsuki M, Narita N, Matsumori Y, Ishida N, Watanabe O, Cai S, Tominaga T (2020) Preliminary development of a deep learning-based automated primary headache diagnosis model using Japanese natural language processing of medical questionnaire. Surgical neurology international 11:475. 10.25259/SNI_827_2020
    1. Kwon J, Lee H, Cho S, Chung CS, Lee MJ, Park H (2020) Machine learning-based automated classification of headache disorders using patient-reported questionnaires. Sci Rep-Uk 10(1):14062. 10.1038/s41598-020-70992-1
    1. Martelletti P, editor. Migraine in Medicine. Cham Switzerland: A Machine-Generated Overview of Current Research. Springer Nature Switzerland AG; 2022.
    1. Gurevich O, Deane PD (2007) Document Similarity Measures to Distinguish Native vs. Non-Native Essay Writers. In: Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics, Companion Volume, Short Papers, Rochester, New York, pp. 49–52.

Source: PubMed

3
購読する