Yan Chunxiao
email: yanchunxiao@yahoo.fr

Modyco

Marine Courtin
email: marine.courtin@sorbonne-nou-velle.fr

What can we learn from natural and artificial dependency trees

This paper is centered around two main contributions : the first one consists in introducing several procedures for generating random dependency trees with constraints; we later use these artificial trees to compare their properties with the properties of natural trees (i.e trees extracted from treebanks) and analyze the relationships between these properties in natural and artificial settings in order to find out which relationships are formally constrained and which are linguistically motivated. We take into consideration five metrics: tree length, height, maximum arity, mean dependency distance and mean flux weight, and also look into the distribution of local configurations of nodes. This analysis is based on UD treebanks (version 2.3, Nivre et al. 2018) for four languages: Chinese, English, French and Japanese.

Introduction

We are interested in looking at the linguistic constraints on syntactic dependency trees to understand what makes certain structures plausible while others are not so plausible. To effectively do this kind of work, we need to observe natural trees (syntactic trees that are the results of linguistic analysis) to see what this population looks like. Similar work has been done for example by [START_REF] Jiang | The effects of sentence length on dependency distance, dependency direction and the implications-based on a parallel English-Chinese dependency treebank[END_REF] on the relation between sentence length, dependency distance and dependency direction. But observing natural trees only has its limits : we cannot see what is special about them and their properties, and we cannot distinguish the effects of the various constraints that affect them. We can only observe the structures that are the result of all these constraints and their interactions. On the other hand, if we start from a blank canvas, randomly generated trees, and incrementally add constraints on these trees, we might be able to study one by one the effects of each constraint, and to progressively add them to get closer to natural trees. Using artificially generated trees can also be insightful to determine which constraints are formally motivated (they are a result of the mathematical structure of the tree) and which constraints are linguistically or cognitively motivated. Research in the line of Gildea and Temperley (2009) who have used random and optimal linearisations to study dependency length and its varying degrees of minimization can help us to discover constraints that would be helpful to explain why we only find a small subset of all potential trees in syntactic analyses on real data.

Our objective is therefore twofold: first we want to see how different properties of syntactic dependency trees correlate, in particular properties that are related to syntactic complexity such as height, mean dependency distance and mean flux weight, then we want to find out if these properties can allow us to distinguish between artificial dependency trees (trees that have been manipulated using random components and constraints), and dependency trees from real data.

Looking into the properties of syntactic dependency trees

Features

In this work we use the five following metrics to analyze the properties of dependency trees: Two nodes in a dependency relation are at distance 1 if they are neighbours, distance 2 if there is a node between them etc. For every tree, we look at the mean of those dependency distances. See [START_REF] Liu | Dependency Distance as a Metric of Language Comprehension Difficulty[END_REF] We chose these properties because we believe that they all interfere in linearization strategies, that is how words are ordered in sentences, and the effects of those linearisation strategies. Recently, there have been many quantitative works [START_REF] Futrell | Large-scale evidence of dependency length minimization in 37 languages[END_REF][START_REF] Liu | Dependency Distance as a Metric of Language Comprehension Difficulty[END_REF]) that have focussed on dependency length and its minimization across many natural languages. In complement to these linear properties we also use "flux weight", a metrics proposed by [START_REF] Sylvain Kahane | What are the limitations on the flux of syntactic dependencies? Evidence from UD treebanks[END_REF] which captures the level of nestedness of a syntactic construction (the more nested the construction is, the higher its weight in terms of dependency flux). In their paper, they claim the existence of a universal upper bound for flux weight, as they have found it to be to 5 for 70 treebanks in 50 languages.

In addition to these tree-based metrics, we propose to look at local configurations using the linearised dependency trees. To look at these configurations, we extract and compare the proportion of all potential configurations of bigrams (two successive nodes) and trigrams (three successive nodes). For bigrams, we have three possible configurations: a -> b which indicates that a and b are linked with a relation on the right, a <b which indicates that a and b are linked with a relation on the left, and a ♢ b, which indicates that a and b are not linked by a dependency. For trigram configurations (a, b, c), the possibility is much wider and we obtain 25 possible configurations. There are projective configurations like: a -> b -> c, (a -> b) & (a -> c), (a -> c) and (b <-c), but also non-projective cases like: a <-c and b -> c.

Hypotheses

In this section, we describe some of our hypotheses concerning the relationship between our selected properties. First, we expect to find that tree length is positively correlated with other properties. As the number of nodes increases, the number of possible trees increases including more complex trees with longer dependencies (which would increase MDD) and more nestedness (which would result in a higher mean flux weight). The relationship with maximum arity is less clear, as there could be an upper limit, which would make the relation between both of these properties non-linear. We are also particularly interested in the relationship between mean dependency distance and mean flux weight. An increase in nestedness is likely to result in more descendents being placed between a governor and its direct dependents, which would mean an overall increase in mean dependency distance.

For local configurations, we know that in natural trees, most of the dependencies occur between neighbours, see for example [START_REF] Liu | Dependency Distance as a Metric of Language Comprehension Difficulty[END_REF], the proportion varying depending on the language. It will be interesting to see how much that is still the case in the different random treebanks, depending on the added constraints.

