Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rebalancing corpora Disentangling effects of unstratified sampling and multiple variables in corpus data Sean Wallis Survey of English Usage University.

Similar presentations


Presentation on theme: "Rebalancing corpora Disentangling effects of unstratified sampling and multiple variables in corpus data Sean Wallis Survey of English Usage University."— Presentation transcript:

1 Rebalancing corpora Disentangling effects of unstratified sampling and multiple variables in corpus data Sean Wallis Survey of English Usage University College London s.wallis@ucl.ac.uk

2 Motivating questions What is meant by the phrase ‘a balanced corpus’? –How do sampling decisions made by corpus builders affect the type of research questions that may be asked of the data?

3 Motivating questions What is meant by the phrase ‘a balanced corpus’? –How do sampling decisions made by corpus builders affect the type of research questions that may be asked of the data? Examples: ICE-GB and DCPSE –Should the data have been more sociolinguistically representative, by social class and region?

4 Motivating questions What is meant by the phrase ‘a balanced corpus’? –How do sampling decisions made by corpus builders affect the type of research questions that may be asked of the data? Examples: ICE-GB and DCPSE –Should the data have been more sociolinguistically representative, by social class and region? –Should texts have been stratified: sampled so that speakers of all categories of gender and age were (equally) represented in each genre?

5 Motivating questions What is meant by the phrase ‘a balanced corpus’? –How do sampling decisions made by corpus builders affect the type of research questions that may be asked of the data? Examples: ICE-GB and DCPSE –Should the data have been more sociolinguistically representative, by social class and region? –Should texts have been stratified: sampled so that speakers of all categories of gender and age were (equally) represented in each genre? Can we compensate for sampling problems in our data analysis?

6 ICE-GB British Component of ICE Corpus of speech and writing (1990-1992) –60% spoken, 40% written; 1 million words; orthographically transcribed speech, marked up, tagged and fully parsed Sampling principles –International sampling scheme, including broad range of spoken and written categories –But: Adults who had completed secondary education ‘British corpus’ geographically limited –speakers mostly from London / SE UK (or sampled there)

7 DCPSE Diachronic Corpus of Present-day Spoken English (late 1950s - early 1990s) –800,000 words (nominal) –London-Lund component annotated as ICE-GB orthographically transcribed and fully parsed Created from subsamples of LLC and ICE-GB –Matching numbers of texts in text categories –Not sampled over equal duration LLC (1958-1977) ICE-GB (1990-1992) –Text passages in LLC larger than ICE-GB LLC (5,000 words) ICE-GB (2,000 words) But text passages may include subtexts –telephone calls and newspaper articles are frequently short

8 DCPSE Representative? –Text categories of unequal size –Broad range of text types sampled –Not balanced by speaker demography

9 DCPSE Representative? –Text categories of unequal size –Broad range of text types sampled –Not balanced by speaker demography

10 A balanced corpus? Corpora are reusable experimental datasets –Data collection (sampling) should avoid limiting future research goals –Samples should be representative What are they representative of? Quantity vs. quality –Large/lighter annotation vs. small/richer –Are larger corpora more (easily) representative? Problems for historical corpora –Can we add samples to make the corpus more representative?

11 “Representativeness” Do we mean representative... –of the language? A sample in the corpus is a genuine random sample of the type of text in the language

12 “Representativeness” Do we mean representative... –of the language? A sample in the corpus is a genuine random sample of the type of text in the language –of text types? Effort made to include examples of all types of language “text types” (including speech contexts)

13 “Representativeness” Do we mean representative... –of the language? A sample in the corpus is a genuine random sample of the type of text in the language –of text types? Effort made to include examples of all types of language “text types” (including speech contexts) –of speaker types? Sampling decisions made to include equal numbers (by gender, age, geography, etc.) of participants in each text category Should subdivide data independently (stratification)

