Docsity
Top Seller

Computational Linguistics 1 - Passarotti, Appunti di Lingua Inglese

Toggle sidebar
bg1
Lesson 1 - 30/09
INTRODUCTION - BASICS AND HISTORY OF COMPUTATIONAL
LINGUISTICS
WHAT COMPUTATIONAL LINGUISTICS IS (AND IS NOT)
Definition of CL from Wikipedia:
CL is an interdisciplinary field concerned with the
statistical or rule-based modeling of natural language from a computational
perspective, as well as the study of appropriate computational approaches to linguistic
questions.
Modeling = our object is the language. We provide abstract descriptions of some
objects.
In our case an abstract description of language (for example nouns, tense…).
We’re dealing with linguistic data. The technological revolution impacts our language
(not like the other revolutions, for example the industrial one).
CL deals with MODELING (an abstract description of what we deal with, so language)
Large language models (LLMs) —> for example ChatGPT. It describes the language in
an abstract way. It happens in the same way in our mind
Statistical or rule-based modeling, because there’re 2 types of models:
1. Rule-based models: it’s the old-fashioned approach, it’s an abstract description
of language based on rules, since that it’s very rigid (e.g. “
clean
” adj./verb —>
understand from context); to teach it to a computer we have to write a rule e.g. if
it’s followed by a noun then it’s a verb (PoS tagging = assigning a PoS to words —>
grammatical analysis ).
During the first decades of CL, scholars spent a lot of time using rule-based models
(these rules became algorithms, then programs and then language models).
The first NLP (natural language processing) tools were rule-based until the 90s and
they followed the shape “If … , t hen … ”. These tools were pretty good but they
were not the best. English has been a language that dominated the field also
because it’s a morphological poor language, so these types of models prefer
English (that deals with word order unlike other languages)
2. Statistical models: today it rules the world. Machine learning is a way to make
machine learning from data: we expose the machine to linguistic data (the biggest
corpus of language is the web) and then the machine learns regularities from these
data. Statistical process is the real change of the last decade
because we have huge amounts of data, today we have more than 50 million new
tokens on the web, and we also have computational power that can manage these
data.
Empirically based —> the machine doesn’t know the subject, but it learns from
data The process is called induction
We can model language without a computational perspective (= computationally
performing calculations).
We compute the data in order to do some NLP tasks (it’s a very practical field).
We have a lot of linguistic questions and a lot of data in order to try to find some
answers.
We use questions and data to conduct EXPERIMENTS.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54

Anteprima parziale del testo

Scarica Computational Linguistics 1 - Passarotti e più Appunti in PDF di Lingua Inglese solo su Docsity!

Lesson 1 - 30/

INTRODUCTION - BASICS AND HISTORY OF COMPUTATIONAL

LINGUISTICS

WHAT COMPUTATIONAL LINGUISTICS IS (AND IS NOT)

Definition of CL from Wikipedia: CL is an interdisciplinary field concerned with the

statistical or rule-based modeling of natural language from a computational

perspective, as well as the study of appropriate computational approaches to linguistic

questions.

Modeling = our object is the language. We provide abstract descriptions of some objects. In our case an abstract description of language (for example nouns, tense…). We’re dealing with linguistic data. The technological revolution impacts our language (not like the other revolutions, for example the industrial one). CL deals with MODELING (an abstract description of what we deal with, so language) Large language models (LLMs) —> for example ChatGPT. It describes the language in an abstract way. It happens in the same way in our mind Statistical or rule-based modeling, because there’re 2 types of models:

  1. Rule-based models : it’s the old-fashioned approach, it’s an abstract description