For trigrams of nodes we are interested in the distribution of four groups of configurations that represent four different linearization strategies: "chain" subtrees that introduce more height in the dependency tree in with both dependents in the same direction, "balanced" subtrees that alternate dependents on both sides of the governor, "zigzag" subtrees which are similar to chains but with the second dependent going in the opposite direction as the first one, and "bouquet" subtrees where the two dependents are linked to the same governor (see examples in Figure A1 in the Appendix). If one group of configurations is preferred in natural trees compared to artificial ones, it could indicate that there exists some linguistic and/or cognitive constraints that make the configuration more likely to appear. We are also interested in the hypothesis advanced by [START_REF] Temperley | Dependency-length minimization in natural and artificial languages *[END_REF] who proposes that languages that strongly favor head-initial or head-final de-pendencies will still tend to have some short phrases depending on the opposite direction, which could constitute a way of limiting dependency distances.

Random tree generation with constraints

In this section we will look at random dependency tree generation with constraints. We distinguish two different steps in the dependency tree generation process : the generation of the unordered structure, and the generation of the linearisation of the nodes. Throughout this generation process, we limited ourselves to projective trees. In order to compare the properties of natural and random trees we used 3 different tree generating algorithm, to which we assign the following names : original random (1), original optimal (2) and random random (3).

The first algorithm "original random" samples an unordered dependency structure from a treebank (i.e the original structure), and generates a random projective linearisation for it:

1. We start the linearisation at the root. 2. Then, we select its dependent nodes [1,2,3] and randomly order them, which gives us [2,1,3]. 3. We select their direction at random, which gives us ["left", "left", "right"], and the linearisation steps [0], [20], [120], [1203]. 4. We repeat steps 1 through 2 until every node has been linearized, which gives us (for example)

[124503].

The second algorithm "original optimal" also samples an unordered dependency structure from a treebank, but instead of generating a simple projective linearisation, we add a second constraint to minimize dependency distances inside the linearised dependency tree. The idea comes from [START_REF] Temperley | Dependency-length minimization in natural and artificial languages *[END_REF]: to minimize dependency distances in a projective setting, dependents of a governor should be linearized alternatively on opposing sides of the governor, with the smallest dependent nodes (i.e those that have the smallest number of direct and indirect descendants) linearized first. Using the same structure unordered tree as in fig. 1 we described the procedure below:

1. We start the linearisation at the root. 2. Then, we select its dependent node [1,2,3] and order them in order of their decreasing number of descendant nodes, which gives us [1,3,2]. 3. We select a first direction at random, for example "left", and order these nodes alternating between left and right, which gives us these linearisation steps [0], [10], [103], [2103]. 4. We repeat steps 1 through 2 until every node has been linearized, which gives us for example [425103].

The third algorithm "random random" is the only one to implement two random steps : first generate a completely random structure, then linearize it following the same procedure as in algorithm 1). The unordered structure generation step is described in fig 2. 1. We start the generation process with a single node 2. We introduce a new node and randomly draw its governor. For now, since there is only one potential governor, the edge has a probability of 1. 3. We introduce a new node and randomly draw its governor. There are two potential governors which gives us a probability 0.5 of drawing the node 0 and the same probability for the node 1. These potential edges are drawn in green on the graph. 4. We repeat this last step until all nodes have been drawn and attached to their governor.1 . These tree generation algorithms are only some of the many possible algorithms that could be implemented, but they us give us tools to analyze how different generation strategies will affect the properties of the generated trees, as we incorporate more and more constraints into the two generation steps. They are also easily extensible, for example during the linearisation process we could introduce a probability of creating a head-final edge, to produce trees that resemble more the trees of a head-final language like Japanese. For the unordered structure generation, we could introduce a constraint to limit length, arity or height. We need to distinguish constraints that happen during the unordered structure generation step and constraints that have to do with linearisation, like constraints on dependency distances and on flux weights.

One question that still remains concerns the ordering of the two steps : unordered structure generation and linearisation generation. So far we have only implemented the full generation starting with the generation of the unordered structure and then moving on to the linearisation, which is a synthesis approach as described in Meaning-Text-Theory [START_REF] Mel | Dependency syntax: Theory and Practice[END_REF], but it would be interesting to go in the analysis direction, starting with a sequence of nodes, and then randomly producing a structure for it. This could allow us to see how generation algorithms impact the distribution of trees, especially as we add constraints into the generation. We could then see if one type of random generation (synthesis vs analysis) produces structures that resemble natural dependency structures more, or if they introduce biases towards some types of structures.

Results and discussion

Correlation between properties

For each pair of properties presented in section 2.1 we measured the pearson correlation coefficient to find out the extent to which the relationship between these variables can be linearly captured. We looked into these results for the different natural treebanks ("original") and the artificial ones ("original random", "random random" and "original optimal"). Tables presenting the full results are showcased in tables 1-4 in appendix, with rankings for the correlation between parentheses.

Based on these results, we notice that mean dependency distance and mean flux weight are overall the most correlated properties with values ranging from 0.70 (jp_pud, "original") to 0.95 (fr_partut, "original optimal"). This can be explained by the fact that mean flux weight increases as the number of disjoint flux increases, which in turn tends to create longer dependencies than structure with few disjoint flux. An interesting observation about this correlation is that it is intensified in all the artificial treebanks, and is the strongest in the "original optimal" version. Introducing a dependency distance minimization constraint will Figure 2: Random tree generation favour shorter dependencies, which provides less opportunities for configurations that introduce disjoint flux. Therefore the mean flux weight will also decrease.

If we look at the the correlation between length and height, we find that it is strong in original structures (0.78 correlation) as well as in the random ones (0.71 correlation in "random random", which is the only format in which the height of the tree is affected by the manipulation). This means that the relationship between these two properties is not motivated by linguistic factors only. From a mathematical point of view, longer sentences have the potential to introduce more hierarchy which increases the height. Thus, there is a correlation between these two properties regardless of wether the structure is natural or random. [START_REF] Zhang | Interrelations among Dependency Tree Widths, Heights and Sentence Lengths[END_REF] have proposed that the relationship between these two properties in natural treebanks of English and Chinese can be described by a power law. Further examination could tell us if it is also the case for randomly generated trees, or if the relationship is better modelled by another type of function.