14 “Representativeness” Do we mean representative... –of the language? A sample in the corpus is a genuine random sample of the type of text in the language –of text types? Effort made to include examples of all types of language “text types” (including speech contexts) –of speaker types? Sampling decisions made to include equal numbers (by gender, age, geography, etc.) of participants in each text category Should subdivide data independently (stratification) “broad” “stratified” “random sample”

15 Stratified sampling Ideal –Corpus independently subdivided by each variable

16 Stratified sampling Ideal –Corpus independently subdivided by each variable

17 Stratified sampling Ideal –Corpus independently subdivided by each variable –Equal subdivisions?

18 Stratified sampling Ideal –Corpus independently subdivided by each variable –Equal subdivisions? Not required Independent variables = constant probability in each subset –e.g. proportion of words spoken by women not affected by text genre –e.g. same ratio of women:men in age groups, etc.

19 Stratified sampling Ideal –Corpus independently subdivided by each variable –Equal subdivisions? Not required Independent variables = constant probability in each subset –e.g. proportion of words spoken by women not affected by text genre What is the reality?

20 ICE-GB: gender / written-spoken Proportion of words in each category spoken by women and men –The authors of some texts are unspecified –Some written material may be jointly authored –female/male ratio varies slightly (  =0.02) 00.20.40.60.81 TOTAL spoken written female male p

21 ICE-GB: gender / spoken genres Gender variation in spoken subcategories 00.20.40.60.81 TOTAL spoken dialogue private direct conversations telephone calls public broadcast discussions broadcast interviews business transactions classroom lessons legal cross-examinations parliamentary debates mixed broadcast news monologue scripted broadcast talks non-broadcast speeches unscripted demonstrations legal presentations spontaneous commentaries unscripted speeches p female male

22 ICE-GB: gender / written genres Gender variation in written genres TOTAL written non-printed correspondence business letters social letters non-professional writing student examination scripts untimed student essays printed academic writing humanities natural sciences social sciences technology creative writing novels/stories instructional writing administrative/regulatory skills/hobbies non-academic writing humanities natural sciences social sciences technology persuasive writing press editorials reportage press news reports p 00.20.40.60.81femalemale

23 ICE-GB Sampling was not stratified across variables –Women contribute 1/3 of corpus words –Some genres are all male (where specified) speech: spontaneous commentary, legal presentation academic writing: technology, natural sciences non-academic writing: technology, social science

24 ICE-GB Sampling was not stratified across variables –Women contribute 1/3 of corpus words –Some genres are all male (where specified) speech: spontaneous commentary, legal presentation academic writing: technology, natural sciences non-academic writing: technology, social science –Is this representative?

25 ICE-GB Sampling was not stratified across variables –Women contribute 1/3 of corpus words –Some genres are all male (where specified) speech: spontaneous commentary, legal presentation academic writing: technology, natural sciences non-academic writing: technology, social science –Is this representative? –When we compare technology writing with creative writing academic writing with student essays –are we also finding gender effects?

26 ICE-GB Sampling was not stratified across variables –Women contribute 1/3 of corpus words –Some genres are all male (where specified) speech: spontaneous commentary, legal presentation academic writing: technology, natural sciences non-academic writing: technology, social science –Is this representative? –When we compare technology writing with creative writing academic writing with student essays –are we also finding gender effects? –Difficult to compensate for absent data in analysis!

27 Disentangling variables When we compare –technology writing with creative writing are we also finding gender effects?

28 Disentangling variables When we compare –technology writing with creative writing are we also finding gender effects? Rebalancing the corpus –Subsample the corpus on stratified lines, or mathematically rescale corpus reduces the amount of data what do we do about missing data?

29 Disentangling variables When we compare –technology writing with creative writing are we also finding gender effects? Rebalancing the corpus –Subsample the corpus on stratified lines, or mathematically rescale corpus reduces the amount of data what do we do about missing data? Rebalancing the dataset

30 Disentangling variables When we compare –technology writing with creative writing are we also finding gender effects? Rebalancing the corpus Rebalancing the dataset Test contribution of interacting variables –Evaluate each independent variable and their interaction in predicting DV –cf. analysis of covariance (ANCOVA) but for categorical variables