of language based on rules, since that it’s very rigid (e.g. “ clean” adj./verb —>

understand from context); to teach it to a computer we have to write a rule e.g. if it’s followed by a noun then it’s a verb (PoS tagging = assigning a PoS to words —> grammatical analysis ). During the first decades of CL, scholars spent a lot of time using rule-based models (these rules became algorithms, then programs and then language models). The first NLP (natural language processing) tools were rule-based until the 90s and they followed the shape “If … , then …”. These tools were pretty good but they were not the best. English has been a language that dominated the field also because it’s a morphological poor language, so these types of models prefer English (that deals with word order unlike other languages)

  1. Statistical models : today it rules the world. Machine learning is a way to make machine learning from data: we expose the machine to linguistic data (the biggest corpus of language is the web) and then the machine learns regularities from these data. Statistical process is the real change of the last decade because we have huge amounts of data, today we have more than 50 million new tokens on the web, and we also have computational power that can manage these data. Empirically based —> the machine doesn’t know the subject, but it learns from data The process is called induction We can model language without a computational perspective (= computationally performing calculations). We compute the data in order to do some NLP tasks (it’s a very practical field). We have a lot of linguistic questions and a lot of data in order to try to find some answers. We use questions and data to conduct EXPERIMENTS.

Linguistics collects data, in fact ChatGPT exists thanks to data (we all provide these data). But it’s NOT a democratic system. CL is not the same as digital humanities. Digital Humanities was created in 2004 when “The companion to digital humanities” was published. DH is broader than CL (for example it deals also with history, philosophy and so on). The tile of that state of the art could also have been “Humanities Computing”. They had to choose between these two titles. But at the time digital was attractive. The difference is that computation is a method and digital is a format. Formats change, but methods don’t change. Now the term computational humanities is replacing digital humanities. THE MISSION OF CL

• To formally describe (so to model) natural language for developing and

programming tools for various NLP (in Italian it is TAL = trattamento automatico del linguaggio) tasks, for instance writing a formal rule of grammar is a way to formally describe natural language. So the aim of CL is to develop tools that automatically perform some natural language tasks, such as PoS tagging, designing the syntax of a sentence, machine translation, semantic role labelling. Usually different tasks were done in different stages with different models, now ChatGPT when being prompted does all the tasks together since it was trained thanks to a LLM

• To use NLP tools for building, analyzing and querying large amounts of linguistic

data (written, spoken, audio, video):

- building —> we use a tool to generate new texts

- analyzing —> for example extracting keywords from a text, topic modeling or

sentiment analysis (it can be used for politics, economy…)

- querying —> asking questions to the machine in order to extract the data we want

• Practical outcomes: T9, Google (Semantic Web), NLU, NGL, Siri, Alexa, WhatsApp.

Siri uses speech recognition and performs linguistics analysis on our texts; its answer is speech synthesis NLU = Natural Language Understanding NLG = Natural Language Generation THE IMPORTANCE OF MODELING - THE PROCESS OF ABSTRACTION Modeling means to abstract representation of phenomenon, it’s an action of formal abstraction of data, linguistic knowledge ChatGPT is a modeling that describes in an abstract way the object that is the language, it’s based on LLMs

• Model : the abstract (it can be applied to other situations) representation of

linguistic knowledge to simulate the human linguistic performance (research as imitation of nature). AI simulates our behavior using language, which is what makes us humans. Language in fact is a typical human property. For the first time in history there’s a dissociation between language and the mind, thoughts. We have to generalize to create a model. Prediction is everything in AI. Models change over time. Language data changes reflect the changes in our world. The answers that ChatGPT gives us are a reflection of our society, because they’re based on the data we put on the web. We have data and we train a machine with the scope to have an abstract

All this leads to a new science which is Linguistic Data Science. WHAT IS LINGUISTIC DATA SCIENCE (LDS)?

Definition of LDS with the one of CL = “ using the methodology of data analysis and

computational science to solve theoretical and empirical problems that were not fully

explained by previous research and to develop new ways of doing linguistic research

discovery and theorization of new linguistic facts through processing a large amount

of linguistic data”

Today with a PC we can process a large amount of linguistic data. Data science processes data especially from a statistical point of view. We do the same thing but with linguistic data instead, to solve theoretical and empirical linguistic problems.

Empirical linguistic problems = for example machine translation, summarization,

clustering of emails of bank costumers (= categorizing the emails) and so on. These are practical problems provided by linguistic data, since for example emails are written. So, we want to solve automatically theoretical and empirical linguistic problems, using a large amount of data. Processing uses a lot of data to train data-driven fashion a model to perform some data (I use a model to process new data). Nexus Linguarum It’s a project (cost actions) founded by European Commission. A bunch of scholars at international level collaborate for finding a way to make the distributed linguistic data science. LDS = subfield of “data science” that provides a formal basis to the analysis, representation, integration and exploitation of linguistic data for:

