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.

其他領域

全部應用場景