31 Rebalancing corpora Aim: equalise the ratios –spoken:written (across m/f) –male:female (across sp/w) Drawback: –throws away information –problems with empty subsets Methods: –random subsampling –rescaling counting instances as <1 item f m spw

32 Rebalancing datasets Attempting to obtain a balanced corpus is good practice in data-collection –avoid zero speakers for each sociolinguistic combination

33 Rebalancing datasets Attempting to obtain a balanced corpus is good practice in data-collection –avoid zero speakers for each sociolinguistic combination But different research questions are likely to obtain different ratios –Tensed VP density in DCPSE (Bowie et al 2013) formal f-to-f informal f-to-f telephone b discussions b interviews commentary parliament legal x-exam assort spont prepared sp Total 1960s 1990s

34 Accounting for interaction Another way of considering the problem –We cannot be sure that we are seeing independent effects of two variables A B C

35 Accounting for interaction Another way of considering the problem –We cannot be sure that we are seeing independent effects of two variables –Or that the two variables are essentially the same A B C

36 Accounting for interaction Another way of considering the problem –We cannot be sure that we are seeing independent effects of two variables –Or that the two variables are essentially the same –In the worst case the two variables measure the same thing (e.g. m = sp, f = w) A B C

37 Testing for interaction A statistical test checks whether ratios are constant (homogeneity) –2x2 chi-square χ 2 = 0 –Cramér’s φ =  χ 2 /kN = 0 k = diagonal - 1 f m spw

38 Testing for interaction A statistical test checks whether ratios are constant (homogeneity) –2x2 chi-square χ 2 = 0 –Cramér’s φ =  χ 2 /kN = 0 k = diagonal - 1 Can we use χ 2 to see if an uneven distribution causes the variables to interact? –Assume A, B and C are binary variables for simplicity f m spw

39 Testing for interaction We can use χ 2 to test –A  C 11 22 20 10 30 33 31 32 63 N = values of C values of A 2010 1122 χ 2 = 6.99  = 0.33

40 Testing for interaction We can use χ 2 to test –A  C and B  C 10 23 21 9 11 22 20 10 30 33 31 32 63 32 31 values of B 2010 1122 219 1023 C χ 2 = 6.99  = 0.33 χ 2 = 9.91  = 0.40

41 Testing for interaction We can use χ 2 to test –A  C and B  C Now use χ 2 to test –A  B  C 10 23 21 9 11 22 20 10 30 33 31 32 63 32 31 C B A

42 Testing for interaction We can use χ 2 to test –A  C and B  C Now use χ 2 to test –A  B  C Method –Create a 3D table 1 2D ‘layer’ for each value of C 10 23 21 9 11 4 7 6 16 15 5 6 4 22 20 10 30 C B A

43 12 2019 12 31 32 63 32 31 Testing for interaction We can use χ 2 to test –A  C and B  C Now use χ 2 to test –A  B  C Method –Create a 3D table 1 2D ‘layer’ for each value of C –Define expected distribution e abc = n ab  n c / N –expected = no variation across C –compensates for uneven sample 10 23 21 9 11 4 7 6 16 15 5 6 4 22 20 10 30 C B A n ab ncnc uneven sample

44 12 2019 12 31 32 31 Testing for interaction We can use χ 2 to test –A  C and B  C Now use χ 2 to test –A  B  C Method –Create a 3D table 1 2D ‘layer’ for each value of C –Define expected distribution e abc = n ab  n c / N –expected = no variation across C –Calculate χ 2 = Σ(o – e) 2 /e test has single degree of freedom 10 23 21 9 11 4 7 6 16 15 5 6 4 22 20 10 30 C B A χ 2 = 13.79  = 0.47

