La presentazione è in caricamento. Aspetta per favore

La presentazione è in caricamento. Aspetta per favore

INFORMATICA UMANISTICA B DA DATI NON STRUTTURATI A DATI STRUTTURATI: LINGUAGGI DI MARCATURA XML TEI.

Presentazioni simili


Presentazione sul tema: "INFORMATICA UMANISTICA B DA DATI NON STRUTTURATI A DATI STRUTTURATI: LINGUAGGI DI MARCATURA XML TEI."— Transcript della presentazione:

1 INFORMATICA UMANISTICA B DA DATI NON STRUTTURATI A DATI STRUTTURATI: LINGUAGGI DI MARCATURA XML TEI

2 AGGIUNGERE STRUTTURA A DATI NON STRUTTURATI USANDO LINGUAGGI DI MARCATURA In questa lezione e la prossima discuteremo di come sia possibile usare LINGUAGGI DI MARCATURA come XML per rendere parzialmente strutturati dati testuali Oggi: aggiungere struttura a testi Prossima lezione: aggiungere informazione semantica

3 LINGUAGGI DI MARCATURA Permettono di aggiungere informazione (annotare) un testo Due tipi di informazione: Aspetto (formattazione, disposizione degli elementi sulla pagina) HTML Struttura logica XML

4 TIPI DI LINGUAGGI DI MARCATURA Procedurali (TeX, LaTeX, nroff, troff) Indicano alla macchina la procedura di formattazione da seguire per un certo testo Generici o dichiarativi (SGML e discendenti) Dichiarano la funzione LOGICA del testo

5 TeX e LaTeX The quadratic formula is $-b \pm \sqrt{b^2 - 4ac} \over 2a$ \end

6 a XML SGML HTML XHTML WML MathML ……

7 SGML Sviluppato nel 1986 da Charles Goldfarb Obiettivo: sviluppare uno standard per lINTERSCAMBIO di testi Consente di definire marcatori (TAGS) che permettono di strutturare un testo ed i loro ATTRIBUTI Utilizzato per: BNC OED

8 STRUTTURA SGML NEL BNC TROUSERS SUIT There is nothing masculine about these new trouser suits in summer 's soft pastels. Smart and acceptable for city wear but soft enough for relaxed days TAG ATTRIBUTO

9 DTD La specifica degli elementi e dei loro attributi in un documento SGML costituisce la DEFINIZIONE DEL TIPO DI DOCUMENTO o DTD

10 HTML Un linguaggio di marcatura basato su SGML (una DTD SGML) Tipo di elementi e fissato

11 LINGUAGGI DI MARCATURA: HTML My first HTML Hello, World!

12 XML Una versione semplificata di SGML sviluppata dal W3C Come in SGML, ed a differenza di HTML, le TAG non sono predefinite ma definite usando un DTD o SCHEMA

13 ALBERI I documenti SGML, HTML ed XML hanno una struttura ad ALBERO

14 DOCUMENTI XML HANNO UNA STRUTTURA AD ALBERO Must have a UNIQUE root element

15 LA STRUTTURA AD ALBERO DEI DOCUMENTI HTML (ED XML) My first HTML Hello, World!

16 LA STRUTTURA AD ALBERO DEI DOCUMENTI HTML html headbody titlep

17 ACCESSO AD UN ALBERO html headbody titlep figlie madre

18 XML PER LA STRUTTURA LOGICA DI TESTI Peanut butter on a spoon Peanut butter Stick a spoon in a jar of peanut butter, scoop and pull out a big glob of peanut butter.

19 ALBERI + ATTRIBUTI IN XML verse Seest thou yon dreary Plain, forlorn and wild, poem title = Paradise Lost author = jm year= 1667 verse

20 ATTRIBUTI IN XML TITLE: Paradise Lost AUTHOR: John Milton YEAR: 1667 Seest thou yon dreary Plain, forlorn and wild, The seat of desolation, void of light, Save what the glimmering of these livid flames Casts pale and dreadful?

21 ATTRIBUTI Elements can contain one or more attributes 881607 Names are case sensitive The values of the attributes must be enclosed within single or double quotes (either both single or both double) Attributes cannot be empty (name only) No attribute can be repeated twice within an element

22 BASI DATI IN XML: RUBRICA Giulio Cesare Bruto 10 Roma 10100 321654 32557684785 Giovanni Pompeo Catilina 12 Milano 12100 96877564 3356545342

23 RUBRICA COME ALBERO

24 XML e DATABASE Invoice = { date : "2008-05-24" invoiceNumber : 421 InvoiceItems : { Item : { description : "Wool Paddock Shet Ret Double Bound Yellow 4'0" quantity : 1 unitPrice : 105.00 } Item : { description : "Wool Race Roller and Breastplate Red Double" quantity : 1 unitPrice : 75.00 } Item : { description : "Paddock Jacket Red Size Medium Inc Embroidery" quantity : 2 unitPrice : 67.50 } } }

25 XML E DATABASE 421 2008-05-24 Wool Paddock Shet Ret Double Bound Yellow 4'0" 1 105.00 Wool Race Roller and Breastplate Red Double 1 75.00 Paddock Jacket Red Size Medium Inc Embroidery 2 67.50

