Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 6.26 KB

File metadata and controls

36 lines (26 loc) · 6.26 KB

2.3 语料库(Corpora

文字不是凭空出现的。我们研究的任何文本都是由一个或多个特定的说话人或作家,在特定的时间、特定的地点,用特定的语言,为了特定的目的而产生的。

也许最重要的变化维度是语言。当把 NLP 算法用于多种语言时,它们才是最有用的。根据民族语言网(译者注:Ethnologue: Languages of the World)(Simons and Fennig,2018)1 的记录,截至写稿时,世界上有 7097 种语言。在一种以上的语言上测试算法是很重要的,特别是在具有不同属性的语言上测试;相比之下,目前有一种不太好的趋势,即 NLP 算法的开发或测试只在英语上进行(Bender,2019)2。即使开发出适用于英语以外的算法,也往往是针对工业化大国的官方语言(汉语、西班牙语、日语、德语等)开发的,但我们不希望将工具仅仅局限在这几种语言上。此外,大多数语言也有多个变种,通常在不同地区或不同社会群体中使用。因此,举例来说,如果我们要处理非洲裔美国人英语(African American Language)(AAL)文本 —— 这是非洲裔美国人社区数百万人使用的多种语言变体的统称(King 2020)3 —— 我们必须使用与这些变种相匹配的 NLP 工具。Twitter 帖子可能会使用 AAL 使用者经常使用的特征,比如像 iont(主流美式英语(Mainstream American English)(MAE)中的 I don't)这样的构造,或者 talmbout 对应于 MAE 的 talking about,这两个例子都会影响分词(Blodgett et al. 20164, Jones 20155)。

说话者或写作者在实际交流或写作时同时使用多种语言是非常常见的,这种现象称为语码转换(code switching)。语码转换在全世界范围内都非常普遍;下面的例子显示了西班牙语和(音译)印地语(Hindi)分别与英语的语码转换(Solorio et al. 20146, Jurgens et al. 20177):

(2.2) Por primera vez veo a @username actually being hateful! it was beautiful:) [For the first time I get to see @username actually being hateful! it was beautiful:) ] (2.3) dost tha or ra- hega ... dont wory ... but dherya rakhe [“he was and will remain a friend ... don’t worry ... but have faith”]

另一个会发生变化的维度是体裁。我们的算法处理的文本可能来自新闻、小说或非小说书籍、科学文章、维基百科或宗教文本,也可能来自电话交谈、商务会议、警方的随身摄像机、医学采访等口语体裁,或电视节目或电影的字幕(transcript),还可能来自于工作环境,如医生的笔记、法律文本、或议会/国会程序。

文本还反映了作者(或说话人)的人口统计学特征:他们的年龄、性别、种族、社会经济阶层都会影响我们所处理文本的语言属性。

最后,时间也很重要。语言会随着时间的推移而变化,对于一些语言来说,我们拥有来自不同历史时期的语料库。

由于语言是如此的具有情境性(situated),所以当根据语料库来开发语言处理模型时,必须考虑是谁,在什么情况下,出于什么目的,形成了这个语料库文本。那我们作为数据集用户,如何才能知道所有这些数据集的细节呢?最好的方法是语料库创建者为每个语料库建立一个数据表datasheet)(Gebru et al., 20208)或数据声明data statement)(Bender and Friedman, 20189)。数据表指定了数据集的属性,比如:

  • 动机Motivation)。为什么要收集这个语料库,由谁收集,谁提供资金?
  • 情景Situation)。文本是在什么时候和什么情况下写/说的?例如,是否有任务?该文本最初是口语对话、编辑文本、社交媒体交流或独白与对话吗?
  • 语言种类Language variety)。语料库使用的是什么语言(包括方言/区域)?
  • 说话人的人口统计学特征Speaker demographics)。例如,文本作者的年龄或性别是什么?
  • 收集过程Collection process)。数据有多大?如果是子样本,那么是如何采样的?数据的收集是否经过同意?数据是如何预处理的,有哪些元数据(metadata)?
  • 标注过程Annotation process)。标注具体是什么(译者注:可能指的是标注类别等信息),标注者的人口统计学特征是什么,他们是如何培训的,数据是如何标注的?
  • 发行Distribution)。是否有版权或其他知识产权限制?

Footnotes

  1. Simons, G. F. and Fennig, C. D. (2018). Ethnologue: Languages of the world, 21st edition. SIL International.

  2. Bender, E. M. (2019). The #benderrule: On naming the languages we study and why it matters. https://thegradient.pub/the-benderrule-on-naming-the-languages-we-study-and-why-it-matters/

  3. King, S. (2020). From African American Vernacular English to African American Language: Rethinking the study of race and language in African Americans’ speech. Annual Review of Linguistics 6, 285–300.

  4. Blodgett, S. L., Green, L., and O’Connor, B. (2016). Demographic dialectal variation in social media: A case study of African-American English. EMNLP.

  5. Jones, T. (2015). Toward a description of African American Vernacular English dialect regions using “Black Twitter”. American Speech 90(4), 403–440.

  6. Solorio, T., Blair, E., Maharjan, S., Bethard, S., Diab, M., Ghoneim, M., Hawwari, A., AlGhamdi, F., Hirschberg, J., Chang, A., and Fung, P. (2014). Overview for the first shared task on language identification in code-switched data. First Workshop on Computational Approaches to Code Switching.

  7. Jurgens, D., Tsvetkov, Y., and Jurafsky, D. (2017). Incorporating dialectal variability for socially equitable language identification. ACL.

  8. Gebru, T., Morgenstern, J., Vecchione, B., Vaughan, J. W., Wallach, H., Daum´e III, H., and Crawford, K. (2020). Datasheets for datasets. arXiv preprint arXiv:1803.09010.

  9. Bender, E. M. and Friedman, B. (2018). Data statements for natural language processing: Toward mitigating system bias and enabling better science. TACL 6, 587–604.