We also find quite strong correlations between mean dependency distance and height in the artificial treebanks (0.76, 0.79, 0.72 respectively for "original random", "original optimal" and "random random") while this correlation is less important for the natural treebanks (0.46). It is quite interesting that the correlation decreases in the original trees. Our interpretation is that perhaps there is a more complex relationship at play between height and mean dependency distance in real data that cannot be linearly captured, and this complex relationship would be altered by the random components when generating the various artificial trees, especially as we relinearize the nodes.

Distribution of configurations

In this section we look at the distribution of local syntactic configurations by extracting trigrams and looking at their dependency relations. First we look at the non-linearized configurations : a→b→c and b←a→c, to analyze the differences in local structures between natural and randomly generated trees. Then we analyze the distribution of the four different groups presented in section 2.2, and how tis distribution is impacted by language and the type of treebank (natural and artificial). We will discuss here a few points and present the full results in appendix.

In fig 3, we can see the distribution of non-linearized configurations for one example language, French. For the "random random" trees, we have 45% of b←a→c configurations and 55% of a→b→c configurations. For all other treebank types, the first configuration is by far the most frequent one. This will likely have some repercussions in the distribution of linearized configurations.

We also observe that the results are fairly similar across all 4 languages, with "original optimal" showing the most unequal distribution (80%-20% respectively for b←a→c and a→b→c configurations), followed by "original" and "original random" (around 60%-40%, although there is some variation depending on the language). One possible explanation for favouring b←a→c could be that it helps minimizing dependency distances, since it can lead to "balanced" configurations which are the optimal way to arrange dependents whithout introducing longer dependencies. If that is the case, we will see a high proportion of "balanced" configurations when we look more in detail at how these configurations are linearized. Another line of explanation could be that having too many a→b→c configurations introduces too much height in the trees, which could be a factor of complexity that natural languages try to avoid whenever possible. Differences between "original optimal", "original random" and "original" can be explained by the linearization process: the optimal trees tend to favour shorter dependencies, which means that a higher percentage of triplets of nodes will all be connex, while non-optimal trees will sometimes linearize the nodes further away, thus excluding them from the extraction of triplets. It would be interesting to see if the distribution is similar when we look at all configurations of triplets and not just at local ones.

We then go on to look at these configurations once they have been subdivided according to the classification proposed in section 2.2. Note that the configurations "bouquet" and "balanced" are a result of the b←a→c configurations and that a→b→c will produce either "chain" or "zigzag". We show the distribution for French in fig 4. First we comment the results that are stable across languages: "random random" trees have a slight preference for "chain" and "zigzag" as a result of the preference for b←a→c configurations, but inside each group ("chain" and "zigzag" / "bouquet" and "balanced") the distribution is equally divided. The "original optimal" trees have a very marked preference for "balanced" which is to be expected because alternatively ordering dependents of a governor is the prefered strategy to minimize dependency length. Next we find "zigzag" configurations, followed by "bouquet" and very few "chain". Contrary to the potential explanation we advanced for the high frequency of b←a→c configurations, "balanced" configurations are not particularly frequent in the original trees (23% in Chinese, 14% in English, 21% in French and 27% in Japanese), especially when compared to the "bouquet" configurations (37%, 52%, 48%, 30% respectively). Bouquet configurations are much more frequent in the natural trees than in the artificial ones. We have yet to find a satisfactory explanation for this. Even if we know that some arbitrary choices in the UD annotation scheme inflate the percentage of bouquet (conj, fixed and flat relations are always encoded as a bouquet), this does not seem sufficient to explain the difference with the other configurations. We also remark that, if we were to use a schema with functional heads most of these "bouquet" configurations would become "zigzagz" or "chain", so we could potentially find an explanation by investigating there. For the optimal model, the bouquet is not an optimal strategy to minimize dependency distances, so the bouquet configuration will, of course, be less critical in the optimal model.

Compared to the other languages, Japanese has an interestingly high percentage of "zigzag" configurations. This can be partly explained by the segmentation used in the Japanese treebanks. The particles and agglutinated markers (for polarity, aspect, politenesss...) have been annotated as separate tokens, which often creates many dependents on a single governor. A lot of these dependencies fall outside the trigram windows and are excluded from our analysis. Japanese being a head-final language, the configurations captured will often contain a head-final dependency (obj, acl, nmod...) and a marker of the dependent, which means that it will often fall into the "zigzag" bin. Nonetheless "bouquet" are still quite frequent as a governor often has several marks, and "balanced" capture nominal modifiers or compounds, and their case or topic marker.

Conclusion

In this paper we introduced several ways to generate artificial syntactic dependency trees and proposed to use those trees as a way of looking into the structural and linguistic constraints on syntactic structures for 4 different languages. We propose to incrementally add constraints on these artificial trees to observe the ef-Figure 4: Trigram configurations distribution for French fects these constraints produce and how they interact with each other. We limited ourselves to generating projective trees, which we now realize was a very strong constraint that strongly restricts the types of structures available, and therefore the variations of the different observed properties, and think that it would be interesting to also look at the result when allowing non-projective edges.