- language analysis > syntax, morphology, terminology

- language applications > machine translation, speech recognition, sentiment analysis

With linguistic data we can: analyze them, represent them, integrate them and exploit them. All of this for 2 main aims:

  1. Language analysis : for building linguistic resources. It means to provide linguistic data with some levels of meta-linguistic description, for example syntax, morphology, lexicon… There are many layers of analysis. Discrete (representation) means that these layers are treated separately. We can have one model for many tasks
  2. Language applications : speech recognition, machine translation, sentiment analysis LINGUISTIC DATA SCIENCE NEEDS:

- Implicit representation of linguistic features : it’s more difficult to understand

this idea rather than the explicit. It deals with statistics, distributional semantics and embeddings. In this type of representation, words are not represented by an explicit tag (noun; gender = masculine), but they’re represented by sequences of numbers. Words having similar sequences of numbers are similar. Words tend to have something in common if they behave similarly in data. We have a collection of data and we say that words like Rome, Paris and New York behave similarly and share some common context, so they are represented by a similar sequence of numbers

- Explicit representation of (linguistic) data : for instance words, grammar

categories, senses, concepts, ontologies (= formal descriptions of what exists, of a

piece of reality), dictionaries, terminologies. We can say if a text is made of words. Formal descriptions of a piece of reality are made of explicit classes. There’re also subcategories between categories and so on. We abstract and provide a formal abstract representation of a piece of reality LDS is at the point of joining computer science, linguistics, mathematics, statistics and linguistic data. This is the reason why, there will be no more separations between hard science and humanities. ALAN TURIN (1912-1954) He worked on different topics:

  1. Cryptanalysis : Bomba (UK) vs Enigma (G): Bomba was the machine that tried to translate the encrypted massages into understandable messages; Enigma was the German machine that encrypted messages. This is a first experiment of machine translation, it’s very difficult because you don’t know the codex, the source language since it’s encrypted. So, Alan Turin developed a machine that was able to translate something meant to be encrypted into something understandable
  2. Turin Machine : an abstract machine that manipulates symbols on a strip of tape memory according to a table of rules. The machine operates on an infinitive memory tape divided into cells, where “symbols” are written (we can move from a cell to another cell by using a rule). Turing understood that a machine can understand data through a symbolical representation of rules: this approach is based on rules ruled until the late 90s with big collection of data; as a tool for knowledge building. We must formalize our linguistics problems in order to use a machine and make it process the language. In 1945 Alan Turing built the first electronic digital computer (here digital meaning technologic), which is a “universal practical machine” where any kind of data is considered a symbol (digital vs analogic), universal because with symbols we can represent any kind of data
  3. Artificial Intelligence (based on regularities, not on rules): Turing (at his time machines were calculators) created the first symbolic computer, a universal practical machine is considered a symbol. With symbols we can create any type of data (video, audio …) on these bases Father Busa started thinking about linguistic data. The idea was that mathematics was not the only possible field of application CHALLENGING VIEWS FROM THE WORK OF TURING Between 30s and 60s there were substantial fundings for the Cold War (wars are always great opportunities for research of new technologies, since countries spend a lot of money to have better technologies than their enemies). Russians and Americans exchanged documents at that time, they had to translate and so there were fundings for machine translation. During those years there were confidence and fears in technology and after the war there was positivism. Today the three challenging views of Turing are translated into practical NLP tasks: the cryptanalysis is basically machine translation, which works very well. The Turing machine is now our computer. So the idea of having machines able to perform linguistic analysis similar to what a human being does is not new. The Turin machine is a tool for knowledge building. To process any kind of object with a computer forces to formalize it and thus, to deeply understand functioning. FATHER ROBERTO BUSA He was born in 1913 and he died in 2011. He’s the pioneer of CL.

CORRESPONDENCE - SUPPORT LETTER