45 12 2019 12 31 32 31 Testing for interaction Method –Create a 3D table 1 2D ‘layer’ for each value of C –Define expected distribution e abc = n ab  n c / N –expected = no variation across C –Calculate χ 2 = Σ(o – e) 2 /e test has single degree of freedom –χ 2 = 13.79,  = 0.47 –BUT this tests A or B Subtract χ 2 (A) and χ 2 (B) –result non-significant (or < 0)  no interaction 10 23 21 9 11 4 7 6 16 15 5 6 4 22 20 10 30

46 Conclusions Ideal would be that: –the corpus was “representative” in all 3 ways: a genuine random sample a broad range of text types a stratified sampling of speakers –But these principles are unlikely to be compatible e.g. speaker age and utterance context

47 Conclusions Ideal would be that: –the corpus was “representative” in all 3 ways: a genuine random sample a broad range of text types a stratified sampling of speakers –But these principles are unlikely to be compatible e.g. speaker age and utterance context Some compensatory approaches may be employed at research (data analysis) stage –what about absent or atypical data? –what if we have few speakers/writers?

48 Conclusions Data-collection is important –Pay attention to stratification in selecting texts/speakers consider replacing texts in outlying categories –Justify and document non-inclusion of stratum by evidence e.g. “there are no published articles attributable to authors of this age in this time period”

49 Conclusions Data-collection is important –Pay attention to stratification in selecting texts/speakers consider replacing texts in outlying categories –Justify and document non-inclusion of stratum by evidence e.g. “there are no published articles attributable to authors of this age in this time period” But a stratified corpus does not guarantee a stratified dataset –need to disentangle effects of variables

50 Conclusions Testing for interaction –χ 2 can measure degree to which combination of  and B affects the choice of C use uneven sampling for expected distribution –Cramér’s φ is derived from χ 2 Analysis of covariance –Subtracting χ 2 for  and B allows us to test if remaining interaction is significant a significant result means –the variables interact to obtain a new result no effect means –the variables may be dependent (measure the same thing)

51 References Bowie, J., Wallis, S.A., and Aarts, B. 2013. Contemporary change in modal usage in spoken British English: mapping the impact of “genre”. In Marín-Arrese, J.I., Carretero, M., Arús H.J. and van der Auwera, J. (ed.) English Modality, Berlin: De Gruyter, 57–94.

52 DCPSE: gender / genre DCPSE has a simpler genre categorisation –also divided by time 00.20.40.60.81 TOTAL face-to-face conversations formal informal telephone conversations broadcast discussions broadcast interviews spontaneous commentary parliamentary language legal cross-examination assorted spontaneous prepared speechfemale male p

53 DCPSE: gender / time DCPSE has a simpler genre categorisation –also divided by time note the gap 0 0.2 0.4 0.6 0.8 1 1958 1960 19621964 1966 1968 1970 1972 1974 1976 19781980 1982 1984 1986 1988 1990 1992 p time

54 DCPSE: genre / time Proportion in each spoken genre, over time –sampled by matching LLC and ICE-GB overall this is a ‘stratified sample’ (but only LLC:ICE-GB) uneven sampling over 5-year periods (within LLC) 0 0.2 0.4 0.6 1960196519701975198019851990 Informal face-to-face formal face-to-face spontaneous commentary telephone conversations prepared speech p ICE-GB target for LLC

55 DCPSE LLC sampling not stratified –Issue not considered, data collected over extended period –Some data was surreptitiously recorded

56 DCPSE LLC sampling not stratified –Issue not considered, data collected over extended period –Some data was surreptitiously recorded DCPSE matched samples by ‘genre’ –Same text category sizes in ICE-GB and LLC –But problems in LLC (and ICE) percolate

57 DCPSE LLC sampling not stratified –Issue not considered, data collected over extended period –Some data was surreptitiously recorded DCPSE matched samples by ‘genre’ –Same text category sizes in ICE-GB and LLC –But problems in LLC (and ICE) percolate No stratification by speaker –Result: difficult and sometimes impossible to separate out speaker-demographic effects from text category


Download ppt "Rebalancing corpora Disentangling effects of unstratified sampling and multiple variables in corpus data Sean Wallis Survey of English Usage University."

Similar presentations


Ads by Google