1 / 51

Un Tool-box per Lessicografi

Un Tool-box per Lessicografi. Claudio Giuliano ITC-irst giuliano@itc.it http://tcc.itc.it/people/giuliano/research.html. Sommario. Progetto TALES Lessicografia basata su corpora Demo Tool-box per Lessicografi Un caso d’uso: Valutazione del Question Answering. Progetto TALES.

amena
Download Presentation

Un Tool-box per Lessicografi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Un Tool-box per Lessicografi Claudio Giuliano ITC-irst giuliano@itc.it http://tcc.itc.it/people/giuliano/research.html

  2. Sommario • Progetto TALES • Lessicografia basata su corpora • Demo Tool-box per Lessicografi • Un caso d’uso: Valutazione del Question Answering

  3. Progetto TALES • Trattamento Automatico delle lingue Ladina e Sarda • 2000-2003 • Progetto congiunto tra ITC-irst, Istituto Culturale Ladino e Papiros Editziones • Finanziato dalla UE e da enti locali del Trentino Alto Adige

  4. Obiettivi del progetto • Dati • Uniformare il formato dei dati lessicali disponibili • Ricercare/utilizzare standard • Codifica unica • Strumenti • Accesso a corpora • Dizionari elettronici • Analisi morfologica • Correttori ortografici • PoS tagger

  5. Corpora File di Testo File MS Word File XML Uniformare i Dati • XML è usato come linguaggio di rappresentazione dei contenuti Banche Dati/ Dizionari HyperCard FileMaker

  6. Convertire i dizionari in XML <voce> <lemma>briciola </lemma> <cat_lessicale> <gram>sf. </gram> <accezione> <trad>fr&#233;gola, -es</trad> <trad>miz&#224;cola, -es<trad> </accezione> </cat_lessicale> </voce> briciolasf. Frégola, -es; mizàcola, -es.  • Sono state definite DTD specifiche per rappresentare le banche dati e i dizionari

  7. Convertire i corpora in XML <cesDoc> <cesHeader> … </cesHeader> <text> <body> <div type='doc'> <head> REGULAMËNT DE POLIZAI DE CHEMUN </head> <div type='cap' id='1'> <head> Capitul 1 Normes genereles </head> <div type='div1' id=''> <head> Art. 1 Cuntenut dl regulamënt </head> <p id='1.1.1'> 1. La desposizions de chësc...</p> … </div> </div> </body> </text> </cesDoc> REGULAMËNT DE POLIZAI DE CHEMUN Capitul 1 Normes genereles Art. 1 Cuntenut dl regulamënt 1. La desposizions de chësc regulamënt aldò dla L.P. 10 nuvëmber 1993, nr.21, assegurea n servisc de polizai locala bon y efiziënt, regulan l numer di posc’ tl plann dla stieres, l’echipamënt, la cualificazion funzionela, l prufil prufesciunel, l stat iuridich, la funzions y l’ativiteies dla polizai chemunela.  • È stata adottata la DTD definita in CES

  8. Normalizzare la codifica acadęmich, -cs, -ca, -ches accademico; studente universitario. ● C97 acadęmich, -cs, -ca, -ches accademico; studente universitario.● M69 academich (neol.) accademico; studente universitario. (cazét)  <CARD n='60' name='card id 718778'> <FIELD n='1' name='lemma'>acad&#232;mich</FIELD> <FIELD n='4' name='voce'>acad&#281;mich, -cs, -ca, -ches &lt;agg. e smf.&gt; ...</FIELD> <FIELD n='5' name='fonte'>&#9679; C97 acad&#281;mich, -cs,...</FIELD> </CARD> • È stata adottata la codifica UNICODE

  9. Tool-box • Banche dati/Dizionari • Ricerca • Inserimento/modifica (non realizzato) • Corpora • Ricerca di Concordanze • Liste di Frequenze • Ricerca di Collocazioni • Allineamento di testi bi/trilingui

  10. Tool-box (2) • Linguaggi di sviluppo • HTML, JavaScript (client) • Java (server) • Rappresentazione dei dati • XML • Database relazionale

  11. Architettura del tool-box Data Management System Method invocation Query form Query Interpreter Dictionary Processor Corpora Processor Data Access XML HTML Binary Data Index Corpora Database Server Extension Web Browser XSLT Processor

  12. Presentazione dei dati • Un processore interpreta le regole di trasformazione da XML a HTML • La formattazione può essere delegata al client • Possono esistere più stili associati agli stessi dati

  13. Presentazione dei dati (2)   Processore XSLT  XSL XML HTML <voce> <lemma>briciola </lemma> <cat_lessicale> <gram>sf. </gram> <accezione> <trad>fr&#233;gola, -es</trad> <trad>miz&#224;cola, -es<trad> </accezione> </cat_lessicale> </voce> <?xml version="1.0"?> <xsl:stylesheet version="1.0"> <xsl:template match="/"> <html> <head> <title>ID</title> </head> <body bgcolor="#ffffcc"> <xsl:apply-templates select="dizionario"/> </body> </html> </xsl:template> <xsl:template match="voce"> <h3> <xsl:apply-templates select="lemma_sec/lemma"/> </h3> <strike><xsl:apply-templates select="USO"/> <xsl:apply-templates select="GLOSSA"/></strike> <br/> <xsl:apply-templates select="LISTA_CAT_LEX"/> </xsl:template> ... briciolasf. Frégola, -es; mizàcola, -es.

  14. L’interfaccia utente • WEB browser che supporti HTML dinamico • Firefox • Safari • Internet Explorer • ...

  15. Accesso alle banche dati

  16. Accesso ai dizionari

  17. Ricerca di concordanze

  18. Ricerca di concordanze (2)

  19. Frequenze delle parole

  20. Sommario • Progetto TALES • Lessicografia basata su corpora • Token, types, frequenze • Legge di Zipf • Concordanze • Ricerca di Collocazioni • Demo Tool-box per Lessicografo • Un caso d’uso: Valutazione del Question Answering

  21. Tokens, types, frequenze • Token • corpus LA Times 62,790,468 • Type • corpus LA Times 215,738 • Frequenza • numero assoluto di occorrenze • frequenze relativa o normalizzata • frequenza media (fm=token/type) • corpus Repubblica fm=85 • corpus LA Times fm=291 • Frequenza di frequenze (spettro delle frequenze)

  22. Tokens, types, frequenze (2) circa il 50% dei token di un testo sono le parole piu’ comuni

  23. Tokens, types, frequenze (2)

  24. Tokens, types, frequenze (2) circa il 50% delle parole sono hapax circa il 90% delle parole hanno frequenza ≤ 10

  25. Legge di Zipf • Distribuzione di frequenza delle parole nel linguaggio • f · r = k Esempio fatto da Zipf tratto dallo studio lessicale dell’Ulysses di Joyce: al rango 10 la frequenza e’ 2653 al rango 100 la frequenza e’ 265 al rango 1000 la frequenza e’ 26 al rango 10000 la frequenza e’ 26

  26. Legge di Zipf (2) Corpus La Repubblica

  27. Legge di Zipf (3) Corpus LA Times

  28. Concordanze KWIC = Keyword in context

  29. Espressioni regolari • Utilizzate per effettuare ricerche complesse • Una RE descrive un insieme di stringhe • caratteri speciali • ^ $ + ? . * ( ) [ ] { } | \ • Esempi • ^hopef = {hopeful, hopefully, hopefulness, hopefuls} • ing$ = {being, having, solving, …} • hope(full|less) = {hopeful, hopeless} • cars? = {car, cars} • be(ing)? = {be, being} • .* = tutto il vocabolario

  30. Concordanze (2) query = ^comun[ei]$

  31. Ricerca di Collocazioni • Metodi statistici • frequenza • Media e Varianza • Test di ipotesi • Corpus • New York Times • Agosto/Novembre 1990 • 115 MB • 14·106 parole • Capitolo 5, Chris Manning and Hinrich Schütze, Foundations of Statistical Natural Language Processing, MIT Press. Cambridge, MA: May 1999.

  32. Frequenza sentece: a lecturer at the computer science faculty bigrammi: a lecturer lecturer at at the the computer computer science science faculty

  33. Frequenza (2)

  34. Media e Varianza • Frequenza + PoS funziona bene per frasi rigide she knocked on his door they knocked at the door 100 women knocked on Donaldson’s door a man knocked on the metal front door

  35. Media e Varianza (2) 4 tokens sentece: a lecturer at the computer science faculty bigrammi: a lecturer a at a the lecturer at lecturer the lecturer computer at the at computer at science at faculty the computer the science the faculty computer science computer faculty science faculty

  36. Media e Varianza (2) 4 tokens sentece: a lecturer at the computer science faculty bigrammi: a lecturer a at a the lecturer at lecturer the lecturer computer at the at computer at science at faculty the computer the science the faculty computer science computer faculty science faculty

  37. Media e Varianza (3) OFFSET=3 she knocked on his door they knocked at the door 100 women knocked on Donaldson’s door a man knocked on the metal front door

  38. Media e Varianza (2)

  39. Media e Varianza (3)

  40. Test di ipotesi • Alta frequenza e bassa  possono essere casuali • Quando due due parole occorrono insieme più spesso del caso? • Test di ipotesi • lpotesi nulla H0: non c’e’ associazione • Calcoliamo la p che l’evento occorra se H0 fosse vera • rifiutiamo H0 se p e’ troppo bassa • livello di significatività (p<0.05, p<0.01, …)

  41. Test di ipotesi (2) • t-test • Pearson’s chi-squared test • Likelihood ratio

  42. E’ possibile usare Google? • Il Tool-Box cerca al livello di parole • Sono on-line i corpora che ci interessano? • I copora possono essere bilanciati • Le statistiche di google sono affidabili?

  43. Sommario • Progetto TALES • Lessicografia basata su corpora • Demo Tool-box per Lessicografo • Un caso d’uso: Valutazione del Question Answering

  44. Demo • http://localhost:8080/tb2/jsp/concordance.html • http://localhost:8080/tb2/jsp/freq.html • http://localhost:8080/tb2/jsp/collocation.html

  45. Sommario • Progetto TALES • Lessicografia basata su corpora • Demo Tool-box per Lessicografo • Un caso d’uso: Valutazione del Question Answering

  46. QA@CLEF • Multilingual Question Answering (QA) • http://clef-qa.itc.it/ • QA combina IR e NLP • Domanda in linguaggio naturale • Risposta precisa (non un documento) • Nell’ambito di Cross Language Evaluation Forum (CLEF) • NIST TREC QA • ITC-irst & Celct

  47. Tool-Box e CLEF • Corpora in 8 lingue • Creare il set di domande per testare i sistemi di QA • Valutare le risposte date dai sistemi • Domande su 300 topics • “Energia alternativa” • “bancarotta Schneider” • …

  48. Tool-Box e CLEF (2) • Si parte da un topic • Si cercano keywords o keyphrases associate • Utilizzando le concordanze si cercano risposte a possibili domande • In valutazione si usa il tool-box per verificare le risposte

  49. Esempio: “bancarotta Schneider”

  50. Esempio: “bancarotta Schneider” (2)

More Related