In the late 40s Father Busa met Watson and in those years Father Busa started to send letters around the world asking colleagues to provide him with some support regarding his project. In the Father Busa’s archive at University Cattolica we have some letters, which basically focus on the fact that after the publication of the Index Thomisticus, it could be possible to access the data of Thomas Aquinas like never before. CORRESPONDENCE … BUT SOMEONE IS SKEPTICAL

Through these letters in the archive, we can see that there were also some skeptical letters like for example a letter from a Jesuit of Loyola University in Los Angeles. In this letter they didn’t understand why Busa wanted to analyze all the words, so both content words and function words (which don’t have a meaning in themselves). Through some of these letters we can see that humanities and hard sciences were considered two different things, but right now this separation doesn’t make same anymore, now they’re strictly related. This letter from Los Angeles shows this separation since they believed that building the Index Thomisticus was just a mechanical labour, but it’s not because every time we try to make a computer process automatically, linguistic data, this compasses us to deeply understand the language, so the linguistic data that we have to process. It’s an intellectual labour and not just a mechanical one. In the letter the Jesuits didn’t understand that the project needed a deep understanding of the linguistic data. At that time, it was a new idea to create a collection of all words of a text from an author. We have to deal with all the empirical documentation that we want to make research on. Father Busa said that research in the humanities is sometimes like Matelda , a young woman who Dante and Virgilio meet in the Paradiso Terrestre. She picks up flowers randomly in a field and Father Busa said that sometimes humanities researchers are like her because use just some samples of data and on the basis of those samples, build their own intuitions. Instead, computational linguists want to know how many flowers are there, meaning how many and which type of data they deal with. It’s a methodological way of research. It’s not only that all data are considered, but also the fact that the whole process must be replicable : we put someone in the condition of redoing what we did for our research. Someone can trust us, but can also check if what we did is correct or not. This is the scientific method , which requires the replicability of the process. Replicability makes the humanities really a scientific field. Most researches in the humanities so far haven’t been replicable.

- Practical limitations —> limitations of mechanical memory: computers were not very

powerful and processing a lot of data took a lot of time (days)

- Size and complexity of linguistics facts —> formalizing language for a computer

compels you to expand your own language

L’automazione del linguaggio scritto aspetta qualche cosa dallo sviluppo delle

tecniche, ma attende molto di più dall’industriosità spirituale dell’uomo. La macchina

ci fa avvertiti che noi siamo troppo poco umanisti; che noi parliamo, ma non sappiamo

dire come parliamo.

È la deprecata macchina che ci ripete l’invito «Conosci te stesso ancora più

profondamente e più scientificamente e più umanisticamente: studia il tuo parlare»

Processing language with a computer requires to be even more humanist. It compels us to understand ourselves. We must understand in detail our object of research, language. Sometimes the most conservatives of humanists consider machines like monsters. They consider automation applied to literary science as something brutal. Thanks also to CL hard sciences and humanities started to communicate again. Some of the questions from Father Busa couldn’t be answered at his time because they worked with just samples of data. They couldn’t do Treebanks, tagging or summarization (embeddings = put together words based on grammatical category). Today we can partially answer the requests from Father Busa. He believed that the revolution of processing language makes us aware that we have too little knowledge and language knowledge. He also believed that this revolution would have had a great impact on the economic world with the processing of a big amount of data. It’s not just a matter of science, it’s also a matter of quality. We can process data like never before and this impacts on economics. Transforming an idea in a practical methodology to use in a production in series would have had an impact on the economic field. Great ideas needed to be transformed in a methodology to be used in a series production. There’re intellectual problems, and we have to cast them as experiments. We also must raise a new linguistic awareness. Father Busa also talks about production, exchange and defense. And he’s not talking about humanities here but about economics, and socio-politics. They require information retrieval (finding quickly the information that we need). Father Busa said that we’re going towards a society that will be surrounded by data and so information retrieval will be crucial (today it’s offered by Google). We need to know statistical information about our data in a more systematic, humanistic and useful way. CL for Busa needed to be more formal, more helpful. It’s a matter of quality and not just a matter of speed. In order to have a better quality of the atomizing process of linguistic data, we need a process that creates interpretation of the empirical evidence produced by data. In 1983 Father Busa said that CL will be able to perform automatic analysis of a huge amount of linguistic data. And that is exactly what we’re living today. FATHER BUSA’S MAIN AIM Computers are not only meant to speed up operations or minimize the work of researchers or obtain the same level of quality as before. We don’t have to repeat the same tasks as before in a quicker way, instead we have to enhance the quality and depth of research. We want to change methodology of processing linguistic data. GREAT EXPECTATIONS In the 50s there were great expectations. They used punched card, which were made