26 TEXT ENCODING INITIATIVE Uniniziativa internazionale per sviluppare standards per larchiviazione di testi Inizi: 1987 Standard basato su SGML agli inizi, ora XML Definizione : http://www.tei-c.org/release/doc/tei-p5-doc/en/Guidelines.pdf

27 TESTI IN FORMATO TEI [informazioni della testata TEI] [materiali dell'avantesto] [testo unitario] [materiali annessi]

28 TEXT ENCODING INITIATIVE una testata TEI, codificata come (frontespizio elettronico), che raccoglie la serie delle informazioni paratestuali e metatestuali di riferimento (descrizione dell'esemplare elettronico, di quello cartaceo di riferimento, delle norme di codifica seguite e delle revisioni effettuate) il testo vero e proprio, marcato con l'elemento, suddiviso in tre elementi: (avantesto: frontespizio dell'esemplare cartaceo di riferimento e materiali introduttivi come prefazioni, dediche, sommari, introduzioni, indici etc.) (corpo del documento, a sua volta strutturato in partizioni significative del componimento, variabili a seconda della tipologia: testo in prosa, in versi, testo teatrale, ecc.) (materiali annessi come glossari, indici, note, bibliografie, colophon etc.)

29 TEI Header.........

30 Lelemento contiene tutte le informazioni bibliografiche

31 TEI HEADER: titleStmt Two stories by Edgar Allen Poe: a machine readable transcription Poe, Edgar Allen (1809-1849) compiled by James D. Benson

32 TEI HEADER: publicationStmt Oxford University Press Oxford 1989 0-19-254705-5 Copyright 1989, Oxford University Press

33 TEI HEADER: IL PRINCIPE Il Principe Machiavelli Niccolò …. Prima edizione ca. 200 kb ….. Bologna 1 ….

34 KING LEAR IN FORMATO PROJECT GUTENBERG Kent. Now by Apollo, king, Thou swear'st thy gods in vain. Lear. O vassal! miscreant! [Laying his hand on his sword.] Alb. and Corn. Dear sir, forbear! Kent. Do; Kill thy physician, and the fee bestow Upon the foul disease. Revoke thy gift, Or, whilst I can vent clamour from my throat, I'll tell thee thou dost evil.

35 KING LEAR IN FORMATO TEI Kent Now by Apollo, king, Thou swear'st thy gods in vain. Lear O vassal! miscreant! Laying his hand on his sword. Alb. and Corn. Dear sir, forbear! Kent. Do; Kill thy physician, and the fee bestow Upon the foul disease. Revoke thy gift, Or, whilst I can vent clamour from my throat, I'll tell thee thou dost evil.

36 TEI: JANE EYRE CHAPTER 38 READER, I married him. A quiet wedding we had: he and I, the par- son and clerk, were alone present. When we got back from church, I went into the kitchen of the manor-house, where Mary was cooking the dinner, and John cleaning the knives, and I said – 'Mary, I have been married to Mr Rochester this morning.' The housekeeper and her husband were of that decent, phlegmatic order of people, to whom one may at any time safely communicate a remarkable piece of news without incurring the danger of having one's ears pierced by some shrill ejaculation and subsequently stunned by a torrent of wordy wonderment. Mary did look up, and she did stare at me; the ladle with which she was basting a pair of chickens roasting at the fire, did for some three minutes hang suspended in air, and for the same space of time John's knives also had rest from the polishing process; but Mary, bending again over the roast, said only --

37 Text markup Reader, I married him. A quiet wedding we had: he and I, the parson and clerk, were alone present. When we got back from church, I went into the kitchen of the manor-house, where Mary was cooking the dinner, and John cleaning the knives, and I said — Mary, I have been married to Mr Rochester this morning. The housekeeper and her husband were of that decent, phlegmatic order of people, to whom one may at any time safely communicate a remarkable piece of news without incurring the danger of having one's ears pierced by some shrill ejaculation and subsequently stunned by a torrent of wordy wonderment. Mary did look up, …

38 ARCHIVI BASATI SULLA TEI Biblioteca Italiana: www.bibliotecaitaliana.it Electronic Text Center: etext.lib.virginia.edu Humanities Text Initiative: www.hti.umich.edu Oxford Text Archive ota.ahds.ac.uk

39 LA BIBLIOTECA ITALIANA

40 XML – DTD – XSL Un file XML specifica il contenuto Un DTD o SCHEMA specifica la SINTASSI Un file XSL specifica come VISUALIZZARE

41 IDEE PRINCIPALI LEZIONE DI OGGI Linguaggi di marcatura XML Struttura ad albero Attributi Text Encoding Initiative Archivi basati sulla TEI

42 LETTURE Tomasi, cap. 4 Linguaggi di Marcatura XML TEI: Tutorials: Gentle introduction to XML http://www.tei-c.org/release/doc/tei-p5- doc/en/html/SG.html TEI-LITE http://www.tei-c.org/Guidelines/Customization/Lite/teiu5_split_en.html


Scaricare ppt "INFORMATICA UMANISTICA B DA DATI NON STRUTTURATI A DATI STRUTTURATI: LINGUAGGI DI MARCATURA XML TEI."

Presentazioni simili


Annunci Google