To expand on this work we would also like to see how the observed properties and the relations between them are affected by the annotation scheme, in particular contrasting schemas where content words are governors (as is the case in UD) and schemas where function words are governors (for example using the SUD schema proposed by Gerdes et al. ( 2018)), as it will have an impact on height, dependency distances, and the types of configurations that can be extracted from the treebanks.

In the present paper, we have looked at local syntactic configurations through the extraction of sequences of nodes (pairs and triplets). However these configurations are not representative of all configurations inside the trees, as some syntactic relations are more likely to appear in more global configurations. In the future, we plan on looking at these larger configurations by extracting subtrees and analyzing their distribution. We also intend on digging deeper into the analysis of the present data, and propose predictive models that could help us clarify the relationship (whether they be linear or not) between the different features in order to build a more solid basis to verify our hypotheses and propose explanations for the observations we made.

Figure

  Figure 1: unordered tree

Figure 3 :

 3 Figure 3: Non-linearized trigram configurations distribution for French

Table 1 :

 1 Tree-based metrics

		information about this property.	for more
	Mean flux weight	Mean of the number of concomitant disjoint depen-dencies (Kahane et al. 2017; see comments below)

Note that this algorithm gives us a uniform probability on derivations, but that some derived trees are more probable than others, for example if the length of the tree is 4 we only have 1 derivation to obtain a tree of height 4,

and 2 derivations to obtain a tree with 2 dependent on the root and 1 on one of these dependents.


Evangelia Adamou

Corpus linguistic methods

Keywords: corpus linguistics, corpus-driven, contact linguistics, language contact, multilingual corpora, bilingual, annotation, codeswitching

Introduction

Corpus linguistics is a methodological approach that takes an empirical stance to the study of language. It relies on the analysis, whether qualitative or quantitative, of a body of written texts or transcriptions of spontaneous or semi-spontaneous speech. Corpus linguistic methods have a potentially strong impact on theory as they can offer support or challenge theoretical assumptions. They can also help improve our understanding of previously described linguistic phenomena and can reveal new topics of investigation that had hitherto gone unnoticed. Moreover, corpus linguistics is closely related to various fields of applied linguistics, for example through the elaboration of pedagogical tools.

More specifically, in contact linguistics, a corpus-driven approach based on ecologically valid data allows for the examination of the constraints and social significance of bilingual speech. In addition, in experimental approaches to bilingualism, natural corpus data are used as basic frequency data in combination with the controlled data which are produced in a laboratory environment.

Overview of existing corpora and their relevance to contact linguistics

The use of corpus linguistic methods in the various sub-fields of linguistics largely depends on practical issues related to the availability of corpora or the ease with which a corpus can be built and searched. This section presents a brief overview of existing corpora and the ways in which they can be explored for language contact.

Written corpora

Written corpora have become fairly easy to compile thanks to the widespread use of computers and the internet. As a result, large electronic corpora of formally written speech, often comprising literary and journalistic texts, are currently available online for a variety of languages. For example, several million-word corpora exist even for small national languages (such as Albanian 1 ) and minority languages (such as Basque 2 and Soviet Romani 3 ). Electronic corpora aim to provide users with the tools to conduct online or offline searches, not only for word frequency but also for collocations, concordances, and n-grams following the model of well-developed English corpora. 4Despite this considerable progress in corpus compilation, sizeable corpora from a variety of speakers and sources are still restricted to a small number of major communication languages. [START_REF] Anand | Widening the Net: Challenges for Gathering Linguistic Data in the Digital Age[END_REF] observe that 85% of the data that are part of the Linguistic Data Consortium5 represent only five languages, i.e.: English, Chinese, Arabic, Spanish, and Japanese.

From a contact linguistic perspective, language contact phenomena are relatively limited in formal written texts of national languages. In contrast, informal written texts, compiled from social media and text messages (SMS), may provide information on a wider range of contact phenomena, such as codeswitching.

Spoken corpora

Spoken corpora are of special interest to linguists focusing on contact as they potentially include a wide range of contact phenomena and may reveal information about the cognitive processes involved in the production and comprehension of bilingual speech. Large spoken corpora of adult language have been constituted on the basis of scripted or unscripted speech from TV and radio broadcasting (an example in point is the British National Corpus).6 Some smaller corpora provide transcripts and recordings of free-speech conversations (e.g., Santa Barbara corpus of Spoken American English 7 and Switchboard Corpus). 8 Most of these corpora, however, do not target interactions between bilinguals and can at best provide evidence for the study of borrowings.

Linguists interested in bilingualism and its short-and long-term effects have compiled new corpora involving adult bilingual speakers, whether from (post-)colonial settings, traditionally bilingual communities, or migrant communities. In order to document the most ordinary way of speaking recordings of unscripted speech were made either in natural conditions or during interviews, preferably conducted by community members. These recordings combine with corpora from scripted speech and transcripts of TV and radio broadcasting. However, we note that in most of the cases these corpora are not made available for the members of the scientific community.

Spoken corpora from endangered languages

A promising contribution of corpus linguistics to the study of language contact phenomena may be its growing use in language documentation initiatives. Indeed, corpora from endangered languages are increasingly being compiled and made available online. Examples include the Endangered Language Archive (ELAR), 9 the DoBeS Archive (Documentation of Endangered Languages), 10 the PARADISEC Archive (Pacific and Regional Archive for Digital Sources in Endangered Cultures), 11 the AILLA Collection (The Archive of the Indigenous Languages of Latin America) 12 and the Pangloss Collection. 13

Sign language corpora