through specific machines. In the 60s Father Busa punched the all Opera Omnia of Thomas Aquinas.

Lesson 4 - 07/

ALPAC REPORT

1966 is a fundamental turning point in history of CL. After the Second World War, when the Cold War started, one of the first aims of computational linguistics was machine translation (MT) for Cold War purposes, translating from English to Russian and reverse, so the US funded research for machine translation for almost 20 years, expending a lot of money. In 1966 a committee was launched to make a point on the state of the art of MT: the government wanted to know if all this funding had some results or not.

The committee was called ALPAC Committee , the Automatic Language Processing

Advisory Committee (1966) was set and produced a report about the state of the art of

machine translation in the area of what today we call computational linguistics. David Hays, one of the ALPAC members, is said to have named the discipline, but the origin of the name is something obscure. This committee in the report said that MT was still a too high-level task for the state of the art of CL and computational linguists were not able to perform it, they couldn’t perform automatic MT. So, the dream of MT was radically stopped in 1966 after the ALPAC report. But this made the community realize that they needed to work on the very fundamental layers of linguistic analysis, so on the automatic processing of levels like morphology, syntax, lexicon and so on. Therefore, the ALPAC report didn’t stop the funding to CL at all, it stopped the funding just to MT. MT is a very difficult task and today we’re not completely able to do it completely right. In 1966 they started again from the fundamentals of CL dividing them in layers and following a discrete method of analysis, so the tasks were separated into many different tasks. In current LLMs like ChatGPT instead we have a continuous analysis: there’s just one model that performs all the layers. The impact of the ALPAC report was so huge that in 1968 the name of the international association of computational linguistics was changed: from AMTCL

( Association of Machine Translation and Computational Linguistics) to ACL

( Association of Computational Linguistics), so machine translation disappeared from

the name of the main world association.

And there were changes also in the names of some journals: the Machine Translation

and Computational Linguistics was renamed in American Journal of Computational

Linguistics in 1974 and then in 1980 simply in Computational Linguistics.

This is a very turning point in CL: in the 40s there was a great confidence in machines, but in the 60s they understood that they couldn’t do everything with machines yet. So they started again from the basic layers. From the 60s until 10 years ago, CL worked on single tasks. Today with LLMs and AI, things have changed. IBM MEETING 1972 (PISA)

Computers have problems with homographs ( danno = synonym of ruin or verb to

give?)

BEST PRACTICES

• Aut omnia aut nihil = take it all or nothing. We cannot use samples of data to do our

researches, instead we have to use the whole text in order to have a full overview. Father Busa wanted an empirical analysis of data in order to make some intuitions

• Vel … vel vs aut … aut = in many cases CL is not an aut … aut but a vel … vel,

meaning there’re grey areas especially dealing with linguistics facts. For example, a participle can be a noun, an adjective or a verb. We need to decide the criteria to assign values (everything deals with the confrontation of data) THE CENTRAL ROLE OF DATA Data is everywhere and so we have to:

• know our data : we’re living a time when we can process data without actually

knowing them (for example we can process a text in Chinese without knowing the language) but it depends on the type of task we have to do. It’s good to perform some close reading before and after distant reading: close reading is the classical reading, one word after the other, distant reading is reading the text according to its quantitative features (for example the level of lexical richness)

• respect (and fear a little) our data : we never know what can be there, which

makes it difficult and makes the rule-based approach so poor in terms of accuracy

because language isn’t an “ If …, then”

• love our data : it’s all we have in order to perform better

• validate our data : quality check of the output, NLP outputs must be checked, we

don’t have to trust them blindly. We have to know the accuracy rate and the reliability of the NLP toll. We must validate the data and check their quality

