Skip to content
语言学

用 Potato 做语言学研究

在 Potato 中审核来自 FLEx 或 Toolbox 的行间注释,修正 Praat 和 ELAN 层级,运行画地图式方言任务。这是一款免费、由你自行托管的工具。

Potato 能导入来自 FLEx 和 Toolbox 的文本,以及带 Praat TextGrid 或 ELAN 层级的录音,把每个句子或区间交给审核者,对照莱比锡注释规则(Leipzig Glossing Rules)做检查,再把修正后的分析导出回原工具。Potato 免费开源,运行在你自己的电脑或服务器上,包括田野中的一台笔记本电脑。

在语言记录项目中,初步分析通常已经存在,可能在 FLEx 数据库、Toolbox 文件或一组 TextGrid 里,剩下的工作是核查这份分析,而且往往由几个人共同处理这些文本。同时支持注释和协作的工具并不多。2026 年一项针对 98 款语言记录标注工具的调查发现,在 44 款免费且可获取的工具中,15 款支持语素切分和注释,6 款能免费把形态标注与远程协作结合起来(Yang et al., 2026)。Potato 负责的是审核这一步:把文本分配给审核者,检查每个词的对齐情况,并记录每个句子由谁确认。

Potato 中的语言学任务

下表每一行是 Potato 自带的一种任务类型,链接页面给出了完整配置。

任务Potato 的做法文档
检查和修正行间注释interlinear_gloss 方案标出语素切分与注释没有对齐的每一个词行间注释文本
修正时间对齐的转写TextGrid 和 .eaf 文件导入为 tiered_annotation 方案的层级,每个区间一个片段转写格式
画地图式任务在你自己的轮廓地图上使用带 task: draw 的 geo_annotation 方案,由 geo_overlap 导出汇总感知方言学
阅读时间实验自定步速阅读(移动窗口、累积、居中)和 A-maze 任务,记录每个区域的时间自定步速阅读
语音样本判断listening_test 方案,用于刺激材料盲化的 MUSHRA、ACR 和 ABX 测试听音测试
可接受性与评分任务针对句子或音频的李克特量表、滑块和最佳-最差量表方案李克特量表
语料库标注实体及其他片段的标签,导出为 CoNLL-2003 或 CoNLL-U片段标注

一个注释审核项目

下面的方案从每个条目读取一个句子以及已有的语素切分和注释,由审核者修正切分和注释。abbreviations: leipzig 会在类别标签不属于莱比锡缩写时发出警告,tiers 在每个词下方添加额外的行。

yaml
annotation_task_name: "Glossing review"
task_dir: "."
data_files:
  - data/sentences.jsonl
item_properties:
  id_key: id
  text_key: text
output_annotation_dir: annotation_output/
user_config:
  allow_all_users: true
num_annotators_per_item: 2    # two reviewers per sentence
annotation_schemes:
  - annotation_type: interlinear_gloss
    name: igt
    description: Segment each word into morphemes and gloss every morpheme
    source_field: text
    morphemes_field: morphemes
    gloss_field: glosses
    translation_field: translation
    tiers: [pos]
    abbreviations: leipzig
    language: la
    metalanguage: en

每个句子两名审核者(num_annotators_per_item: 2)意味着每条注释都有第二个人把关,团队核查发音合作人的文本时通常这样权衡。如果每份文本只有一名负责的审核者,就把 num_annotators_per_item 设为 1。实际工作中很少需要手写配置,因为 potato import 会根据 FLEx 或 Toolbox 文件生成配置。

导入文本与导出回去

potato import 能把一个 FLExText 文件、一个 Toolbox 数据库,或一个包含 TextGrid 或 ELAN 文件及其录音的文件夹变成可运行的项目。每个短语、记录或录音成为一个条目,已有的分析作为它的起点载入。

bash
potato import -i stories.flextext -o glossing-project/
potato import -i texts.txt -f toolbox -o glossing-project/
potato import -i recordings/ -o transcripts-project/

导出时以同样的格式写回修正结果:注释用 flextext 和 toolbox,对齐的纯文本和 gb4e LaTeX 用 igt,层级用 textgrid 和 eaf。重新导入导出的 FLExText 文件,会得到相同的词、切分、注释、翻译和词性。FLEx 的 GUID 和词库链接在回传时会丢失,因为导出中没有词库。语言学田野调查列出了其余哪些内容能往返、哪些不能,导出格式列出了每种格式写出的文件。

与 FLEx、ELAN 和 Praat 的分工

这几款工具各有分工,Potato 的定位是夹在三者之间。FieldWorks Language Explorer 包含词库和形态分析器。ELAN 对音频和视频做多层时间对齐标注,Praat 是语音学分析程序。当几个人核查同一批材料时,Potato 补上了把文本分配给审核者、记录每个人的答案,以及网页界面这几项,审核者因此不必安装分析软件。