In the past decades, research on sign languages has been on the increase, typically relying on video corpora of signed interactions (see, e.g., the Sign Language corpus at the Language Archive). 14 As summarized in Adamou et al. (in press), there are three types of research studies on bilingual sign language: (i) research on sign bilingualism that focuses on the study of bilinguals who use a sign language and a spoken language in its written form, (ii) research on bimodal bilingualism of hearing individuals who use a sign language and a spoken language, and (iii) research on code-switching that looks at bilinguals who use more than one sign language.

Bilingual acquisition corpora

Spoken language corpora have held a privileged position for both first and second language acquisition studies. Bilingual acquisition has been explored through methods ranging from parental diaries to extensive recordings of natural speech. Examples can be found in the Child Language Data Exchange System (CHILDES). 15 2.6. Learner corpora Spoken or written learner corpora such as the International Corpus of Learner English (ICLE) 16 are increasingly used to explore the effects of an L1 on an L2 (or an L3). Learner corpus research not only contributes to theories of second language acquisition, but also plays an important role in applied linguistics through the elaboration of new pedagogical tools (see Granger, Gilquin and Meunier 2015).

Parallel corpora

The term "multilingual corpora" covers what is also known as "parallel corpora", consisting of a body of texts translated in different languages which are aligned across languages, e.g. the European Parliament Proceedings Parallel Corpus. 17 Parallel corpora are mainly used for research in contrastive linguistics and translation studies. They also have great impact in translation training and in the development of translation tools for language learners. The Multilingual Student Translation project, which started in 2016, aims to compile a new, large multilingual student translation corpus that will bring together the two research paradigms, i.e.: learner corpus research and corpus-based translation studies.

Transcription tools and annotation