• explain our data : the documentation of a corpus tells us which were the criteria in

analyzing, but the Perspectivist Approach: we live in the time of open data science. Before corpora were private treasures and they weren’t shared. Today corpora are openly accessible to others. It’s not just a matter of democracy, but it’s also a vicious cycle, because if I publish a corpus, other people can improve my work

• share our data : we live in the time of open data science

RE-WORDS

We’re cast in intellectual problems into experiments. In many cases research in the humanities means research dealing with data. And most of these data are linguistic data, that can be studied with a machine. To do an example we must follow the scientific method, also in the humanities

• Repetition : it’s the most strict; it means running the exact same approach under

the same conditions to arrive at the same output result. I have to put the others in the condition to replicate exactly what I say

• Replication : replicating the same answer to a given research question by

difference means (by evaluating an algorithm on a new dataset). The question and the approach are the same. I can change the data and use the same method. It’s the same experiment but on a new set of data

• Reproduction : the experiment is the same, but the set up is different, so I follow a

different approach

• Reuse : getting not only to different output results but also to different scientific

results. The experiment is different, as just some parts of it remain the same (tools, scripts, data). We reuse some parts of an experiment in another one

Nobody has a knowledge of language to be fully confident in processing it with a computer. Empirical results are just the starting point to do something else. The challenge is not to do things faster, but better (it’s a matter of quality). We’re not dealing with Digital Humanities but with Computational Humanities and not with Digital Linguistics but with Linguistic Computing:

- Digital Humanities is contemporary humanities, it’s related to the use of

contemporary technologies but it’s limited. In this field they work exactly like before but with machines

- Computational Humanities is a methodology based on computation. Machines

are tolls that require a new methodology. It represents a major departure from traditional research in the humanities CLIMBING THE PYRAMID DIKW pyramid (also known as the DIKW hierarchy, wisdom hierarchy, knowledge hierarchy, information hierarchy, information pyramid and data pyramid) refers to a class of models for representing structural and/or functional relationship between data, information, knowledge and wisdom.

  1. Data : a set of machine-readable data; for instance, a text recorded in a machine- readable format
  2. Information : structured data according to data models. For example, an excel table or the punched card. The web is a huge collection of structured data. Computers for decades have been used to extract and retrieve information from structured dataset. Today we are living a revolution because computers have knowledge
  3. Knowledge : meaningful correlations between information. We put different information together. Today LLMs and AI have knowledge
  4. Wisdom : the understanding of knowledge and the application of this understanding at the right time in the right way. Machines don’t understand what they know, not like us humans Today machines move up one step in the pyramid because they have knowledge now. The challenge for humans is to beat machines in wisdom and not in knowledge. We’re wiser but we know less than machines. We have to address a more difficult challenge in CL than before, because in the past machines didn’t have knowledge, but now they do and have much more knowledge than us. THE WORLD OF CL Some acronyms of CL:

• ACL : Association of Computational Linguistics, the most important association in the

world; it holds a conference each year and the acceptance rate of papers is 25%

• ILC-CNR : Italian Institute of CL based in Pisa, funded by Antonio Zampolli, who was

the pupil of Father Busa

• CLiC – it (2014) & AILC (2015): Italian Conference of CL in Italy & Associazione

Italiana di linguistica computazionale

• IJCoL (2015): Italian journal about CL, today it’s a top journal

• Evalita (2007): the evaluation of Italian NLP tools; it’s an evaluation campaign that

is basically a competition on a shared NLP task; it’s very important to get recognition There are many conferences in the CL community, also because the community is very young and dynamic. Some of the conferences are:

- Conil : a conference on natural language learning; it’s related to one of the most

used data formats in CL

- IREC : it started in the 90s and became bigger; it has very important sponsors like

Google

• Partial corpus : there’re just samples of texts. Before it was a problem having fully

corpora because of the limited memories of computers. Today everybody collects full texts A corpus can be static or dynamic:

• Static corpus : a finished corpus that is not updated anymore

• Dynamic corpus : an updated corpus (like the web). This type is better because

language is constantly changing LEXICA AND DICTIONARIES