网页界面在平台上也有意义。当前的 FLEx 版本只在 Windows 上运行,不支持 macOS,SIL 也不再支持 Linux 版。Potato 可以安装在 macOS、Linux 和 Windows 上,审核者只用浏览器。用 Mac 的审核者不需要虚拟机就能核查从 FLEx 导出的文本。

常见问题

Potato 能导入 ELAN 和 Praat TextGrid 文件并导出回去吗?

可以。potato import 读取 .TextGrid 和 .eaf 文件,每个文件旁边需要有同名的音频或视频文件;每个层级成为同一个 tiered_annotation 方案中的一层,每个非空区间对应一个片段。textgrid 和 eaf 导出器把修正后的层级写回去。Potato 能读取 UTF-8 和 UTF-16 编码的 TextGrid,后者是 Praat 常用的编码。

Potato 能在 Mac 上运行吗?

能。Potato 是一个 Python 包,在 macOS、Linux 和 Windows 上都用 pip install potato-annotation 安装,标注者在网页浏览器中工作。Mac 用户可以审核从 FLEx 导出的文本,而 FLEx 本身不能在 macOS 上运行。

Potato 能在没有网络的田野环境中运行吗?

能,只要先装好 Potato。Potato 的所有脚本、样式表和字体都由它自己的安装目录提供,画地图式任务也不加载地图瓦片,所以一台没有网络的笔记本电脑运行的是同一个界面。气隙与离线部署说明了哪些内容在本地提供。

能在线运行画地图式任务吗?

能。带 task: draw 的 geo_annotation 方案向参与者显示一张由你以 GeoJSON 提供的轮廓地图,参与者圈出并命名他们认为人们说话方式不同的区域。geo_overlap 导出把所有参与者的绘图叠加成热力图。感知方言学完整演示了一项示例研究。

延伸阅读

参考文献

  1. Yang et al. (2026). Annotation Tools for Language Documentation: A Survey of Capabilities, Gaps, and Morphological Support. Proceedings of the Ninth Workshop on the Use of Computational Methods in the Study of Endangered Languages (ComputEL-9). https://aclanthology.org/2026.computel-1.9/
  2. Comrie, Haspelmath, and Bickel. The Leipzig Glossing Rules. Max Planck Institute for Evolutionary Anthropology. https://www.eva.mpg.de/lingua/resources/glossing-rules.php

从这里开始

示例设计

每个设计都是可以下载并直接运行的 Potato 配置。

Interlinear Glossing of Endangered LanguagesMorpheme-level interlinear glossing, the annotation design behind the SIGMORPHON 2023 Shared Task on Interlinear Glossing (Ginn et al., 2023), which covers endangered and Indigenous languages including Arapaho, Gitksan, Lezgi, Natugu, Tsez and Uspanteko. For each word the annotator segments it into morphemes, labels each morpheme's position (root vs. affix/clitic), writes the Leipzig-style gloss line, and provides a free translation - the core workflow of language documentation. The showcase sample items use pedagogically reliable, fully verifiable stand-in languages (Swahili and Turkish) so the target gloss is correct; the real shared task uses the endangered languages named above.DoReCo: Language Documentation Reference CorpusDoReCo is a cross-linguistic corpus of 53 spoken languages with over 100 hours of narrative speech transcribed and time-aligned at the word and phone levels. This Potato config reproduces its multi-tier ELAN annotation workflow.ToBI Prosodic AnnotationMulti-tier prosodic annotation following the Tones and Break Indices (ToBI) framework. Annotators label pitch accents, phrase accents, boundary tones, and break indices on speech utterances, producing a layered prosodic transcription aligned to the audio timeline (Silverman et al., ICSLP 1992).Universal Dependencies - Dependency Parsing AnnotationDependency parsing and POS tagging annotation based on Universal Dependencies v2 (Nivre et al., LREC 2020). Annotators build syntactic dependency trees and label parts of speech using the UD tagset.Miami Bangor Code-Switching AnnotationMulti-tier annotation of Spanish-English bilingual speech for code-switching analysis. Annotators perform per-word language identification, mark code-switch boundaries and types, classify switch direction and utterance-level language dominance, and provide orthographic transcriptions -- all on parallel tiers aligned to the audio timeline (Deuchar & Parafita Couto, Bangor Miami Corpus, TalkBank).CHILDES Child Language Multi-Tier AnnotationMulti-tier ELAN-style annotation of child-adult interaction videos for language acquisition research. Annotators segment utterance boundaries on the timeline, provide morphological and syntactic annotations, and classify communicative context and error types. Based on the CHILDES/TalkBank project.

其他领域

全部应用场景