scieee Open visual document viewer

Structuring electronic health records of breast cancer with Natural Language Processing

García Barragán, Alvaro

Abstract

Clinical records are written in natural language and, therefore, they consist of unstructured information. The objective of the project is to structure the information from clinical records of breast cancer patients in a public hospital in Madrid in order to obtain useful information for physicians. In this way, the proposal is to perform the structuring process using deep neural networks for entity classification, specifically Named Entity Recognition (NER), in combination with other NLP techniques. Ultimately, a semi-structured database in JSON format will be generated, containing the structured clinical records, which can be further processed for various purposes.

Full text

P ocesamien o del Lenguaje Na u al pa a la es uc u ación de his o iales clínicos de cánce de mama S uc u ing elec onic heal h eco ds o b eas cance wi h Na u al Language P ocessing T abajo de Fin de G ado Cu so 2022–2023 Au o Ál a o Ga cía Ba agán Di ec o Víc o Robles Fo cada Tu o UCM: José Ignacio Hidalgo Pé ez Colabo ado E nes ina Menasal as G ado en Ingenie ía In o má ica Facul ad de In o má ica Uni e sidad Complu ense de Mad id P ocesamien o del Lenguaje Na u al pa a la es uc u ación de his o iales clínicos de cánce de mama S uc u ing elec onic heal h eco ds o b eas cance wi h Na u al Language P ocessing T abajo de Fin de G ado en Ingenie ía In o má ica Au o Ál a o Ga cía Ba agán Di ec o Víc o Robles Fo cada Tu o UCM: José Ignacio Hidalgo Pé ez Colabo ado E nes ina Menasal as Con oca o ia: Junio 2023 G ado en Ingenie ía In o má ica Facul ad de In o má ica Uni e sidad Complu ense de Mad id 29 de mayo de 2023 Dedica o ia A mi mad e, po sabe de p ime a mano que es el cánce de mama y supe a lo Ag adecimien os A odo el g upo de in es igación del labo a o io MEDAL, comenzando po Víc o y E nes, quienes desde el p ime día me han hecho sen i como en casa, y e minando con odos los es udian es con quienes he enido la opo unidad de abaja y c ece an o p o esionalmen e como pe sonalmen e. ii Resumen P ocesamien o del Lenguaje Na u al pa a la es uc- u ación de his o iales clínicos de cánce de mama Los his o iales clínicos es án esc i os en lenguaje na u al y, po an o, es in- o mación no es uc u ada. El obje i o del p oyec o es es uc u a la in o mación de his o iales clínicos de pacien es con cánce de mama de un hospi al público de Mad id con el in de consegui in o mación u il pa a los medicos. De es a o ma, se p opone ealiza la es uc u ación a a és del uso de edes neu onales p o undas pa a la clasi icacion de las en idades: NER (Named En i y Recogni ion), en conjun o con o as écnicas de NLP. Finalmen e se gene a á una base de da os semies uc- u ada en o ma o json con los his o iales, que pod á se p ocesada pos e io men e con di e en es in enciones. Palab as cla e P ocesamien o del Lenguaje Na u al (PNL), Ap endizaje P o undo, T ans o - me s, Reconocimien o de en idades nomb adas, Ex acción de in o mación, Ex ac- ción del diagnós ico del cánce , Cánce de mama ix Lis o igu es 2.1. Spacy okeniza ion [1] . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2. Wo d embbedings ep esen ed in 3D [2] . . . . . . . . . . . . . . . . . 11 2.3. Rep esen a ion o an RNN . . . . . . . . . . . . . . . . . . . . . . . 12 2.4. LSTM cell a chi ec u e [3] . . . . . . . . . . . . . . . . . . . . . . . . 13 2.5. BILSTMlaye o NER.......................... 14 2.6. La ge Language Models: A New Moo e’s Law ? [4] . . . . . . . . . . 15 2.7. Compa ing CNN (padding okens a e omi ed), RNN, and sel -a en ion a chi ec u es[5].............................. 16 2.8. BERT s.GPT[6] ............................ 17 2.9. Ex ac ing cance concep s using BERT. . . . . . . . . . . . . . . . . 17 2.10.BERT ine uning[6] ........................... 18 2.11.SpaCypipeline[1]............................. 21 2.12. Ins ance o spaCy syn ac ic ee . . . . . . . . . . . . . . . . . . . . . 22 2.13. Example o IOB o ma . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.14. Example o CONLL o ma . . . . . . . . . . . . . . . . . . . . . . . 26 2.15. 5- old c oss alida ion . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.1. T ans o ming Clinical No es in o S uc u ed JSON . . . . . . . . . . 33 4.2. Co puscollec ion ............................. 34 4.3. Modelsc ea ion.............................. 34 4.4. NCP: NLP Cance Pipeline . . . . . . . . . . . . . . . . . . . . . . . 35 4.5. Technology pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.6. Au oma ed pipeline in ba ches . . . . . . . . . . . . . . . . . . . . . . 37 4.7. P e-p ocessing o he no es . . . . . . . . . . . . . . . . . . . . . . . . 38 4.8. Example o an anno a ed clinical no e . . . . . . . . . . . . . . . . . . 39 4.9. Nega ion and Unce ain y Anno a ions . . . . . . . . . . . . . . . . . 41 4.10. JSON o ma o s uc u ing b eas cance in o ma ion . . . . . . . . 42 x ii 5.1. G aphical ep esen a ion o Neg Unce Co pus coun ing . . . . . . . 45 5.2. G aphical ep esen a ion o Clinical co pus coun ing . . . . . . . . . . 46 Lis o ables 2.1. Numbe o no es pe se ice and ype . . . . . . . . . . . . . . . . . . 8 2.2. P e ained models de ails [7] . . . . . . . . . . . . . . . . . . . . . . . 19 2.3. spaCyNLPPipeline ........................... 22 2.4. spaCy Command Line In e ace . . . . . . . . . . . . . . . . . . . . . 23 4.1. De ini ion o he en i ies . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.2. No maliza ion............................... 42 5.1. Model hype -pa ame e s . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.2. In o ma ion abou NER co pus . . . . . . . . . . . . . . . . . . . . . 44 5.3. Resul s om Nega ion and Unce ainly Co pus pe en i y ype . . . . 47 5.4. Gene al esul s om Clinical Co pus . . . . . . . . . . . . . . . . . . 47 5.5. Resul s om Clinical co pus pe en i y ype . . . . . . . . . . . . . . 47 5.6. Discussion o Clinical NER model . . . . . . . . . . . . . . . . . . . . 49 xix Chap e 1 In oduc ion “Science is no only a discipline o eason, bu also o omance and passion” — S ephen Hawking Cance emains one o he main public heal h p oblems, anked as he leading cause o dea h globally [8]. Acco ding o he Wo ld Heal h O ganiza ion (WHO)1, cance caused nea ly 10 million dea hs wo ldwide in 2020. In pa icula , b eas cance is cu en ly he mos common cance globally, accoun ing o 12.5% o all new annual cance cases wo ldwide2. In 2020, he e we e 2.3 million women diagnosed wi h b eas cance and 685,000 dea hs a ound he wo ld. The p ocess o diagnosing and ea ing cance pa ien s gene a es a huge amoun o in o ma ion ha desc ibes symp oms, he cance diagnosis, amily his o y, ea - men s, and he e olu ion o he pa ien a he ime. Physicians egis e his in o - ma ion in Elec onic Heal h Reco ds (EHR) using clinical no es w i en in na a i e o m. Ex ac ing and mining his in o ma ion is c ucial o suppo oncology esea ch, design ea men plans, and imp o e pa ien ou comes [9]. Howe e , ex ac ing in o ma ion om clinical na a i es is a challenge due o he complexi y o na u al language [10]. Mo eo e , clinical ex s a e w i en by highly skilled physicians and nu ses using domain-speci ic e ms, unde ime p essu e, wi h ich and complex ja gon, which makes hese ex s di e om hose o o he domains. In ecen yea s he use o Na u al Language P ocessing (NLP) in he biomedical domain has inc eased he possibili y o au oma ically ex ac ing in o ma ion om clinical na a i es. NLP is a sub- ield o Compu e Science (CS), and A i icial In- elligence (AI) ha enables compu e s o unde s and he meaning o human na u al language [11]. The applica ion o NLP and AI echniques o p ocessing medical eco ds plays an inc easingly signi ican ole in ad ancing clinical decision suppo . The use o EHR o pe o m s udies in he cance ield has also inc eased in he las ew yea s. 1h ps://www.who.in /news- oom/ ac -shee s/de ail/cance 2h ps://www.b eas cance .o g/ ac s-s a is ics 1 2Chap e 1. In oduc ion Cu en ly, we a e expe iencing a signi ican boom in he ield o AI, wi h new and e olu iona y sys ems eme ging on a egula basis. One a ea ha is pa icula ly g owing is NLP, hanks o he elease o he esea ch pape "A en ion is all you need" [12], which in oduced he inno a i e T ans o me s a chi ec u e. This has led o he c ea ion o popula language models such as Cha GPT [13], which a e causing a buzz in he indus y. Tha ’s why his a chi ec u e has been chosen o he ask desc ibed in his p ojec . This p ojec is hoped o b ing some imp o emen s o he e iciency and quali y o heal hca e, as well as making some p og ess in medical esea ch and public heal h policy planning ela ed o b eas cance . 1.1. Mo i a ion Medical eco ds ha e exis ed o a long ime, bu he o maliza ion o elec onic heal h eco ds began in he ea ly 20 h cen u y. P io o his, doc o s eco ded no es in pape books and physical iles, bu hese eco ds we e o en incomple e, diso ganized, and di icul o access. The o maliza ion o medical eco ds began in 1928 when he Ame ican Associa- ion o Medical Reco d Lib a ians and Heal h In o ma ion Managemen (AHIMA)3 es ablished a commi ee o de elop a uni o m sys em o medical eco ds. This com- mi ee de eloped he i s edi ion o he In e na ional Lis o Medical Te ms in 1932, which was designed o be a guide o consis en and uni o m medical eco d keeping. In he ollowing yea s, medical eco ds became inc easingly impo an o heal h- ca e. In he 1950s, in o ma ion echnology began o be used in heal hca e, and he use o compu e ized sys ems o medical eco d keeping became mo e common. In he 1970s, au oma ed medical eco d keeping sys ems we e in oduced, which al- lowed doc o s o inpu da a di ec ly in o a compu e . In he 1990s, in e ne echnology began o be used o medical eco d keeping. This allowed doc o s o sha e in o ma ion mo e easily and quickly, and also allowed pa ien s o access hei medical eco ds online. EHRs ha e e ol ed in di e en gene a ions as echnology has ad anced. The di e en gene a ions a e as ollows [14]: Fi s gene a ion: This gene a ion eme ged in he 1970s and was based on au oma ed medical eco d sys ems. These sys ems we e limi ed in hei unc- ionali y and we e designed p ima ily o s o e basic pa ien in o ma ion, such as diagnoses, ea men s, and es esul s. Second gene a ion: In he 1980s, EHRs second-gene a ion we e de eloped, which we e based on compu e ized medical eco d sys ems and o e ed mo e unc ionali y. These sys ems allowed doc o s o inpu de ailed in o ma ion abou pa ien heal hca e, including eco ds o pas isi s, p esc ibed medica- ions, and labo a o y es esul s. 3h ps://www.ahima.o g/ 1.1. Mo i a ion 3 Thi d gene a ion: The hi d gene a ion was de eloped in he 1990s and o- cused on in e connec i i y and da a exchange be ween di e en heal hca e sys ems. These sys ems allowed doc o s o access medical in o ma ion om pa ien s o o he heal hca e p o ide s and we e designed o imp o e heal hca e coo dina ion. Fou h gene a ion: EHRs ou h-gene a ion eme ged in he ea ly 2000s and we e based on web echnology. These sys ems allowed doc o s o access pa ien medical eco ds online and also allowed pa ien s o access hei own medical in o ma ion and communica e wi h hei doc o s ia he web. Fi h gene a ion4: Cu en ly, i h-gene a ion is being de eloped. This gene - a ion will use ad anced echnologies such as machine lea ning and a i icial in elligence o imp o e diagnos ic accu acy and clinical decision-making. In his way, an EHR speci ically e e s o he elec onic eco d o a pa ien ’s med- ical in o ma ion. The e o e, an EHR is a compu e sys em ha allows heal hca e p o essionals o cap u e, s o e, and access a pa ien ’s medical in o ma ion elec on- ically. This includes he pa ien ’s medical and heal h in o ma ion, such as medical his o y, diagnoses, ea men s, es esul s, and p esc ibed medica ions. On he o he hand, Heal h Ca e In o ma ion Sys em (HCIS) e e o clinical in- o ma ion sys ems used in hospi als o manage pa ien in o ma ion, s a , and hospi- al esou ces. These sys ems ypically include modules o appoin men scheduling, pa ien admission, clinical da a eco ding, pa ien acking, pha macy managemen , billing managemen , and human esou ces managemen . The e o e, an HCIS usually includes a module o EHR egis a ion. The Mad id Heal h Se ice (SERMAS) has a unique and cen alized Elec onic Heal h Reco d sys em in he p ima y ca e sys em. Howe e , in he specialized ca e sys em (hospi als), he e a e di e en HCIS, which a e speci ic o each hospi al cen e . Some examples o hese a e: HCIS include Heal hca e P o ide - Heal h Ca e In o ma ion Sys em (HP-HCIS), Elec onic Medical Reco d Sys em (SELENE) and Medical and Heal h In o ma ion Exchange (IMDH). In HCIS, in o ma ion can be classi ied in o wo ca ego ies, s uc u ed and un- s uc u ed: S uc u ed in o ma ion e e s o in o ma ion ha is s o ed in da a ields wi h de ined o ma s, making i easie o compu e sys ems o p ocess and analyze. Examples o s uc u ed in o ma ion include pa ien demog aphics, diagnoses, es esul s, p esc ibed medica ions, among o he s. Uns uc u ed in o ma ion e e s o in o ma ion ha does no ollow a de ined o ma and can be mo e di icul o p ocess and analyze au oma ically. Ex- amples o uns uc u ed in o ma ion include medical epo s, p og ess no es, clinical obse a ions, medical images, among o he s. 4h ps://www2.deloi e.com/us/en/insigh s/indus y/heal h-ca e/eh -sys ems- he- u u e-o - elec onic-heal h- eco ds.h ml 4Chap e 1. In oduc ion The s a ing hypo hesis is ha i is possible o ex ac use ul in o ma ion om uns uc u ed da a in HCIS and con e i in o s uc u ed in o ma ion ha can be u ilized by compu e sys ems. Thus, he main mo i a ion behind his wo k is he de elopmen o NLP ools o ex ac use ul in o ma ion om uns uc u ed da a in HCIS. This uns uc u ed da a may include medical epo s, p og ess no es and clinical obse a ions. 1.2. Objec i es The main objec i es o his wo k a e: To de elop and e alua e NLP ools o ex ac ing use ul in o ma ion om uns uc u ed da a in HCIS in spanish. To con e he ex ac ed in o ma ion in o s uc u ed da a ha can be used by compu e sys ems in HCIS. De elop an au oma ed NLP pipeline ha can ex ac he mos impo an in o ma ion om a gi en clinical no e. These objec i es en ail hese implica ions: To imp o e he e iciency and quali y o heal hca e by making de ailed and accu a e pa ien in o ma ion eadily a ailable o heal hca e p o essionals. To enhance he abili y o compu e sys ems o analyze and gene a e accu a e and de ailed epo s on he heal h and well-being o pa ien s. To con ibu e o medical esea ch and public heal h policy planning by p o- iding accu a e and de ailed pa ien in o ma ion. To ca y ou his ask o de eloping NLP ools o ex ac use ul in o ma ion om uns uc u ed da a in HCIS, b eas cance da a om a enowned hospi al will be used. These da a will include medical epo s, p og ess no es, and clinical obse a ions ela ed o b eas cance . Addi ionally, we will wo k in collabo a ion wi h heal hca e p o essionals and b eas cance specialis s o ensu e he ele ance and use ulness o he ex ac ed and con e ed s uc u ed in o ma ion o use in HCIS. 1.3. Wo k Plan In o de o ul ill he goals o he p ojec he ollowing asks ha e been de ined: Iden i y he speci ic ypes o uns uc u ed da a ha a e mos ele an o he p ojec and he ypes o in o ma ion ha need o be ex ac ed. 1.3. Wo k Plan 5 Conduc a ho ough li e a u e e iew on NLP ools and echniques o ex- ac ing in o ma ion om uns uc u ed da a in HCIS. Ga he and p ep ocess he uns uc u ed da a om he HCIS, cleaning and s anda dizing i o u he analysis. De elop and ain NLP models o ex ac he desi ed in o ma ion om he uns uc u ed da a, such as named en i y ecogni ion o ela ion ex ac ion. E alua e he pe o mance o he NLP models using app op ia e me ics and adjus he models as needed. 12 Chap e 2. Ma e ials and Techniques uns uc u ed ex da a, and o label hem wi h hei co esponding ca ego ies. This is a challenging ask, as named en i ies can be exp essed in many di e en o ms and can appea in a ious con ex s wi hin he ex . Fu he mo e, people o en make spelling e o s, which can u he complica e his ask. Techniques o NER include: egex, RNNs, LSTM and BiLSTM ne wo ks. LMs like BERT ha e achie ed s a e-o - he-a pe o mance on NER asks, hanks o he T ans o me s a chi ec u e. Models a e p e ained on la ge da ase s in an unsu- pe ised manne , and hen ine- uned on smalle , ask-speci ic da ase s. All hese echniques, o ganized by he quali y o hei ou comes, a e de ailed in his sec ion. 2.4.1. REGEX Regula exp ession, also known as egex o egexp, is a pa e n made up o a sequence o cha ac e s ha is used o sea ch o o ma ch speci ic pa e ns o ex . I is a powe ul ool ha allows you o speci y a se o ules o ma ching and manipula ing ex . Regula exp essions a e widely used in p og amming, da a p ocessing, and ex edi ing applica ions o sea ch, eplace, and ex ac ex based on speci ic pa e ns. In he ield o NLP, i is common o use egex o asks such as ex cleaning, no maliza ion o NER. These echniques a e widely used o iden i y and ex ac impo an in o ma ion om ex , as well as o p epa e he ex o u he analysis o machine lea ning asks. 2.4.2. RNN and LSTM Recu en Neu al Ne wo ks (RNNs) ha e been widely used in NLP o NER. RNNs a e a ype o neu al ne wo k a chi ec u e ha can handle sequen ial da a, making hem well-sui ed o NER asks. In NER, RNNs p ocess ex inpu s one oken a a ime, and hey use he con ex o he p e ious okens o classi y each oken as a named en i y o no . The key ad an age o RNNs is hei abili y o cap u e dependencies be ween he cu en oken and p e ious okens, which can be essen ial o accu a e NER. Figu e 2.3: Rep esen a ion o an RNN 2.4. NER 13 The anishing g adien p oblem is a common issue ha a ises when aining Recu en Neu al Ne wo ks (RNNs) on long sequences o da a. The p oblem a ises when g adien s, which a e used o upda e he ne wo k weigh s du ing aining, become ex emely small as hey a e backp opaga ed h ough he ne wo k om he ou pu o he inpu laye . When his happens, he ne wo k may no be able o lea n long- e m dependencies e ec i ely and may pe o m poo ly on long sequences. The anishing g adien p oblem is pa icula ly p e alen in RNNs because hey p ocess inpu sequences one elemen a a ime, and he g adien s mus low back h ough he same se o weigh s o each elemen in he sequence. As a esul , e o s can accumula e and cause g adien s o become e y small o e en anish o e ime. Unlike adi ional RNNs, which su e om he anishing g adien p oblem and ha e di icul y lea ning long- e m dependencies, LSTMs a e designed o cap u e long- e m dependencies by using a mo e complex ga ing mechanism ha selec i ely emembe s o o ge s in o ma ion o e ime. Long Sho -Te m Memo y (LSTM) was in oduced in 1997 by Hoch ei e and Schmidhube [21] and ha e since become one o he mos popula and e ec i e a chi ec u es o sequen ial da a p ocessing. They consis o memo y cells ha s o e in o ma ion o e ime, inpu ga es ha con ol he low o in o ma ion in o he cells, ou pu ga es ha con ol he low o in o ma ion ou o he cells, and o ge ga es ha selec i ely disca d in o ma ion om he cells. Figu e 2.4: LSTM cell a chi ec u e [3] O e all, LSTMs a e a powe ul and lexible ool o modeling sequen ial da a and ha e enabled signi ican ad ances in a wide ange o applica ions. 2.4.3. BiLSTM Bidi ec ional LSTM [22] (BiLSTM) is a a ian o he Long Sho -Te m Memo y (LSTM) a chi ec u e ha has he abili y o p ocess inpu sequences in bo h o wa d and backwa d di ec ions. This allows he ne wo k o cap u e in o ma ion om bo h pas and u u e con ex s, making i pa icula ly use ul o sequence labeling asks such as NER. In con as , s anda d LSTMs p ocess inpu sequences in only one di ec ion, yp- ically om pas o u u e. While LSTMs a e also e ec i e a cap u ing long- e m 14 Chap e 2. Ma e ials and Techniques Figu e 2.5: BILSTM laye o NER dependencies in sequences, hey may no be as e ec i e as BiLSTMs o asks ha equi e bidi ec ional con ex . In p ac ice, BiLSTMs o en ou pe o m LSTMs in asks ha equi e bidi ec ional con ex , pa icula ly when dealing wi h longe sequences o da a. Howe e , hey can also be mo e compu a ionally expensi e and equi e mo e memo y han LSTMs, due o he need o s o e and p ocess in o ma ion in bo h o wa d and backwa d di ec ions. 2.4.4. LMs A Language Model (LM) is a s a is ical model ha is ained on a co pus o ex da a o p edic he likelihood o a sequence o wo ds occu ing in a language. The model assigns a p obabili y sco e o each possible sequence o wo ds in he language, based on he equency o occu ence o hose wo ds in he aining da a. In o he wo ds, an LM is a machine lea ning algo i hm ha is capable o gen- e a ing ex ha is simila o human language by modeling he s a is ical pa e ns and s uc u es o language. The goal o an LM is o gene a e ex ha is cohe en , g amma ical, and meaning ul, gi en a sequence o inpu wo ds o cha ac e s. Language Models (LMs) ha e a wide ange o applica ions in na u al language p ocessing, including bu no limi ed o he ollowing: Tex Comple ion: LMs can be used o p edic he nex wo d o ph ase in a gi en ex , which is use ul o applica ions such as au o-comple ion in ex 2.4. NER 15 edi o s o sea ch engines. Machine T ansla ion: LMs can be used o ansla e ex om one language o ano he by modeling he p obabili y dis ibu ion o wo ds in bo h languages. Speech Recogni ion: LMs can be used o con e spoken language o ex by modeling he p obabili y dis ibu ion o wo ds in he spoken language. Sen imen Analysis: LMs can be used o analyze he sen imen o a piece o ex , such as de e mining whe he a e iew is posi i e o nega i e. Ques ion Answe ing (Q&A): LMs can be used o answe ques ions posed in na u al language by gene a ing an answe based on he inpu ex and he con ex o he ques ion. Named En i y Recogni ion(NER): LMs can be used o lea n associa ions be- ween wo ds and speci ic named en i ies, like o ganiza ions o loca ions. Some examples o LMs used o NER include BERT (see subsec ion 2.4.6) [6] and Gene a i e P e- ained T ans o me (GPT) [23] models. These models ha e achie ed s a e-o - he-a pe o mance on NER asks and ha e been used in a ious na u al language p ocessing applica ions, such as in o ma ion ex ac ion and ex classi ica ion. Figu e 2.6: La ge Language Models: A New Moo e’s Law ? [4] 16 Chap e 2. Ma e ials and Techniques 2.4.5. T ans o me s T ans o me s is a new a chi ec u e de elop by google enginee s in 2017 [12], which has become he s a e o he a hanks o wo concep s: Posi ional encoding is a echnique used o inco po a e in o ma ion abou he posi ion o he okens in a sequence in o he inpu ep esen a ion. In con as o RNNs, which use he o de o he wo ds implici ly h ough hei sequen ial p ocessing, ans o me s a e no designed o p ocess inpu s sequen- ially. Ins ead, hey p ocess all he wo ds in a sequence in pa allel. To inco - po a e posi ion in o ma ion in o he inpu , ans o me s use a ixed unc ion ha maps each posi ion in he sequence o a unique ec o ep esen a ion. This ec o ep esen a ion is added o he embedding o each wo d, allowing he ans o me o di e en ia e be ween wo ds based on hei posi ion in he sequence. Sel a en ion mechanism is used o cap u e he ela ionships be ween wo ds in a sequence, allows he model o ocus on di e en pa s o he inpu du ing p ocessing. The a en ion ma ix de e mines how much a en ion o gi e o each inpu ec o when compu ing he weigh ed sum. By paying a en ion o he mos impo an pa s o he inpu , he sel -a en ion mechanism helps he model o be e cap u e he ela ionships and dependencies be ween di e en pa s o he ex , which can ul ima ely lead o mo e accu a e p edic ions. Figu e 2.7: Compa ing CNN (padding okens a e omi ed), RNN, and sel -a en ion a chi ec u es [5] Fo mo e in o ma ion abou his sec ion, please e e o my p esen a ion a ailable a : Link p esen a ion. I ha e c ea ed his p esen a ion o unde s and he echnology behind ans o me s. 2.4. NER 17 2.4.6. BERT Bidi ec ional Encode Rep esen a ions om T ans o me s (BERT) is based on a deep neu al ne wo k composed o se e al laye s o bidi ec ional ans o me en- code s. The encode s used a e simila o hose ound in he o iginal ans o me a chi ec u e, bu di e in hei bidi ec ional app oach. Ins ead o p ocessing ex om le o igh o igh o le , i uses in o ma ion om bo h di ec ions o gene a e con ex ual ep esen a ions o wo ds. On he o he hand, GPT T ans o me [24] uses sel -a en ion ha limi s each symbol’s a en ion o only he con ex o i s le . Figu e 2.8: BERT s. GPT [6] The igu e depic ed in Figu e 2.9 illus a es he u iliza ion o BERT o he pu pose o ex ac ing named en i ies om clinical eco ds. Figu e 2.9: Ex ac ing cance concep s using BERT. 18 Chap e 2. Ma e ials and Techniques 2.4.7. P e aining and Fine Tuning P e aining e e s o he p ocess o aining a model on a la ge da ase in an unsupe ised manne . The main objec i es a e: Lea ning con ex ualized wo d embeddings: lea n wo d embeddings ha cap- u e he meaning o wo ds based on hei su ounding con ex . T ans e lea ning: model can lea n gene al linguis ic ea u es ha can be use ul o a wide ange o asks. E iciency: a model can lea n use ul ea u es ha can educe he amoun o da a needed o ine- uning, and can also speed up aining and in e ence imes. BERT has been p e- ained in wo unsupe ised asks: Masked Language Modeling (MLM): ce ain okens in a sen ence a e andomly masked and he model is ained o p edic he o iginal wo ds. The pe cen age o okens ha a e masked in BERT du ing aining is ypically se o 15% o he inpu okens. Nex sen ence p edic ion (NSP): The aim o NSP is o each he model o unde s and he ela ionship be ween wo consecu i e sen ences in a ex . Fine- unning is he p ocess o adjus ing a p e- ained LM o i on a smalle labeled da ase o a speci ic ask h ough a supe ised aining p ocess. Due o p e aining, he da a se equi ed is small and leads o equi es less lea ning ime. Fi ing o a speci ic ask, o en equi es adding a laye a he end o he model. As depic ed in Figu e 2.10, BERT is capable o pe o ming asks such as SQuAD5, NER and MNLI6. Figu e 2.10: BERT ine uning [6] 5S an o d Ques ion Answe ing Da ase [25] 6Mul i-Gen e Na u al Language In e ence [26] 2.4. NER 19 2.4.8. BERT p e ained se ups BERT models ha e been p e ained wi h di e en s con igu a ions ha a e a ail- able in Hugging Face Hub7. These o e a ange o choices wi h di e en sizes and p e- aining cha ac e is ics enabling esea che s o selec he mos app op ia e model o hei speci ic NLP asks and language equi emen s. The able p o ided in Table 2.2 showcases a ious p e- ained models wi h di e en con igu a ions. I is impo an o no e ha he able ep esen s only a subse o he ull ange o a ailable models. These speci ic con igu a ions a e p ima ily designed o p ocessing Spanish o English ex s. He e a e some conside a ions o selec ing a BERT model: Model Size and Capaci y: Models base a e smalle and ha e ewe pa ame e s, making hem sui able when compu a ional esou ces a e limi ed o o smalle - scale asks. On he o he hand, models la ge a e la ge models wi h mo e capaci y, which can be bene icial o complex asks ha equi e cap u ing ine-g ained language pa e ns. Case Sensi i i y: I p ese ing he o iginal casing o wo ds is impo an o you ask, you should choose he cased a ian s. These models e ain he o iginal casing in he p e- aining phase and can be use ul when he dis inc ion be ween uppe case and lowe case is seman ically signi ican . Language: I you NLP ask in ol es mul iple languages, you can conside us- ing he mul ilingual models. These models a e ained on ex om mul iple languages and can handle a ious languages simul aneously, making hem sui - able o mul ilingual applica ions. Howe e , i you ask speci ically in ol es he Spanish language, he be o models a e a good op ion. Table 2.2: P e ained models de ails [7] Model Laye s Hidden Heads Pa ams T aining Da a be -base-uncased 12 768 12 110M LC English ex be -la ge-uncased 24 1024 16 340M LC English ex be -base-cased 12 768 12 110M Cased English ex be -la ge-cased 24 1024 16 340M Cased English ex be -base-mul ilingual-uncased 12 768 12 110M LC ex in op 102 languages wi h la ges Wikipedias be -base-mul ilingual-cased 12 768 12 110M Cased ex in op 104 languages wi h la ges Wikipedias be o-base-uncased 12 1024 16 110M LC Spanish ex be o-base-cased 12 1024 16 110M LC Spanish ex *LC : Lowe -Cased 7h ps://hugging ace.co/ 20 Chap e 2. Ma e ials and Techniques 2.5. NLP ool: spaCy Al hough he e a e nume ous NLP ools a ailable such as NLTK8, Spa kNLP9, and S an o d Co eNLP10, we op ed o spaCy due o i is de eloped wi h Py hon, i s in ui i e and use - iendly in e ace, and i s wide ange o powe ul ea u es. Thus, SpaCy11 is an open-sou ce Py hon lib a y ha is widely used o NLP asks. I has been de eloped by Explosion AI a company ha specializes in NLP echnologies. I has a numbe o impo an ea u es. Some o he mos ou s anding ones a e: E iciency: is a e y as and e icien ool o p ocessing la ge amoun s o ex , because i is p og ammed in Cy hon12. Ease o use: is easy o ins all and use, e en o hose who ha e no expe ience in na u al language p ocessing. Accu acy: uses machine lea ning models o analyse he ex , which allows i o ha e a high accu acy in he analysis. Cus omisa ion: allows you o cus omise machine lea ning models o sui spe- ci ic needs and imp o e pa sing accu acy. Mul ilingual suppo : suppo s mul iple languages, making i a use ul ool o analysing ex in di e en languages. In eg a ion: in eg a es easily wi h o he na u al language p ocessing ools and amewo ks as Tenso low 13, making i a popula choice in he de elopmen o ex analysis applica ions and se ices. Suppo : Suppo o mul iple NLP asks, including NER, POS agging, de- pendency pa sing, and ex classi ica ion Fu he mo e, can con e wo d ec o s om popula ools such as Fas Tex 14 and Gensim15, o load hem in o any p e- ained ans o me model. I is also possible o pe o m one’s own p e- aining o he language. SpaCy’s p ocessing pipeline in ol es h ee main componen s: language p ocess- ing, linguis ic analysis, and machine lea ning. The ool also comes wi h a CLI (see subsec ion 2.5.2) o simpli ied model de elopmen . SpaCy employs an "ea ly s opping" echnique du ing aining. In his sec ion, hese ea u es a e explained. 8h ps://www.nl k.o g/ 9h ps://spa knlp.o g 10h ps://s an o dnlp.gi hub.io/Co eNLP/ 11h ps://spacy.io/ 12h ps://cy hon.o g/ 13h ps://www. enso low.o g/ 14h ps:// as ex .cc/ 15h ps:// adim ehu ek.com/gensim/ 2.5. NLP ool: spaCy 21 2.5.1. P ocessing pipelines The spaCy pipeline is a sequence o componen s ha a e sequen ially applied o a ex o pe o m di e en NLP asks as shown in he Figu e 2.11. In spaCy, he pipeline can be cus omized o include only he componen s needed o a speci ic NLP ask. The componen s in he pipeline a e execu ed in a p ede ined o de , bu i is possible o modi y he o de o add new componen s as needed. The componen s o he spaCy pipeline can be di ided in o h ee main ca ego ies: Language p ocessing componen s: pe o m p ep ocessing asks, such as o- keniza ion and lemma iza ion, which con e ex in o a mo e manageable s uc u e o downs eam componen s. Linguis ic analysis componen s: pe o m mo e complex asks, such as pa sing and named en i y iden i ica ion, o ex ac seman ic and s uc u al in o ma ion om he ex . Machine lea ning componen s: use machine lea ning models o pe o m NLP asks, such as ex classi ica ion o POS labeling. These models a e p e- ained on la ge da ase s o lea n linguis ic pa e ns, and hen uned o speci ic asks using smalle da ase s. Table 2.3 shows he main componen s o spacy. Howe e , new componen s can be c ea ed and added acco ding o he needs o he applica ion. Figu e 2.11: SpaCy pipeline [1] 28 Chap e 2. Ma e ials and Techniques is used as he es se while he emaining olds a e used o aining. This p ocess helps p o ide a mo e obus es ima e o he model’s pe o mance by using all he da a o bo h aining and es ing. The a e age pe o mance ac oss all i e a ions is calcula ed o assess he model’s gene aliza ion abili y and de ec any issues such as o e i ing o unde i ing. Common alues o k include 5 and 10. k- old CV =1 k k X i=1 e alua e(Mi)(2.5) Figu e 2.15: 5- old c oss alida ion 2.8. Wo ds simila i y In NLP i is no uncommon o wo ds o con ain spelling e o s. Howe e , when i comes o s uc u ed da abases, i is impe a i e ha he wo ds a e in hei co ec o m. To add ess his issue, i is essen ial o ha e a s uc u ed da abase ha includes a comp ehensi e ocabula y. This allows o a compa ison o each wo d o de e mine i s alidi y. By employing his app oach, spelling and ocabula y e o s can be iden i ied and co ec ed e ec i ely. 2.8. Wo ds simila i y 29 The e a e mul iple ways o compa e wo ds in a compu e , and i ’s impo an o dis inguish be ween compa ing embeddings, which is used when he wo ds a e co ec ly spelled. The p ima y me hods include: Le ensh ein Dis ance [28]: used o calcula e he minimum numbe o single- cha ac e edi s (inse ions, dele ions, o subs i u ions) equi ed o ans o m one s ing in o ano he . I was named a e he So ie ma hema ician Vladimi Le ensh ein, who in oduced i in 1965. le (s 1, s 2) =                    leng h(s 2) i leng h(s 1) = 0, leng h(s 1) i leng h(s 2) = 0, le ( ail(s 1), ail(s 2)) i s 1[0] = s 2[0], 1 + min      le ( ail(s 1), s 2) le (s 1, ail(s 2)) le ( ail(s 1), ail(s 2))      o he wise (2.6) whe e he ail o a s ing, deno ed as ail(x), e e s o he subs ing ob ained by excluding he i s cha ac e om he s ing x. Ja o-Winkle Dis ance [29]: This measu e calcula es he simila i y be ween wo wo ds by aking in o accoun cha ac e ansposi ions and p e ix simila i y. To compa e embeddings, he Cosine dis ance [30] is commonly used. I measu es he simila i y be ween wo nume ical ec o s. cosine_simila i y(A,B) = A·B ∥A∥∥B∥(2.7) In o de o lea n how o calcula e he simila i y be ween wo s ings in Py hon, you can e e o my Gi Hub eposi o y a ailable a : h ps://gi hub.com/Al a o8gb/ S ings-simila i y Chap e 3 S a e o he A In ecen yea s he use o NLP in he biomedical domain has inc eased he possibili y o au oma ically ex ac ing in o ma ion om clinical na a i es [31; 32; 33]. The i s challenge o be add essed when ex ac ing in o ma ion om clinical ex s is he iden i ica ion o medical-named en i ies. Ex ac ing named en i ies is one o he mos impo an asks in he medical domain since pe o ming clinical s udies commonly equi es de ailed pa ien in o ma ion eco ded in clinical no es [34; 10]. Clinical Named En i y Recogni ion (Clinical NER) is he ask ha aims o iden i y medical concep s om clinical ex [32; 35]. Recen ly, deep lea ning-based app oaches ha e shown impo an ad ances and imp o emen s in ex ac ing in o ma ion in he biomedical domain [36; 37; 38; 39]. Howe e , mos o hese p oposals ha e ocused on he English language [36; 40]. In ac , in o ma ion ex ac ion in he medical domain ep esen s i s own challenges in languages o he han English [41; 42]. The main ad an age o deep lea ning ap- p oaches is he abili y o au oma ically lea n high-le el ea u es om ex s, educing he ime in he hand-c a ed ea u e enginee ing p ocess. The use o deep-lea ning me hods has also encou aged he ex ac ion o mo e de ailed in o ma ion ela ed o cance . Fo ins ance, in [43], he au ho s desc ibed a deep-lea ning app oach o ex ac b eas cance concep s using BERT. The goal o his p oposal is o ex ac a comp ehensi e se o b eas cance concep s om clinical no es w i en in Chinese. The au ho s demons a e ha he BERT-based model pe o ms be e han adi ional machine lea ning algo i hms a ex ac ing named en i ies in he cance ield. In [44], he au ho s desc ibe a BiLSTM-based model o clinical concep ex ac ion om oncological clinical no es w i en in Ge man. This model suppo s ex ac ing se e al concep s such as diagnosis, ea men s, and medica ions. Al hough deep lea ning-based app oaches ha e imp o ed he abili y o ex ac medical concep s in he cance medical ield, mos o hese p oposals ha e ocused on he English language [36; 40] and mos ecen ly, on Chinese [43; 45]. In he Spanish language case, in [46], he au ho s p opose Can emis , an anno- a ed co pus o suppo umo mo phology ex ac ion. Se e al s udies [47; 48; 49] ha e used his co pus o pe o m mo phology ex ac ion. Howe e , he main lim- i a ion o hese p oposals is hey only suppo iden i ying one en i y ype ( umo 31 32 Chap e 3. S a e o he A mo phology). Cance is a complex and specialized medical ield equi ing a comp e- hensi e se o medical concep s o unde s anding i s e olu ion om clinical na a- i es [43]. In conclusion, ex ac ing named en i ies om oncology clinical ex s w i en in Spanish has no been explo ed deeply ye . The e is a lack o co po a o suppo in o ma ion ex ac ion in he b eas cance domain in his language. Chap e 4 NLP Cance Pipeline 4.1. P oblem s a emen In Heal h Ca e In o ma ion Sys em, da a is p ima ily classi ied as s uc u ed o uns uc u ed. S uc u ed da a, wi h i s de ined o ma s, is eadily p ocessable by compu e sys ems. I encompasses pa ien demog aphics, diagnoses, es esul s, and p esc ibed medica ions. On he o he hand, uns uc u ed da a lacks a de ined o ma , complica ing au oma ic p ocessing and analysis. I ypically includes med- ical epo s, p og ess no es, clinical obse a ions, and medical images. This p ojec is based on he hypo hesis ha uns uc u ed da a in HCIS holds aluable in o ma ion ha , i ex ac ed and ans o med in o s uc u ed da a, could signi ican ly bene i he heal h sys ems. The cen al mo i a ion o his esea ch is o c ea e NLP pipeline ha can e ec- i ely mine uns uc u ed da a in HCIS. The o e all p ocess is shown in Figu e 4.1. Figu e 4.1: T ans o ming Clinical No es in o S uc u ed JSON 33 34 Chap e 4. NLP Cance Pipeline 4.2. S uc u ing b eas cance in o ma ion To ob ain ob ain a module ha s uc u e a Clinical no e, we ha e o do o he s eps ea lie . Fi s o all, as show in Figu e 4.2, we acqui ed wo anno a ed co pus, clinical and Nega ion & Unce ainly. Figu e 4.2: Co pus collec ion Subsequen ly, we p oceeded o ain he models using he co pus we had acqui ed ea lie and e alua ed hei pe o mance, as illus a ed in 4.3. This speci ic s ep is de ailed in chap e 5, whe e we demons a e he de elopmen o wo NER models, namely he Clinical and Nega ion & Unce ain y models. Figu e 4.3: Models c ea ion Finally, bo h models ha e been in eg a ed in o a comp ehensi e pipeline known as NCP, which se es as he inal implemen a ion. This module has he capabili y o ake a clinical no e in aw ex o ma and gene a e a JSON ile ha cap u es he mos signi ican concep s wi hin he no e. 4.3. NCP S ages 35 Figu e 4.4: NCP: NLP Cance Pipeline 4.3. NCP S ages In NLP, a s anda d wo k low in ol es mul iple s eps, each dedica ed o a unique unc ion. The speci ics o hese s ages can a y based on he p oblem and ap- plica ion a hand. Ou me hodology o s uc u ing clinical no es is depic ed in Figu e 4.4 (showcasing he inal module) and Figu e 4.5 (highligh ing he echnolo- gies employed). A specialized pipeline, e med NCP (NLP Cance Pipeline) has been de eloped. Each clinical no e a e ses h ough e e y s age o he pipeline, e en ually eme ging in a s uc u ed o ma : Clinical No es: This s age in ol es collec ing and compiling he clinical no es om a SQL Da abase. Clinical no es e e o he eco ds o pa ien s’ medical his o ies, including hei symp oms, diagnoses, ea men s and ou comes. P ep ocessing (Regex): In his s age, he clinical no es a e p ep ocessed o p epa e hem o u he analysis. The p ep ocessing s ep in ol ed a ious s eps, which a e p ima ily accomplished h ough he u iliza ion o egula ex- p essions. The ollowing s eps a e in ol ed in his s age and desc ibed in de ail in sec ion 4.4. Co pus Anno a ion (P odigy): In his s age, he clinical no es a e anno a ed wi h ele an medical en i ies desc ibed in Appendix A. I is impo an o no e ha he anno a ed no es used in he anno a ion p ocess a e a subse o he no es desc ibed in sec ion 2.2. This p ocess in desc ibed in sec ion 4.5. T ans o me s Ne wo ks (BERT): This s age in ol es he use o ans o me s 36 Chap e 4. NLP Cance Pipeline ne wo ks wi h mul ilingual uncased BERT1 o p ocess he anno a ed co pus. This ne wo k use deep lea ning echniques o lea n om he anno a ed da a and gene a e accu a e p edic ions. Pos -p ocessing (Wo ds simila i y): In his s age, he p edic ions gene a ed by he ans o me s ne wo ks a e pos -p ocessed o imp o e hei accu acy and no malize he esul s. P ima ily, he employs wo d simila i y echniques o accomplish his ask. S uc u ed Clinical No es (mongoDB): In his inal s age, he p ocessed clinical no es a e con e ed in o s uc u ed clinical no es. These no es a e o ganized in o a s anda dized o ma ha can be easily sea ched and analyzed. S uc- u ed clinical no es a e used o se e al applica ions such as clinical decision suppo , popula ion heal h managemen , and quali y imp o emen . Figu e 4.5: Technology pipeline We de eloped a pipeline o e icien ly p ocess la ge olumes o no es by ope - a ing on ba ches, as shown in Figu e 4.6. This app oach op imizes compu a ional e iciency and educes o e head associa ed wi h deep lea ning models. A p esen , he pipeline is only capable o s uc u ing no es in cases whe e he diagnoses wi hin a gi en no e a e no in g amma ical ag eemen . As an example, he clinical judgmen , "p esen a dos ca cinomas uno duc al y o o lobulilla " would no be p ope ly ex ac ed by he pipeline due o he g amma ical ag eemen be ween 1h ps://hugging ace.co/be -base-mul ilingual-uncased 4.3. NCP S ages 37 he e ms "duc al" and "lobulilla ." Al hough he no e indica es ha he pa ien has wo cance s, he pipeline only ecognizes one. In ou assessmen , each diagnosis ep esen s a dis inc loca ion o he cance . Diagnoses ha iden i y mul iple si es a e he e o e conside ed as sepa a e diagnoses. As e idenced by he ollowing no e, he pipeline will ecognize he p esence o wo dis inc diagnoses. 2 ocos: - ca cinoma mucinoso in il an e de 17 mm, g1, e nega i o, p neha i o, he 2 posi i o (3+), ki67 5% - ca cinoma mic opapila in il an e de 28mm, n+, g1, e 90%, p 90%, he 2 posi i o (3+), ki 67 10% In o de o gain a comp ehensi e unde s anding o how he pipeline unc ions, we ha e p o ided a de ailed desc ip ion in he ollowing sec ions. 1 2de ba ch(no es, no es_index): 3 4p ep ocess(no es, no es_index[" ex "]) 5 6classi ica o (no es, no es_index[" ex "]) 7 8s uc _no es =pos p ocess(no es, no es_index) 9 10 dump2mongo_db(s uc _no es) # o JSON db 11 12 i __name__ == "__main__" : 13 14 no es, no es_index =load_db() # om SQL db 15 16 ba chs =[ no es[i:i +ba ch_size] 17 o iin ange(0,len(no es), ba ch_size)] 18 19 h eads =[ Th ead( a ge =ba ch, 20 a gs=(chunk, no es_index)) 21 o chunk in ba chs ] 22 23 o in h eads: 24 .s a () 25 26 o in h eads: 27 .join() Figu e 4.6: Au oma ed pipeline in ba ches 44 Chap e 5. Expe imen s and Resul s Table 5.1: Model hype -pa ame e s Pa ame e Value Seed 8 Accumula e g adien s 3 D opou 0.1 Op imize Adam GPU alloca o Py o ch Ba ch size 2000 Ba ch size bu e 256 Ba ch size disca d o e size T ue Lea n a e wa mup-linea Wa m up s eps 250 Ini ial a e 0.00005 To al s eps 20000 Table 5.2: In o ma ion abou NER co pus Co pus Nega ion and Unce ainly Clinical NER Numbe o okens 324116 38378 Numbe o en i y okens 21091 10280 Pe cen age label okens 6.51% 26.79% dispa i y be ween he numbe o anno a ions and he unique wo ds ( ocabula y size) in igge labels (NegCue, Uce Cue) is mo e p onounced, which p o es ad- an ageous o he model’s lea ning p ocess. This di e gence ensu es an abundan supply o samples, allowing he model o e ec i ely comp ehend he ocabula y. On he o he hand, he e is minimal di e ence obse ed in scope labels (NegScope, Uce Scope), which is expec ed since nega ion and unce ain y can be exp essed in ela ion o any wo d in na u al language. This p esen s a challenging ask o he model, as i needs o accu a ely iden i y and scope wo ds ha i hasn’ encoun e ed in he majo i y o cases. In he Clinical co pus, we obse e signi ican a ia ion in he numbe o anno a ed wo ds among di e en en i ies. The en i ies wi h he highes numbe o anno a ed okens a e Molecula Ma ke and Cance Loca ion, bo h exceeding 1500. In con as , he e a e labels such as Cance In a ype o T ea men F equency, which ha e ewe han 250 anno a ed okens. In addi ion, he Implici Da e label in he clinical co pus is pa icula ly challenging o p edic , alongside he scope labels o Nega ion and Unce ain y. The challenge s ems om he wide ange o g amma ical exp essions u ilized o communica e empo al in o ma ion, o en inco po a ing a ious o ms o empo al ad e bs. These ad e bs can be exp essed in nume ous ways, adding o he complexi y o p edic ing he Implici Da e label in he clinical co pus. Fo example, he occu ence o an e en ha happened yes e day can be exp essed in a ious ways, such as "Aye " (Yes e day), "El día an e io " (The p e ious day), "Un día a ás" (One day ago), "Hace un día" (A day ago) o "En la íspe a" (On he e e). 5.3. Expe imen s 45 Figu e 5.1: G aphical ep esen a ion o Neg Unce Co pus coun ing 5.3. Expe imen s To assess he pe o mance o he p oposed app oach, we employed he well- es ablished s anda d me ics, P ecision, Recall, and F-Sco e ( e e o subsec ion 2.7.1). These me ics we e selec ed due o he i al impo ance o Recall in NER. Inco ec ly iden i ying an en i y can esul in he p opaga ion o alse in o ma ion. The e o e, i is p e e able o e ain om anno a ing an en i y when in doub , a he han anno a ing i inco ec ly, i.e. a high Recall is be e han a high P ecision. To assess he e ec i eness o he Clinical model, 10- old c oss alida ion (see subsec ion 2.7.2) has been selec ed, due o he low numbe o samples om some en i ies. The pe o mance was calcula ed as he a e age o all en olds execu ed by he c oss- alida ion s a egy. To de e mine he ep esen a ion o he media, we calcula e he s anda d de ia ion. The s anda d de ia ion is a measu e o he dis- pe sion o a iabili y in a da a se . A lowe s anda d de ia ion indica es ha he media is mo e e enly ep esen ed h oughou he da a se , sugges ing a balanced dis ibu ion. On he o he hand, a highe s anda d de ia ion implies ha he occu - ence o media ins ances is mo e a iable, indica ing po en ial biases o imbalances in ep esen a ion. In o de o e alua e he pe o mance o he nega ion and unce ain y model, we employed an 80-20 spli . Due o he e enough ep esen a ion o each en i y. This means ha he da a se was di ided in o wo pa s: 80% o aining and 20% o es ing. I is impo an o no e ha spli s a e made in a ie ed manne o ensu e su icien ep esen a ion o each en i y. 46 Chap e 5. Expe imen s and Resul s Figu e 5.2: G aphical ep esen a ion o Clinical co pus coun ing 5.4. Resul s This sec ion p esen s he esul s o he expe imen s desc ibed in he p e ious sec ion. The esul s o he Nega ion and Unce ain y NER model, which ocuses on he iden i ica ion o ou en i ies, a e shown in Table 5.3. Besides, we p esen he esul s ob ained om he Clinical NER model ained on he b eas cance co pus, which includes 21 en i ies. Table 5.4 displays he o e all esul s achie ed by Clinical model. Following ha , we will p o ide he pe o mance me ics o each indi idual en i y, as shown in Table 5.5. 5.4. Resul s 47 Table 5.3: Resul s om Nega ion and Unce ainly Co pus pe en i y ype En i y Type P ecision Recall F-Sco e Nega ion Concep 0.956 0.956 0.956 Nega ion Scope 0.836 0.823 0.829 Unce ainly Concep 0.874 0.846 0.860 Unce ainly Scope 0.748 0.708 0.728 O e all 0.873 0.859 0.866 Table 5.4: Gene al esul s om Clinical Co pus Me ic Mean ±De ia ion P ecision 0.9346 ±0.0123 Recall 0.9366 ±0.0083 F-sco e 0.9356 ±0.0099 Table 5.5: Resul s om Clinical co pus pe en i y ype En i y Type P ecision Recall F-Sco e Cance Concep 0.9806 ±0.0171 0.9732 ±0.0143 0.9767 ±0.0076 Cance Expansion 0.9801 ±0.0173 0.9796 ±0.0222 0.9798 ±0.0178 Cance G ade 0.9325 ±0.0309 0.9373 ±0.0281 0.9347 ±0.0261 Cance In a ype 0.963 ±0.1048 0.9798 ±0.0571 0.9667 ±0.0667 Cance Loca ion 0.9117 ±0.0324 0.9174 ±0.0268 0.9143 ±0.0255 Cance Me as asis 0.9055 ±0.0284 0.9014 ±0.0375 0.903 ±0.0275 Cance Recu ence 1.0±0.0 0.9815 ±0.0524 0.9899 ±0.0286 Cance S age 0.9576 ±0.0341 0.9442 ±0.0412 0.9501 ±0.0265 Cance Sub ype 0.7773 ±0.1789 0.7956 ±0.138 0.7675 ±0.1092 Cance Type 0.9789 ±0.0133 0.9822 ±0.0144 0.9804 ±0.0092 Da e 0.9596 ±0.029 0.969 ±0.0271 0.9641 ±0.0254 Implici Da e 0.7435 ±0.1084 0.7368 ±0.1123 0.7392 ±0.1064 Molec Ma ke 0.9343 ±0.0204 0.9506 ±0.0138 0.9423 ±0.016 Su ge y 0.9296 ±0.0551 0.9328 ±0.0386 0.931 ±0.0455 TNM 0.9019 ±0.0499 0.8916 ±0.0526 0.8965 ±0.0494 T ea men 0.9321 ±0.0336 0.9235 ±0.0547 0.9268 ±0.0356 T ea men D ug 0.9289 ±0.045 0.9397 ±0.0398 0.9335 ±0.0327 T ea men F equency 0.9841 ±0.0449 0.8889 ±0.1757 0.9221 ±0.1109 T ea men In e al 0.9348 ±0.0458 0.898 ±0.0481 0.9148 ±0.0319 T ea men Quan i y 0.9008 ±0.1648 0.8581 ±0.1692 0.8673 ±0.1463 T ea men Schema 0.868 ±0.1098 0.9196 ±0.0823 0.8886 ±0.0749 48 Chap e 5. Expe imen s and Resul s 5.5. Discussion The esul s p esen ed in Table 5.3 o he Nega ion and Unce ain y Co pus p o ide insigh s in o he pe o mance o he p oposed app oach o each en i y ype: Fo Nega ion Concep , he model achie ed a p ecision o 0.956, ecall o 0.956, and an F-sco e o 0.956. This indica es a high le el o accu acy and comple e- ness in iden i ying nega ion concep s. In e ms o Nega ion Scope, he p ecision was measu ed a 0.836, ecall a 0.823, and F-sco e a 0.829. Al hough sligh ly lowe han he p ecision and ecall o Nega ion Concep , he model s ill exhibi ed easonably good pe o - mance in ecognizing he scope o nega ion. Mo ing on o Unce ain y Concep , he model ob ained a p ecision o 0.874, ecall o 0.846, and an F-sco e o 0.860. These esul s sugges ha he e a e ins ances whe e he model does no make accu a e p edic ions. In he case o Unce ain y Scope, he p ecision sco e was 0.748, ecall was 0.708, and he F-sco e was 0.728. The p ecision and ecall alues o his en i y ype a e he lowes among he o he s, causing equen con usion o he model. Conside ing he o e all pe o mance, he p oposed app oach alls sho wi h an a e age p ecision o 0.873, ecall o 0.859, and an F-sco e o 0.866. This indica es ha he e is oom o imp o emen in accu a ely iden i ying nega ion and unce ain y concep s, as well as hei espec i e scopes, ac oss all en i y ypes in he Nega ion and Unce ain y Co pus. The unde -pe o mance could po en ially be a ibu ed o he model being ained on di e en ypes o no es. These esul s sugges ha he model’s pe o mance in his a ea needs o be enhanced o ensu e a mo e e ec i e implemen a ion o he p oposed app oach. The esul s ob ained om he Clinical Co pus in Table 5.4 indica e a high le el o pe o mance o he p oposed app oach wi h p ecision, ecall, and F-sco e sco es consis en ly abo e 0.93. This sugges s ha he model is capable o accu a ely iden- i ying en i ies while cap u ing a subs an ial po ion o he ele an en i ies p esen in he da a. The esul s ob ained om he Clinical Co pus, as displayed in Table 5.5, p o ide aluable insigh s in o he pe o mance o he p oposed app oach o each en i y ype: Fo he Cance Concep en i y ype, he model achie ed a high p ecision o 0.9806, ecall o 0.9732, and an F-sco e o 0.9767. These esul s sugges ha he model demons a es excellen accu acy and comple eness in iden i ying cance concep s wi hin he clinical da a. Simila ly, o he Cance Expansion en i y ype, he model achie ed a p ecision o 0.9801, ecall o 0.9796, and an F-sco e o 0.9798. These sco es indica e a high le el o pe o mance in ecognizing expanded cance e minologies. 5.5. Discussion 49 Table 5.6: Discussion o Clinical NER model En i y F-sco e IV Vocabula y size Cance Concep 0.98 1.00 32 Cance Expansion 0.98 1.00 25 Cance G ade 0.93 0.99 49 Cance In a ype 0.97 0.98 6 Cance Loca ion 0.91 0.98 249 Cance Me as asis 0.90 0.99 31 Cance Recu ence 0.99 0.98 6 Cance S age 0.95 0.99 35 Cance Sub ype 0.77 0.88 26 Cance Type 0.98 1.00 24 Da e 0.96 0.45 540 Implici Da e 0.74 0.33 123 Molecula Ma ke 0.94 0.87 620 Su ge y 0.93 0.99 88 TNM 0.90 0.38 467 T ea men 0.93 0.97 58 T ea men D ug 0.93 0.95 110 T ea men F equency 0.92 0.92 12 T ea men In e al 0.91 0.88 81 T ea men Quan i y 0.87 0.59 36 T ea men Schema 0.89 0.96 19 The Cance G ade en i y ype achie ed a p ecision o 0.9325, ecall o 0.9373, and an F-sco e o 0.9347. These esul s indica e sa is ac o y pe o mance in iden i ying cance g ades wi hin he clinical da a. Rega ding he Cance In a ype, Cance Loca ion, Cance Me as asis, Cance Recu ence, Cance S age, Cance Sub ype, and Cance Type en i y ypes, he model exhibi ed a ying le els o p ecision, ecall, and F-sco e. O e all, he model achie ed ela i ely high sco es, sugges ing i s capabili y o cap u e and iden i y hese cance - ela ed en i ies e ec i ely. Fo en i ies such as Da e, Implici Da e, Molec Ma ke , Su ge y, TNM, T ea - men , T ea men D ug, T ea men F equency, T ea men In e al, T ea men Quan i y, and T ea men Schema, he model demons a ed easonable pe o - mance, as indica ed by he p ecision, ecall, and F-sco e sco es. Examining he pe o mance o di e en en i ies, we ound ha ags wi h low sup- po , such as T ea men Schema, T ea men Quan i y, T ea men In e al, T ea - men F equency, and Cance Sub ype, exhibi ed poo e esul s. Howe e , ags wi h a limi ed ocabula y, such as T ea men o Cance Recu ence, demons a ed highe accu acy, likely due o he model’s abili y o easily lea n hem. We p esen he co - ela ion be ween he IV (Index o Va iabili y) and ocabula y size a iables wi h he 50 Chap e 5. Expe imen s and Resul s F-sco e in Table 5.6. The esul s show ha , in mos cases, a highe IV co esponds o be e classi ica ion pe o mance. Fu he mo e, we no ed ha he Da e label consis en ly ou pe o med he Implici Da e label. The Da e label, being sho e and mo e s uc u ed, ypically included speci ic da es such as "23/02" o "24/03/2023," while he Implici Da e label o en con ained ph ases like " omo ow in he mo ning". In p ac ice, egula exp essions a e commonly employed o ex ac en i ies like Da e o TNM, le e aging hei sha ed s uc u al pa e ns. In o de o ackle he challenges and enhance he o e all pe o mance o he models and hei unc ionali y wi hin he pipeline, we p opose he ollowing ecom- menda ions: Conduc addi ional anno a ion o en i ies ha exhibi signi ican de ia ions. This will in ol e ca e ully iden i ying and labeling ins ances whe e he models s uggle o p oduce inaccu a e esul s. Anno a e he Nega ion and Uce anly labels using he b eas cance co pus. By le e aging a specialized da ase speci ic o b eas cance , we can ine- une he model o be e unde s and and handle nega ion and unce ain y ela ed o his pa icula domain. This a ge ed e aining will lead o imp o ed pe - o mance and accu acy when dealing wi h b eas cance - ela ed in o ma ion. Explo e he inco po a ion o egula exp ession o imp o e en i y ex ac ion in s uc u ed pa e ns such as Da e o TNM, in conjunc ion wi h deep lea ning models. By implemen ing hese ecommenda ions, we can add ess he challenges aced by he models, imp o e hei pe o mance, and enhance he o e all unc ionali y o he pipeline. To es ablish he o de o p io i ies, i is ad isable o ollow he Amdahl’s Law [51], which emphasizes imp o ing modules wi h b oade global impac . In ou case, he Nega ion and Unce ain y model should ake p ecedence since i s e oneous de ec ion leads o he ejec ion o clinical e ms p edic ed by he Clinical NER model. Chap e 6 Conclusions and Fu u e Wo k This p ojec in oduces a deep lea ning-cen ic me hodology o s uc u ing he ex ac ion o b eas cance in o ma ion. Ou p oposal is an au oma ed pipeline, called NCP -NLP Cance Pipeline-, capable o p ocessing clinical no es in Spanish and p oducing a s uc u ed JSON ile. The esul s o his app oach unde sco e he necessi y o clinical NER and he de ec ion o nega ion and unce ain y as he main asks in in o ma ion s uc u ing wi hin he clinical domain. Le e aging deep lea ning-based me hods o he ex ac ion o medical concep s yielded p omising ou comes in p ocessing Spanish b eas cance clinical na a i es. We p oposed an anno a ion scheme Table 4.1, which aims o ex ac de ailed and speci ic concep s o cance diagnosis and ea men s. Thus, his anno a ion schema is aimed a ex ac ing medical concep s and s uc u ing hem. The deep lea ning- based model ained wi h mul ilingual BERT has also shown p omising esul s in de ec ing nega ion and unce ain y in Spanish clinical ex s. Speci ically, we used he scope o nega ion and unce ain y o ex ac ing medical concep s a ec ed by hese linguis ic phenomena. 6.1. Deep Lea ning s. REGEX Machine lea ning models a e conside ed be e o NER han egex, because hey can lea n mo e complex pa e ns and ela ionships in ex da a, and can be e adap o di e en con ex s and a ia ions in he da a. In con as , egula exp essions ely on p ede ined ex pa e ns and a e less lexible in e ms o adap ing o di e en a ia ions in he da a. Howe e , i is impo an o no e ha egula exp essions a e mo e in e p e able1 han deep lea ning ne wo ks o his eason egex is s ill widely used. The p oblem wi h egula exp essions is ha i can be ime-consuming and di icul o de ine pa e ns ha accu a ely ma ch all possible a ia ions o named en i ies. Addi ionally, i may no be able o cap u e named en i ies ha do no 1A model is said o be in e p e able when i is easy o humans o unde s and and explain how i makes p edic ions o decisions based on he inpu da a. 51 52 Chap e 6. Conclusions and Fu u e Wo k ollow a speci ic pa e n o s uc u e. This p esen s a p oblem ha I e e o as " he egex middle poin ". This issue a ises when he ex you’ e ying o ex ac has nume ous a ia ions, and you need a egex ha migh ex ac wo ds you don’ wan . This p oblem e lec s he di icul y o making a egex ha i s exac ly wha you wan . I ’s ecommended o conside he sou ce o he ex be o e deciding on an ex- ac ion me hod. I he ex is machine-gene a ed, egula exp essions ( egex) migh o en be adequa e. Howe e , o mo e complex o na u al language ex , aining a NER model based on deep lea ning could be mo e e ec i e. Fo u he in o - ma ion and guidance on when o employ egex o a deep lea ning app oach, e- e o he ollowing guide: h ps://gi hub.com/explosion/asse s/blob/main/ P odigy/P odigy_NER_ lowcha _ 2_0_0_ligh .pd . 6.2. Fu u e wo k In u u e esea ch s udies, he e a e se e al main a enues o u he explo a ion and in es iga ion in o a ious aspec s o he p oblem. These include: Conside in es iga ing al e na i e language models designed o p ocessing Spanish clinical ex , such as RoBERTa2o RoBERTa Clinical3. Ha nessing he powe o models ha ha e a be e adap a ion o Spanish clinical no es could po en ially enhance he accu acy and e ec i eness o he esul s. Conside cons uc ing ou own language model. Le e aging a p e-exis ing Spanish model as a ounda ion, we can engage in u he p e- aining u ilizing a specialized medical co pus wi h an emphasis on oncology-speci ic language, including con en om scien i ic esea ch jou nals wi hin his domain. This model, once comple ed, could be eleased o he public, ma king a signi ican miles one as he i s Spanish language model wi h a specializa ion in medical cance ocabula y. Enhancing he pe o mance o models ha handle nega ion and unce ain y is c ucial in he ealm o clinical na a i e analysis in spanish. The cu en pipeline is designed o s uc u e no es ha con ain a single diag- nosis. To e ec i ely comp ehend and p ocess no es wi h mul iple diagnoses, an e ec i e app oach could be o u ilize ano he Language Model (LM). This LM could ini ially p ep ocess he no es, conduc ing a p ima y cleanup o he da a. I mul iple diagnoses a e de ec ed, he LM could hen segmen he ex in o dis inc pa ag aphs co esponding o each diagnosis. 2h ps://hugging ace.co/BSC-LT/ obe a-base-bne 3h ps://hugging ace.co/PlanTL-GOB-ES/bsc-bio-eh -es Bibliog aphy Imagina ion is mo e impo an han knowledge. Knowledge is limi ed, while imagina ion is no . Albe Eins ein [1] B. S ini asa-Desikan, Na u al Language P ocessing and Compu a ional Linguis- ics: A p ac ical guide o ex analysis wi h Py hon, Gensim, spaCy, and Ke as. Pack Publishing L d, 2018. [2] C. Allen and T. Hospedales, “Analogies explained: Towa ds unde s anding wo d embeddings,” in In e na ional Con e ence on Machine Lea ning. PMLR, 2019, pp. 223–231. [3] C. Olah. (2015) Unde s anding ls m ne wo ks. [Online]. A ailable: h ps: //colah.gi hub.io/pos s/2015-08-Unde s anding-LSTMs/ [4] Hugging Face, “Hugging ace blog: La ge language model,” h ps://hugging ace. co/blog/la ge-language-models, 2021. [5] A. Zhang, Z. C. Lip on, M. Li, and A. J. Smola, “Di e in o deep lea ning,” a Xi p ep in a Xi :2106.11342, 2021. [6] J. De lin, M. W. Chang, K. Lee, and K. Tou ano a, “BERT: P e- aining o deep bidi ec ional ans o me s o language unde s anding,” NAACL HLT 2019 - 2019 Con e ence o he No h Ame ican Chap e o he Associa ion o Compu a ional Linguis ics: Human Language Technologies - P oceedings o he Con e ence, ol. 1, no. Mlm, pp. 4171–4186, 2019. [7] J. De lin, M.-W. Chang, K. Lee, and K. Tou ano a, “BERT: p e- aining o deep bidi ec ional ans o me s o language unde s anding,” CoRR, ol. abs/1810.04805, 2018. [Online]. A ailable: h p://a xi .o g/abs/1810.04805 [8] R. L. Siegel, K. D. Mille , H. E. Fuchs, and A. Jemal, “Cance s a is ics, 2022,” CA: a cance jou nal o clinicians, 2022. 53 60 Appendix A. Co pus Anno a ion Guide 2. Implici Da e This label is used o ep esen da es ha a e exp essed indi ec ly in he no es h ough ime exp essions Ing esado a u gencias hace 5 días. T a ado con una ci ugía hace 3 años. a amien o neodyud an e has a agos o 2015. ing esada desde 17/08/2022 al 4/09/2020. 3. Cance Concep This label is used o ep esen he di e en ways o e e ing o he e m cance in clinical no es. Mainly e e s o he classi ica ion acco ding o he ype o cell ha becomes cance ous. Mos commons examples: Ca cinoma de mama de echa mul i ocal. Diagnos icada de adenoca cinoma de pulmón de echo. Neoplasia de mama . p esen a nec osis umo al. O he s e ms: ib oma, ib o ecoma, ib oadenoma, mioma, lin oma, sa - coma, leucemia. 4. Cance Expansion ca cinoma de mama de echa mul i ocal. ca cinoma duc al in il an e mama de echa. ca cinoma de mama lobulilla in si u. O he s e ms: in asi o, mic oin il an e, mul icén ico, bi ocal o in il- an e mul i ocal. 5. Cance Type This label ep esen s he subca ego ies o cance acco ding o hei dis inc i e ea u es and cha ac e is ics. Each sub ype may ha e di e en g ow h pa e ns, clinical beha iou , esponse o ea men and p ognosis. The e a e he mos impo an ypes o doc o s. ca cinoma de mama lobulilla in si u. ca cinoma de mama in aduc al. ca cinoma in il an e ipo his ologico no especi ico. O he s e ms: lobula , duc al, apoc ino, neo oendoc ino, endome ioide, adenoide, inespecí ico, en e medad de page , cis oadenoma, iloides. 6. Cance Sub ype This label ep esen s he o he subca ego ies o cance . 61 ca cinoma duc al con encional in il an e mama de echa. ca cinoma mucinoso de mama de echa. O he s e ms: clásico/con encional, medula , papila , ubula , mucosi- no/coloide/mucinoso/mucoso/mucinosa, comedoniano, sólido, c ibi o me, mic opapila , plano, pleomó ico/a, olicula . 7. Cance G ade This label e e s o he g ade o he cance . I may be nuclea o No ingham g ade. In addi ion, ei he he g ade numbe o he exp ession. ca cinoma in il an e inespecí ico g ado his ológico 1 de no ingham po pun uación de 5 (2+2+1). ca cinoma de mama lobulilla in il an e, g2, e 100%. con componen e in aduc al asociado de al o g ado nuclea . 8. Cance In a ype The e a e 4 molecula sub ypes o b eas cance , de ined by he molecula ma ke s. luminal A luminal B HER2 sob eexp esado T iple nega i o 9. Cance Loca ion This label exp esses he o gan whe e he cance mani es s i sel . Ca cinoma lobulilla in il an e en mama izquie da. Ca de mama izquie da cuad an e supe io . ca lobulilla o igen mama io. ca cinoma lobulilla bila e al. mas ec omía de mama de echa. cánce de pulmón. cánce de colon. 10. Cance Me as asis This label includes e ms e e ing o he sp ead o cance o o he o gans. ganglios lin a icos con me as asis. p og ession nodula . in asión pe ineu al. 62 Appendix A. Co pus Anno a ion Guide in il ación lin o ascula . 11. Cance Recu ence This label indica es whe he he pa ien has elapsed a e e adica ion o he cance . Recaída local de echa de ca cinoma lobulilla en no iemb e de 2016. Recidi a local de ca cinoma duc al in il an e de mama de echa. 12. Cance S age This label is used o ep esen he s age o he cance . Mos cance s ha e ou s ages: s ages 0, I (1) o IV (4). S age I ep esen s he ea ly s age and s age IV ep esen s he mos ad anced s age o he umou . These s ages can also be combined wi h he le e s A, B o C as shown below. Adenoca cinoma de mama es adio IV. Ca cinoma escamoso es adio I-B. Cánce de pulmón no mic ocí ico es adio IA. Ca cinoma de mama al menos es adio iii. 13. TNM This label is used o ep esen he s age o he cance using he malignan u- mou classi ica ion: TNM no a ion. This no a ion ep esen s a cance concep using h ee alphanume ic codes: Tumou (T) desc ibes he size o he umou . The le e (N) desc ibes he lymph nodes ha a e a ec ed. The le e (M) is used o ep esen whe he me as ases a e p esen . TNMs a e neoadju an ea men s a wi h y. Pacien e con cánce de pulmón cT3cN3cM1. Ca cinoma de mama T3 N2 M0. 14. Molec Ma ke This label e e s o molecula ma ke s ha a e measu ed in pa ien s, and whose esul can be posi i e, nega i e o a pe cen age alue. Thei s udy p o ides in o ma ion abou he cance and he ea men o be ollowed. This will include: Ho mone ecep o s: oes ogen ( e o e ), p oges e one ( p o p ) o bo h ho mone ecep o s ( h o hh). ki67. Shall be accompanied by a pe cen age. he 2/Neu/E B2/Ce B2. Accompanied by he sign/pending/inconclusi e. Examples: 63 ca cinoma duc al in il an e mama de echa e y p posi i os. adenoca cinoma e 90%, p 95%, he 2 -, ki-67 1%. 15. T ea men This label includes all ypes o ea men ha can be gi en o he pa ien , wi hou going in o any de ail, i.e. only gene ic ea men wo ds. Inicia a amien o con quimio e apia. T a amien o conse ado . T a amien o con ho mona. T a amien o adio e ápico. Le han p opues o quimio e apia que la en e ma ha ehusado. Tiene p e- is o ho mono e apia as la i adiación. a ada con adio e apia adyu an e. 16. T ea men D ug This label is used o iden i y speci ic d ug names used o ea cance pa ien s. Pacien e diagnos icado con ca cinoma, a ado con cispla ino en julio de 2017. Ho mono e apia con anas ozol. En a amien o con he cep ín. Inicia ensayo clínico con axol. a amien o con inhibido es de la a oma asa. 17. T ea men F equency This label e e s o he equency wi h which he ea men is applied. Pacien e que ecibe QT CON Cispla ino 75 mg/m2 cada 21 días. La dosis o al adminis ada ha sido de 50 gy día. 18. T ea men In e al This label e e s o he o al in e al o e which a gi en ea men is admin- is e ed. iene pla ini icado adio e apia y gose elina, amoxi eno du an e 5 anos. po 4 ciclos. xol x4 semanal. 19. T ea men Quan i y I is used o ep esen he dose o a medicine adminis e ed o a pa ien a a gi en ime. 64 Appendix A. Co pus Anno a ion Guide Pacien e que ecibe q con cispla ino 75 mg/m2 cada 21 días. Recibe RT adical de 50 Gy el 15/12/2014. Radio e apia de 60 gy. 20. T ea men Schema This label e e s o egimens o schedules used in chemo he apy o he ea - men o cance . Possible examples include: EP (e oposide and cispla in) FEC ( Fluo ou acil, epi ubicin hyd ochlo ide and cyclophosphamide) AC ( Ad iamycin and cyclophosphamide) ET (e oposide and ca bopla in) ICE (i os amide, ca bopla in and e oposide) CAV (cyclophosphamide, doxo ubicin o ad iamycin and inc is ine). CMF (cyclophosphamide, me ho exa e, luo ou acil). FOLFOX •FOL ( olinic acid o leuco o in) •F ( luo ou acil) •OX (oxalipla in) Examples: a ada con quimio e apia cm . 21. Su ge y This label is used o label cance - ela ed su gical p ocedu es. Examples: Lin adenec omía supe io izquie da. Mas ec omía simple en mama de echa. Realizada umo ec omía en mama de echa. Recons ucción con do sal ancho y p o esis. ci ugía conse ado a con lin adenec omía. mas ec omía de econs ucción de la mama de echa. Appendix B Lis o medical ac onyms This is he lis o ac onyms used in he p e-p ocessing o clinical no es. I is impo an o no e ha hese ac onyms a e no uni e sal, bu a he ha a e speci ic o he doc o s wo king in he hospi al. The lis is he ollowing: ca cance adio e apia ec o oquimio e apia ex aco po ea q quimio e apia h ho mono e apia cse cuad an e supe io ex e no csi cuad an e supe io in e no cie cuad an e in e io ex e no cii cuad an e in e io in e no lsi lobulo supe io izquie do lsd lobulo supe io de echo dcha de echa de de echa izq izquie da ccee cuad an es ex e nos ccss cuad an es supe io es cis ca cinoma duc al in si u 65 66 Appendix B. Lis o medical ac onyms cdi ca cinoma duc al in si u cdis ca cinoma duc al in si u nos inespeci ico ns inespeci ico bcg biopsia del ganglio cen inela bsgc biopsia selec i a del ganglio cen inela bgc biopsia ganglio cen inela bscg biopsia selec i a del ganglio cen inela il in il acion lin o ascula ipn in asion pe ineu al ihq inmunohis oquimica op ope acion gc ganglio cen inela o a amien o neoady neoadyu an e ady adyu an e ap ana omia pa ologica mi econ uccion mama ia in e na x adiog a ia hh ecep o es ho monales d x doce axel p e pendien e Lis o ac onyms EHR: Elec onic Heal h Reco ds, His o ias Clínicas Elec ónicas NLP: Na u al Language P ocessing, P ocesamien o del Lenguaje Na u al NER: Named En i y Recogni ion, Reconocimien o de En idades Nomb adas Clinical NER: Clinical Named En i y Recogni ion, Reconocimien o de En i- dades Clínicas POS: Pa e de la o ación, Pa -o -Speech CLI: Command Line In e ace, In e az de Línea de Comandos BRAT: B a Rapid Anno a ion Tool, He amien a de Ano ación Rápida B a CONLL: Con e ence on Compu a ional Na u al Language Lea ning, Con e - encia sob e Ap endizaje Compu acional del Lenguaje Na u al WHO: Wo ld Heal h O ganiza ion, O ganización Mundial de la Salud AHIMA: Ame ican Associa ion o Medical Reco d Lib a ians and Heal h In- o ma ion Managemen , Asociación Ame icana de Biblio eca ios de Regis os Médicos y Ges ión de In o mación de Salud SERMAS: Se icio Mad ileño de Salud, Mad id Heal h Se ice HCIS: Heal h Ca e In o ma ion Sys em, Sis ema de in o mación de a ención médica HP-HCIS: Heal hca e P o ide - Heal h Ca e In o ma ion Sys em, P o eedo de se icios sani a ios - Sis ema de in o mación sani a ia SELENE: Elec onic Medical Reco d Sys em, Sis ema Elec ónico de Expe- dien e y Regis os Médicos IMDH: IMDH, In e cambio de In o mación Médica y de Salud LSTM: Long Sho -Te m Memo y, Memo ia a Co o Plazo BiLSTM: Bidi ec ional Long Sho -Te m Memo y, Memo ia a Co o Plazo Bidi eccional 67 BERT: Bidi ec ional Encode Rep esen a ions om T ans o me s, Rep esen a- ciones de Codi icado Bidi eccional de T ans o mado es BETO: BERT o Spanish, BERT pa a el Español RoBERTa: Robus ly op imized BERT app oach, BERT Robus amen e Op- imizado GPT: Gene a i e P e- ained T ans o me , T ans o mado P e-en enado Gen- e a i o MLM: Masked Language Modeling, Modelado lingüís ico con másca a NSP: Nex sen ence p edic ion, P edicción de la siguien e o ación LM: Language Model, Modelo del Lenguaje CS: Compu e Science, Ciencia de los Da os AI: A i icial In elligence, In eligencia A i cial CSV: Comma-Sepa a ed Values, Valo es sepa ados po comas JSON: Ja aSc ip Objec No a ion, No ación de obje os de Ja aSc ip Neu al ne wo ks a e a powe ul ool ha can help ans o m heal h ca e and imp o e he quali y o li e o people a ound he wo ld Jensen Huang, ounde and CEO o NVIDIA