• General LR : almost all words basically (e.g. Treccani)

• Domain-specific LR : just words of a specific field

Most of them are annotated : words linked to metadata that describe the words, like for example the definitions in dictionaries ONTOLOGIES They’re explicit representations of the relations of words and concepts (it’s like the Aristotelian taxonomy). Words are organized in categories and there’re relations between these categories, e.g. in WordNet words are collected in synsets CLARIN

Common Language Resources and Technology Infrastructure

It’s a way to find LR, it’s a language infrastructure, a big repository where people can store resources. There are also:

- Clarin Virtual Language Observatory: we can search resources

- Clarin Language Resource Switchboard: a collection of tools to process data and

perform some NLP tasks

Lesson 6 - 09 /

(ANNOTATED) CORPORA TREEBANKS

CORPUS

Sinclair’s definition, 2004: “ A corpus is a collection of pieces of language text in

electronic form, selected according to external criteria to represent, as far as possible,

a language or language variety as a source of data for linguistic research.”

To select the text that enters our corpus, Sinclair says that we must follow the external criteria.

- internal criteria: criteria of selection of text that are internal to the specific aim,

research project. In this case, we build the corpus for the aims of a specific research topic

- external criteria: it’s better to select data according to the external criteria.

We don’t have to select texts for the specific aims of a research process. A corpus shouldn’t be designed by the linguists working on a specific phenomenon, but by experts in the communicative patterns of the linguistic community USING CORPORA IN LINGUISTICS

Tognini and Bonelli in 2001 make the distinction between corpus-based and corpus- driven approach to the use of corpora in linguistic research. Corpus-based approach : it’s pretty related to the competence; here the data provided by corpora is used to confirm/refine/reject intuition-based linguistic theories. We already have our theory, that is built following our intuition, our competence, which is applied before the use of data. There’re 3 different approaches:

  1. insulation: the most theoretical one, theories are built in a fully intuition fashion (we don’t use any data while developing our thesis) and are tested on corpus evidence
  2. standardization or enrichment: it’s an empirical approach, performed by testing a theory by annotating (assigning some labels) corpus evidence. It’s also called enrichment because we enrich the data with some metadata related to our linguistic theory
  3. instantiation: it’s a paradigmatic approach; data are possible, alternative choices. There’s a strict connection between theoretical markedness (= we’re representing a structure using an order that is not the usual one) of a choice and its “ranking” in a corpus. Some choices are more chosen than others. Given a number of choices, the choices that are lower in the ranking, that is to say that are less frequent, are more marked (something that is not expected, which surprises us) Corpus-driven approach : it’s based on performance; it’s an inductive approach. This is the approach most used in CL and today at the highest level of AI. Linguistic theories fully reflect the empirical evidence of the corpus and are developed by induction: we don’t do nothing, we leave the machine induce the regularities out of the corpus, the machine gives us some regularities by induction and the linguist’s knowledge (intuition) is applied later. CORPUS ANNOTATION It’s the practice of enhancing a corpus with metadata , so data that describe other data under some point of view. For instance, we have sequences of words, so raw data and to each of these words we assign a label about its PoS (noun, verb, adjective, article, etc) and the labels for the PoS are the metadata. We’re enriching our corpus —

enrichment annotation Many different kinds of metadata:

- editorial : metadata that record the relation between the corpus and its source;

insertions/omissions, corrections, normalizations must be recorded, meaning that for instance manuscripts use abbreviations very often and if we want to solve the abbreviations in the transcription, we must register that in the original source there were abbreviations and that in the transcription we have used its resolution

- descriptive or classificatory information: metadata that record information

about bibliographic info, author, year, language, etc

- administrative or documentary information : metadata that describe files, tag

sets, data availability, revision status, owner, etc. Tag sets = set of tags, also called labels, which are those used to record metadata; for instance for PoS we can use a label like noun (n), verb (v), adjective (a), and we have to explain that n corresponds to noun, v to verb and a to adjective

• Semantic annotation : SRL stands for Semantic Role Labelling, which means

assigning labels like agent, patient, beneficent, mean, instrument. WSD stands for Word Sense Disambiguation: to disambiguate the meaning, so the sense of a word in each context WHY ANNOTATING? There’re theoretical purposes :