In contact linguistics, corpus-based research is a rapidly growing field, but the development of bilingual corpora is associated with specific challenges. Indeed, despite considerable progress in the development of automated techniques, bilingual corpora remain extremely challenging for Natural Language Processing technologies, i.e.: automatic speech recognition, parsing, machine translation, information retrieval and extraction, and computational processing (see [START_REF] Çetinoğlu | Challenges of computational processing of code-switching[END_REF][START_REF] Guzmán | Simple tools for exploring variation in code-switching for linguists[END_REF]. This means that manual coding is still needed in order to solve issues that arise from the competing grammars and phonology of the languages in use. As a result, building a large bilingual corpus is very time-consuming.

It therefore becomes urgent for linguists to embrace collaborative approaches to linguistic data compilation, 19 for example through the online annotation of open data, including through crowdsourcing. Such initiatives can be encouraged by taking into consideration the creation of a corpus in the career of a linguist, based on a set of quality standards and citations (see discussion in [START_REF] Thieberger | Assessing annotated corpora as research output[END_REF]. Of course, providing access to the raw or annotated data on which corpus-based research relies raises ethical questions. In order to make primary or annotated data accessible to the scientific community while ensuring the protection of personal data, one has to see to it that the privacy of the speakers is respected. 20 That can be done through anonymizing the parts of the sound files and transcripts that may include personal information.

From the perspective of open-access data, the annotation standards used for a corpus gain in significance. The Worldwide Web Consortium (W3C) 21 recommends the Extensible Markup Language (XML) and the Text Encoding Initiative (TEI) standards 22 for annotation standards. For example, in an XML file, content is delimited by tags and surrounded by angle brackets in order to describe a document and specify information about it, i.e.: <sentence>, in angle brackets, marks the beginning of a sentence and </sentence>, in angle brackets with a slash, marks its end. 23 Depending on the research questions, annotators may provide an orthographic transcription, parse the corpus for syntactic analysis, and annotate parts of speech (nouns, proper nouns, verbs, conjunctions, particles, etc.) through using Universal Parts Of Speech (POS) tags, for example. 24 For lesser-known languages a morpheme-bymorpheme transcription and translation (or interlinearization) is often provided together with the free translation at the sentence level. These levels (i.e.: words, morphemes, glosses) should also be delimited in the XML using the above-mentioned tags. Within these tags, one can add information about the language, e.g., xml:lang="fr" for French. For bilingual corpora, in particular, one could tag the words depending on the languages involved. One could, e.g., use tags such as L1 (the word is used in monolingual or bilingual contexts but can be 19 Some web-based collaborative platforms and tools: Brat at http://brat.nlplab.org/; Webanno at https://webanno.github.io/webanno/; Atomic at http://corpus-tools.org/atomic/; Annis at http://corpustools.org/annis; IMS Corpus Workbench at http://cwb.sourceforge.net/. 20 For Europe, see among others https://ec.europa.eu/digital-single-market/en/open-access-scientificknowledge-0 and for language resources https://www.clarin-d.de/en/help/legal-information-platform 21 The Worldwide Web Consortium, see https://www.w3.org/Consortium/ 22 The Text Encoding Initiative (TEI) is a consortium that develops and maintains annotation standards, see http://www.tei-c.org/index.xml. Another reference for standards is TalkBank, see https://talkbank.org/ Annotations may also be unified around a common format called Universal Dependencies http://universaldependencies.org 23 See tutorials at http://www.tei-c.org/Support/Learn/tutorials.xml 24 Accessed at http://universaldependencies.org/u/pos/ recognized clearly in this context as part of the L1), L2 (the word is used in monolingual or bilingual contexts but can be recognized clearly in this context as part of the L2), multiple or ambiguous (words in this context could be either L1 or L2), mixed (words are partially in both languages and they do not exist as such in either the L1 or the L2), foreign words (for words from an L3 or past-contact languages), unknown (the annotator(s) cannot determine the language and meaning of the word), or other (non-words, or in written corpora symbols, emoticons, etc.). For a speech corpus, one can also provide a phonetic and phonological transcription as well as a prosodic annotation, for example by segmenting the corpus into intonation units. The use of UNICODE (e.g. UTF-8) is strongly recommended 25 as it guarantees the recognition of all characters on the Internet and on any computer. In XML one can also tag the beginning and the end of an associated sound and video file (time alignment) using the angle brackets and adding the relevant content information, e.g., <AUDIO start="0.1106" end="3.7594"/>. Concerning sound files, the WAV format is preferred for long-term archiving whereas the MP3 format is a good option for online access.

Moreover, a vital step in the compilation of a corpus is the production and maintenance of the metadata. Metadata may include sociolinguistic information on the speakers, the researchers, the content of the document, and the date and place of recording, allowing for extra-linguistic factors to be analysed. Metadata may follow the Dublin Core specifications 26 as defined by the Open Language Archives Community (OLAC) or use fuller standards, such as the ISLE Metadata Initiative (IMDI) developed by the Max Plank Institute and the Component MetaData Infrastructure (CMDI) 27 initiated by CLARIN and linked to the CLARIN Concept Registry. 28 Arbil 29 is a practical metadata editor for both IMDI and CMDI standards [START_REF] Withers | Metadata Management with Arbil[END_REF].

Researchers should opt for annotation tools that conform to these standards and that are compatible with one another. A variety of general manual annotation tools can be adapted to the study of language contact phenomena. A very popular tool is ELAN 30 which synchronizes the audio and video files with annotation tiers [START_REF] Sloetjes | Annotation by category -ELAN and ISO DCR[END_REF]. Language contact phenomena can be tagged in these tiers, depending on the researchers' needs, and searches can be conducted with ELAN's concordance tool. Besides ELAN, Anvil 31 is often used in sign language annotation [START_REF] Kipp | ANVIL: A Universal Video Research Tool[END_REF]). EXMARaLDA 32 is another widespread annotation tool that has been tested for multilingual research [START_REF] Schmidt | EXMARaLDA[END_REF]. CLAN and CHAT are tool sets native to language files in the CHILDES database. PHON is its phonological software programme that allows comparisons between target and produced phonological forms.

For phonetics, EasyAlign 33 is used to semi-automatically align phonetic annotations to transcriptions in PRAAT. 34 The WebMAUS 35 service [START_REF] Kisler | Signal processing via web services: The use case WebMAUS[END_REF] More information on corpus linguistic methods and best practices is available in Lüdeling and Kytö (2008Kytö ( , 2009)), O' Keeffe and McCarthy (2010), Durand, Gut and Kristofferson (2014), Biber and Reppen (2015), Kirk and Andersen (2016), [START_REF] Gries | Linguistic annotation in/for corpus linguistics[END_REF].

Corpus-driven studies in contact linguistics

Brief overview

Corpora are currently exploited in contact linguistics both in a top-down and bottom-up fashion. Top-down approaches rely on theoretical models that were primarily elaborated with monolingual data and aim to test the validity of these models for bilingual data. That is the case for the Matrix Language Frame (MLF) model and Jake 2017), which builds on the Speaking model in psycholinguistics [START_REF] Levelt | Speaking, from intention to articulation[END_REF], and the Minimalist approach to codeswitching (MacSwan 2016), which considers that the Minimalist Program [START_REF] Chomsky | The Minimalist Program[END_REF] should also successfully account for bilingual data. Corpus studies can test the generalizations and predictions made by these models. For example, [START_REF] Herring | I saw the madre': evaluating predictions about codeswitched determiner-noun sequences using Spanish-English and Welsh-English data[END_REF] and [START_REF] Parafita-Couto | Code-switching within the noun phrase: Evidence from three corpora[END_REF] investigate the switches occurring between determiners and their nouns in Spanish-English, Welsh-English, and Papiamento-Dutch bilingual speech in order to evaluate competing theories of codeswitching, namely the MLF model and generative approaches. On the other hand, bottom-up approaches consider that higher levels of abstraction are shaped by language practices. Linguists in this line of research typically observe patterns in bilingual corpora and aim to explain these patterns by paying close attention to factors such as frequency and priming, as with variationist approaches [START_REF] Poplack | Sometimes I'll start a sentence in Spanish y termino en espanol[END_REF][START_REF] Poplack | Myths and facts about loanword development[END_REF][START_REF] Torres Cacoullos | Two languages, one effect: structural priming in spontaneous code-switching[END_REF] and usage-based approaches [START_REF] Backus | Patterns of language-mixing. A study in Turkish-Dutch bilingualism[END_REF][START_REF] Backus | A usage-based approach to codeswitching: The need for reconciling structure and function[END_REF][START_REF] Quick | Identifying partially schematic units in the code-mixing of an English and German speaking child. Linguistic Approaches to Bilingualism[END_REF].

Corpora can be used both in a corpus-illustrated approach (i.e.: to provide occurrences of specific phenomena) or in a quantitative approach (i.e.: to provide frequency information and comparisons between speakers and texts). For quantitative analyses, appropriate statistical models need to be used depending, among other things, on the size of the corpora (see [START_REF] Nock | Soft memberships for spectral clustering, with application to permeable language distinction[END_REF]Newman, Baayen and Rice 2011;[START_REF] Tagliamonte | Models, forests, and trees of York English: Was-were variation as a case study for statistical practice[END_REF][START_REF] Gries | Some current quantitative problems in corpus linguistics and a sketch of some solutions[END_REF].

At present, corpus-driven studies in contact linguistics rely on data from three main types of contact settings: post-colonial and colonial settings, immigrant communities, and traditional contact settings involving two or more native languages. Table 1 presents a brief overview of such studies and shows that most of them focus on language pairs that include a European language such as Spanish, English, and French. Studies on language contact among immigrants and immigrant communities constitute another dynamic area of research in corpus linguistics. In contrast, contact involving traditional languages seems to be the least explored area in corpus linguistic studies.

Case studies

Once a corpus has been collected and annotated, researchers may conduct a number of searches depending on their research questions and on the specificities of the corpus. [START_REF] Adamou | A corpus-driven approach to language contact[END_REF] and [START_REF] Guzmán | Simple tools for exploring variation in code-switching for linguists[END_REF] suggest that comparable codeswitching data are needed in order to understand how frequent codeswitching really is in natural human communication. Based on 17 bi-or multilingual corpora, 37 Adamou (2016) observes that most corpora contain 37 Taking into account annotated Afro-Asiatic corpora accessed at http://corpafroas.humanum.fr/Archives/ListeFichiersELAN.php Counts from Gomez [START_REF] Gomez Rendon | Typological and social constraints on language contact: Amerindian languages in contact with Spanish[END_REF] for Guaraní (Paraguay), Quichua (Ecuador), and Otomí (Mexico) unpublished corpora. Slavic from [START_REF] Adamou | Borrowing and contact intensity: A corpus-driven approach from four Slavic minority languages[END_REF] accessed at http://lacito.vjf.cnrs.fr/pangloss. Romani from [START_REF] Adamou | Unevenly mixed Romani languages[END_REF] partly available at less than 5% word tokens from the L2, and more rarely, up to 20%-35% L2 word tokens (see Figure 1). These frequencies may also shed light to the language switching costs that have been noted in the experimental literature. Recently, [START_REF] Adamou | There are no language switching costs when codeswitching is frequent[END_REF] and [START_REF] Johns | Mixing things up: How blocking and mixing affect the processing of codemixed sentences[END_REF] showed that language switching costs align with the codeswitching habits of the community as documented in corpus studies. The typological scale of language mixing presented in Figure 1 needs to be enriched by other layers of annotation. One topic of investigation is the degree of convergence between two languages in contact and its relation to codeswitching. Torres [START_REF] Torres Cacoullos | Two languages, one effect: structural priming in spontaneous code-switching[END_REF], for example, present new corpus data from Spanish-English speakers from the traditionally bilingual community of New Mexico in the U.S. They show that, despite frequent codeswitching, pro-drop in the bilingual data is comparable to pro-drop in the monolingual varieties of Spanish and English. The reverse seems to be true for the Colloquial Upper Sorbian (Slavic)-German bilinguals who do not engage in frequent codeswitching with German and yet their pro-drop Slavic language has converged with non-prod-drop German [START_REF] Adamou | Borrowing and contact intensity: A corpus-driven approach from four Slavic minority languages[END_REF].

Pausing behaviour in relation to codeswitching is another research question that can only be addressed by making use of spoken corpora. Gardner-Chloros, McEntee-Atalianis, and Paraskeva (2013) recently showed that pauses do not correlate with codeswitching. They came to this conclusion on the basis of a study of two bilingual Greek Cypriot-English communities with different codeswitching habits: Cypriots in Great Britain for whom The existence of community patterns in codeswitching is another interesting topic that can only be tested with naturalistic data. Gardner-Chloros (2009), for example, notes that codeswitching is characterized by high variability across individuals. [START_REF] Adamou | A corpus-driven approach to language contact[END_REF], however, suggests that small bilingual communities may develop conventionalized ways of codeswitching. Codeswitching patterns were also noted in a study based on Bollywood scripts [START_REF] Si | A diachronic investigation of Hindi-English code-switching, using Bollywood film scripts[END_REF]. This study shows that alternational codeswitching between Hindi and English has considerably increased in the past decades as opposed to previous codeswitching patterns that relied mainly on single-word insertions.

Finally, corpus studies allow us to move beyond anecdotal evidence for so-called "typologically-rare phenomena". [START_REF] Seifart | Direct and indirect affix borrowing[END_REF], for example, draws attention to previously unreported cases of affix borrowing in two Amazonian languages without any borrowing of the loanwords containing those affixes. Similarly, Romani corpora from Greece and Finland illustrate the regular insertion of L2 verbs with L2 verb morphology into L1-dominant speech [START_REF] Adamou | Unevenly mixed Romani languages[END_REF] whereas in most codeswitching corpora contact verbs are regularly integrated into the morphology of the dominant language.

Conclusion

Corpus-driven research is a very dynamic paradigm in contact linguistics, as in other subfields of linguistics. This dynamism is due to the technological progress that enabled the growth of computerized corpora as well as the possibilities of online access to corpora, tools, and annotation platforms. Corpus linguistics is also particularly successful as it adequately addresses public and political concerns for increased accountability and replicability in science and fits the requirements of open science policies. In addition, corpus linguistics provides a solid empirical basis to test and shape theoretical models.

However, progress still needs to be made. The compilation of bi-and multilingual corpora remains a particularly time-consuming task as it requires considerable manual coding. Collaboration with Natural Language Processing specialists is therefore crucial for the development of new automated techniques adapted to the specificities of bi-and multilingual corpora. In the long term, increasing institutional support for FAIR data (i.e.: Findable, Accessible, Interoperable, and Re-usable data) and the development of web-based crowdsourcing will undoubtedly help to boost the production of bi-and multilingual corpora. The analysis of larger bi-and multilingual corpora from a wider variety of contact settings could then help improve our understanding of this important aspect of human communication.

Figure 1 .

 1 Figure 1. A scale of language mixing based on bilingual corpora (adapted from Adamou 2016)

  18 11 Accessed at http://www.paradisec.org.au/ 12 Accessed at http://www.ailla.utexas.org/site/welcome.html 13 Accessed at http://lacito.vjf.cnrs.fr/pangloss/index_en.html

	14	The	Language	Archive,	Max	Planck	Institute	for	Psycholinguistics,	Nijmegen,

https://corpus1.mpi.nl/ds/asv/;jsessionid=B59DACD6D374DE413552402F9EBD5440?0 15 Accessed at http://childes.psy.cmu.edu/ 16 Accessed at https://www.uclouvain.be/en-cecl-icle.html 17 Accessed at http://www.statmt.org/europarl/ 18 See https://uclouvain.be/en/research-institutes/ilc/cecl/must.html

  Created by the Max Planck Institute for Psycholinguistics at Nijmegen, Netherlands. Accessed at https://tla.mpi.nl/tools/tla-tools/elan/ 31 http://www.anvil-software.org/ 32 http://exmaralda.org/en/ 33 http://latlcui.unige.ch/phonetique/easyalign.php 34 http://www.fon.hum.uva.nl/praat/ 35 At the Bavarian Archive for Speech Signals, http://clarin.phonetik.uni-muenchen.de/BASWebServices/ languages. A similar tool is SailAlign 36 that can accommodate long and noisy data as well as transcription errors.

		is another tool that
	has successfully been tested for forced alignment including corpora from lesser-known
	25 http://www.unicode.org/ 26 http://dublincore.org 27 http://www.clarin.eu/content/component-metadata
	28	The Data Category Repository (DCR), known as ISOCat, is currently transferred under
	https://openskos.meertens.knaw.nl/ccr/browser/ 29 http://tla.mpi.nl/tools/tla-tools/arbil/ 30

Table 1 .

 1 Brief overview of corpus-driven studies in contact linguistics

	Type of contact	Language pairs		Locations	References
		English-Spanish		U.S.A. (New York,	Poplack 1980; Silva-
				Los Angeles, New	Corvalán	1986;
				Mexico)	Torres Cacoullos and
					Travis 2016
		Quechua-Spanish		Bolivia, Ecuador	van	Hout	and
					Muysken	1994;
					Gomez Rendon 2008;
					Bakker and Hekking
					2012
		Guaraní-Spanish		Paraguay	Gomez Rendon 2008
		Otomí-Spanish		Mexico	Gomez Rendon 2008
		Swahili-English		Kenya	Myers-Scotton 1993
	Post-colonial and	Hindi-English		India	Si 2010
	colonial settings	Chinese-English		mainland China and	Wang and Liu 2013
				Hong-Kong
		Welsh-English		Wales	Deuchar 2006
		French-English		Canada	Poplack and Dion
					2012
		Arabic-French		Morocco	Nait M'Barek and
					Sankoff 1988
		Nkep (Oceanic)-		Vanuatu	Meyerhoff 2014
		Bislama (English
		lexifier creole)
		Aboriginal		Australia	McConvell	and
		English/Kriol-Gurindji		Meakins 2005
		(Pama-Nyungan)
	Immigrants and	Turkish-Dutch		Netherlands	Backus 1992
	immigrant
	communities
		Romani-Finnish	and	Greece, Finland	Adamou	and
		Romani-Turkish-Greek		Granqvist 2015
	Traditional	Bora (Huitotoan)-		Colombian-Peruvian	Seifart 2015
	languages	Resígaro (Arawakan)	Amazon region

  ://lacito.vjf.cnrs.fr/pangloss. Ixcatec corpus, raw data at https://elar.soas.ac.uk/ and parts of the annotated corpus available at http://lacito.vjf.cnrs.fr/pangloss/corpus/list_rsc.php?lg=Ixcatec[START_REF] Adamou | Corpus linguistic methods[END_REF]. Corpus linguistic methods. J. Darquennes, J. Salmons & W. Vandenbussche (eds). Language contact. Boston & Berlin: Mouton de Gruyter. codeswitching is the default mode of communication and Greek Cypriot speakers in Cyprus for whom codeswitching is a conversationally marked mode.

	< 5% contact	6%-13%	14%-19%	20%-35%
	words	contact words	contact words	contact words
	1. Balkan Slavic-	1. Moroccan	1. Quichua-	1. Thrace
	Greek	Arabic-French-	Spanish	Romani-Turkish
	2. Ixcatec-	English	2. Otomí-	-Greek
	Spanish	2. Ixcatec-	Spanish	2. Finnish
	3. Burgenland	Spanish (1950s)	3. Guaraní-	Romani-Finnish
	Croatian-German		Spanish	3. Molise Slavic-
	4. Colloquial			Italian
	Upper Sorbian-
	German
	5. Beja-Arabic
	6. Zaar-Hausa-
	English
	7. Gawwada-
	Amharic
	8. Hausa-
	English-French
	9. Hebrew-
	English-Arabic-
	Yiddish

http

Accessed at http://web-corpora.net/AlbanianCorpus/search/

Accessed at http://www.ehu.eus/en/web/eins/egungo-testuen-corpusa-etc-3 Accessed at http://web-corpora.net/RomaniCorpus/search/

See for an example the BYU corpora, grouping the most widely used online corpora of English. Accessed at https://corpus.byu.edu/

Accessed at https://www.ldc.upenn.edu/

Accessed at http://www.natcorp.ox.ac.uk/