- Theory-Data comparison: we have the theory and we want to compare it with data,

to refine, to reject, to confirm our theory

- Hidden features: we assign features that are properties we assign to tokens and

then we try to discover if there’re hidden features, so patterns of dependence, correlation among features. For instance, very often the fact that a noun precedes a verb calls the feature adjective. They’re hidden feature, we understand them from data There’re practical purposes :

- Training of NLP tools: we need a corpus with PoS in order to train the PoS tags; we’re

not following the rule-based approach, but the corpus-driven approach

- Limited set of terms to handle large collections of data: for instance, a corpus can be

made by 1 million tokens; the number of lemmas in that corpus will be probably around 20 thousand and so we’re reducing the number of things we deal with ANNOTATION DESIDERATA

- speed: important, but not so important because whenever we annotate data, we

don’t need to be the fastest as ever, but we don’t have even to be the slowest so we must find a way to be sufficiently fast. Usually there’re some tools that help us like for instance an annotation interface, some NLP tools that perform the tasks for us

- consistency: very important; we must annotate always in the same way, because if

the same linguistic phenomenon is not always annotated, whenever we query the corpus searching for that phenomenon, we won’t find the occurrences of that phenomenon, since queries search for patterns. For instance, we can run a query that searches for all the words that are assigned the label “noun” and in the output we expect exactly this, but if we have assigned to some nouns the label “noun” and to some others the label “n”, this is a problem

- depth: meaningfulness

This needs:

- clear workflow and user-friendly applications (interfaces)

- a group of human annotators (cross-checking = comparing thought the calculation

of the inter annotator agreement)

- source theory

Lesson 7 - 14/

IN-LINE & STAND-OFF ANNOTATION

One of the things that concerns corpus linguistics is data format, meaning the different ways in which we can recall and store our data and metadata. There’re 2 different kinds of recording data and metadata, so 2 different kind of data formats:

  1. In-line annotation : all annotation layers are stored just in one file (layers = different levels of linguistic annotation, such as morphology, PoS, lemmatization

and syntax). One advantage is that it’s easy manageable. One drawback is that it’s not easy to manage big data.

  1. Stand-off or distributed annotation : it’s formed by as many files as are the annotation layers or the style of the annotation layers = each of the layers corresponds to one file. Actually, we can also have different annotations of the same layer. The pros are:
  • it’s clear-cut, meaning that layers are clearly separated in different files
  • it’s separable
  • it’s multiple, meaning that we can have different annotations for the same layer and so we can focus only on the layer(s) we’re interesting in One drawback is that we need to build cross-indexes that link layers to other layers, we need to assign IDs, identifiers to all the elements IN-LINE ANNOTATION - EXAMPLE

The sentence is “ Forma enim dicitur esse principium essendi;” = “ Form indeed is said

to be the principle of being;” - from SCG (Summa contra Gentiles), 1.

Now let’s see how the metadata of this sentence are recorded. Here we’re dealing with a treebank , which is a syntactic annotated corpus and in which we usually have the following layers of annotation: lemmatization, morphological tagging, PoS tagging and syntactic tagging. The annotation of syntax in treebanks is recorded in the form of rooted graphs, in other words in the form of trees. The relations between words in this sentence are represented in the form of tree and this representation is recorded here in the In-Line annotation. Let’s read it:

- letters between < > are called elements

- elements are followed by values of elements ( forma, enim, …), so the element is a

container and the value is the content: a container is called “ f” and it includes the

content “ forma”

- <s = specific kind of element called s, which includes in itself not a value, but an

attribute of the element, which specifies some properties of the element. s stands for sentence , which is assigned the id that is the unique identifier of the sentence in the corpus. It says that it’s the fifth text of the corpus SCG (005.SCG), LB1 = book 1, CP-2++6 = chapter 26, N.-4 = number 4, 4-3. 5-2 = the sentence goes from the third word of the fourth line to the second word of the fifth line

- means form

- forma, enim, dicitur, esse, principium, essendi are the words that correspond to the

tokens that are in the sentence

- is the lemma