关于 Bourbon
About Bourbon
Bourbon 是用于音系特征、音位库和特征几何的中英文浏览器工具:可以编辑音位库和特征矩阵,比较多个音位库,按特征筛选音段,计算最小特征集,并查看和编辑特征树。它源自 Klaus Llwynog 开发的 Whiskey Feature Switchboard。程序、数据和字体都随页面提供,不需要账户或服务器。
Bourbon is a bilingual browser tool for phonological features, segment inventories and feature geometry: edit inventories and feature matrices, compare inventories, filter segments by feature, compute minimal feature sets, and view and edit feature trees. It is derived from Whiskey Feature Switchboard by Klaus Llwynog. The program, data and fonts come with the page; no account or server is needed.
修改版作者:Huanbin Teng。源代码:codefloe.com/huanbin/pages。
Author of this modified version: Huanbin Teng. Source code: codefloe.com/huanbin/pages.
开发说明:本项目的修改使用 GPT-6 Astra 进行了编程。Bourbon 和主页都用 OCaml 编写,经 js_of_ocaml 编译为浏览器程序,统一构建、测试后发布。
Development: the modifications to this project were programmed using GPT-6 Astra. Bourbon and the homepage are written in OCaml and compiled to browser programs with js_of_ocaml; both are built, tested and published together.
简短教程
Quick tutorial
- 点「编辑音位库」,选择一个参考模板(例如普通话),勾选要纳入的音段,然后点「单独应用」;也可以「加入当前比较」,同时比较几个音位库。
- 在辅音表、元音表中点几个音段按钮。特征表随即显示它们的取值:+ 或 − 表示所选音段都取这个值,≠ 表示取值不同;点 ≠ 旁边的小箭头,可以看每个音段各取什么值。
- 在某个特征行用 + 或 − 筛选,图表会突出符合条件的音段,中间的选项清除这一项筛选。用「显示特征」只看相同值、不同值或有值的特征。
- 点特征列表附近的「最小特征集」,查看把所选音段与其他音段(选多个时,把它们彼此)区分开所需的最少特征组合。
- 切换到「特征树」,看这些特征在特征几何中的位置;「编辑特征树」可以调整结构,点「应用到当前音位库」后保存。
- 修改完成后导出「完整备份 JSON」;想在电子表格中编辑时,用「导出矩阵 CSV」。
- Choose “Edit inventory”, pick a reference inventory (Mandarin, for example), check the segments to include and choose “Use this inventory”, or “Add to comparison” to compare several inventories.
- Click a few segment buttons in the consonant and vowel charts. The feature table shows their values: + or − means every selected segment has that value, ≠ means they differ; the small arrow next to ≠ lists each segment's value.
- Filter with + or − on a feature row to highlight matching segments; the middle option clears that filter. “Show features” limits the table to same, different or assigned values.
- Choose “Minimal features” near the feature list to see the smallest feature sets that tell the selected segment apart from the rest of its inventory, or several selected segments from each other.
- Switch to “Feature tree” to see where the features sit in the feature geometry; “Edit tree” changes the structure, saved with “Apply to this inventory”.
- When done, export a “Full JSON backup”; use “Export matrix CSV” to edit values in a spreadsheet.
功能说明
Features
音位库与音段
Inventories and segments
- 15 个参考模板:普通话、香港粤语、英语(Whiskey 原版)、标准南部英式英语、法国法语、西班牙语、巴西葡萄牙语、标准维吾尔语、河内越南语、挪威语(城市东部)、标准意大利语、标准印地语、加泰罗尼亚语、波兰语、土耳其语。音位库可以重命名、复制、删除或恢复默认。
- 每个音段可单独编辑 IPA 拼写、图表位置、说明和特征值,也可以从空白矩阵新建或复制已有矩阵。长音、鼻化、送气、气声、唇化、儿化和音节性等选项会同时更新 IPA 拼写和对应特征值,点「保存音段」后生效。
- 元音表下方的开关控制显示哪些附加形式;隐藏不删除数据。IPA 文本按 Unicode NFC 处理,保留上标等区别。
- 15 reference inventories: Mandarin, Hong Kong Cantonese, English (Whiskey original), Standard Southern British English, French (France), Spanish, Brazilian Portuguese, Standard Uyghur, Hanoi Vietnamese, Norwegian (Urban East), Standard Italian, Standard Hindi, Catalan, Polish and Turkish. Inventories can be renamed, copied, deleted or restored.
- Each segment's IPA spelling, chart position, notes and feature values can be edited, starting from a blank matrix or a copy. Length, nasalization, aspiration, breathy voice, labialization, rhoticization and syllabicity update both the spelling and the linked values, applied with “Save segment”.
- Switches below the vowel chart choose which modified forms are shown; hiding deletes nothing. IPA text is kept in Unicode NFC, which preserves superscripts and other distinctions.
特征取值、比较与筛选
Values, comparison and filters
- 取值:+(正)、−(负)、0(未指定,不等于负值)、both/±(兼容两者)。只有所选音段都明确取同一个值,才算共同的 + 或 −。
- 「显示特征」可选全部、相同值、不同值、有值;「分组」可按比较结果(相同、不同、含未指定、全部未指定)排列特征表。「隐藏」把特征移到表格底部,可随时恢复。
- 「特征管理」中新建、删除或恢复特征,中英文名称填一种即可,ID 可自动生成。多个音位库共用的特征定义必须兼容才能比较;某音位库没有的特征,按未指定处理。
- Values: + (positive), − (negative), 0 (unspecified, not negative) and both / ± (compatible with either). A value is shared only when every selected segment has it explicitly.
- “Show features” offers all, same, different or assigned values; “Group by” can arrange the table by comparison (same, different, contains unspecified, all unspecified). “Hide” moves a feature to a restore area at the bottom.
- “Manage features” creates, deletes or restores features; a name in one language is enough, and IDs can be generated. Inventories compared together must define shared features compatibly; a feature missing from one inventory counts as unspecified there.
最小特征集
Minimal feature sets
- 选一个音段时,找出把它与所在音位库其他音段区分开的最少特征;选多个时,找出把它们两两区分开的最少特征。只有相反的 + 与 − 才算区分,隐藏的特征不参与。
- 最多列出排名前 19 的具体组合(默认按特征树层级、再按英文名称排序,也可按特征表顺序),可要求必须包含或排除某些特征,并逐项查看每个特征区分了哪些音段。结果不保存、不导出。
- With one segment selected, it finds the fewest features that tell it apart from the rest of its inventory; with several, the fewest that tell every pair apart. Only opposite + and − count; hidden features are left out.
- Up to the best 19 concrete combinations are listed (ranked by tree level, then English name, or by table order). Features can be required or excluded, and each feature's distinctions can be inspected. Results are neither saved nor exported.
特征几何与特征树
Feature geometry and trees
- 默认几何把辅音和元音特征放在同一结构中:根节点 R 下有喉上、喉部和部位节点,lab、cor、dors 统辖各自的下级特征;可以为特征添加额外的上级。
- 特征树可横向或纵向排列,可放大、缩小、适应窗口和展开查看。「编辑特征树」在独立草稿中即时预览,「应用到当前音位库」保存、「取消」放弃;通用树模板可在音位库之间复用。
- The default geometry puts consonant and vowel features in one structure: Supra-laryngeal, Laryngeal and Place nodes under the root R, with lab, cor and dors carrying their dependents; features may have additional parents.
- Trees can be laid out horizontally or vertically, zoomed, fitted and expanded. “Edit tree” works on a draft with live preview, saved with “Apply to this inventory” or dropped with Cancel; general tree templates can be reused across inventories.
保存、撤销与交换
Saving, undo and exchange
- 修改自动保存在当前浏览器;「撤销」(或 Ctrl+Z/⌘Z)可逐步撤销最近 100 步,刷新后仍然有效。
- 「完整备份 JSON」保存全部音位库、特征、树和模板;「导出矩阵 CSV」以音段为行、特征为列,便于用电子表格编辑。导入时可先预览,未知的 IPA 符号需要指定图表位置;也能导入旧版的 ZIP 文件包。
- 页头「配色」提供五种主题,各种状态颜色可以自定;可在实际大小与适应窗口两种视图间切换。
- Changes are saved in this browser automatically; Undo (or Ctrl+Z / ⌘Z) steps back through the last 100 changes, even after reloading.
- “Full JSON backup” keeps every inventory, feature, tree and template; “Export matrix CSV” gives segment rows and feature columns for spreadsheets. Imports are previewed first, unknown IPA symbols get a chart position, and legacy ZIP bundles are accepted.
- “Appearance” in the header offers five themes with adjustable state colours; the page can be shown at actual size or fitted to the window.
Whiskey:来源、许可与致谢
Whiskey: origin, license and credit
Bourbon 源自 Klaus Llwynog 开发的 Whiskey Feature Switchboard,一个查看音段特征、按音系特征筛选音段的工具。据原站说明,Whiskey 最初发布在 GitHub Pages;页面下线后,Sylvia Page 联系作者取得源码,让工具重新上线,继续供语言学学生使用。Bourbon 基于重新上线的版本修改而成。
Bourbon is derived from Whiskey Feature Switchboard, Klaus Llwynog's tool for inspecting segment features and filtering segments by phonological features. According to the original About page, Whiskey was first published on GitHub Pages; after that page went offline, Sylvia Page contacted the author for the source, and the tool was brought back online for linguistics students. Bourbon modifies that restored version.
Whiskey 版权 © 2018 Klaus Llwynog,按 GNU GPL 第 3 版或任何后续版本发布;作者欢迎在注明出处、不限制许可的前提下使用、修改和分享。Bourbon 是 Whiskey 的修改版,修改始于 2026 年 9 月 11 日;其中源自 Whiskey 的程序、数据和文字,版权归原作者所有。使用或介绍 Bourbon 时,请同时注明 Whiskey 和 Klaus Llwynog。
Whiskey is © 2018 Klaus Llwynog, released under the GNU GPL version 3 or any later version; the author welcomes use, modification and sharing as long as credit is given and the license is not restricted. Bourbon is a modified version of Whiskey, modified from 11 September 2026; the program, data and text it takes from Whiskey remain the original author's. When using or presenting Bourbon, please also credit Whiskey and Klaus Llwynog.
其他第三方组件
Other components
- 国际音标字体 Charis SIL(© SIL International),采用 SIL OFL 1.1。
- Bitstream Charter 字体(© Bitstream Inc.),许可见 Charter-license.txt。BITSTREAM CHARTER 是 Bitstream Inc. 的注册商标。
- 中文回退字体 Noto Sans SC 及其改名的单字子集 Bourbon Han(Google Inc.),采用 SIL OFL 1.1,详见 FONTS.md。
- 程序包含 js_of_ocaml 运行时与 OCaml 标准库(LGPL-2.1-or-later,附 OCaml 链接例外),以及 Brr、Uutf、Uunf、Uucp(ISC,Unicode 数据适用 Unicode 许可)。
- The IPA font Charis SIL (© SIL International), under the SIL OFL 1.1.
- The Bitstream Charter font (© Bitstream Inc.), under its license. BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
- The Chinese fallback font Noto Sans SC and its renamed one-character subset Bourbon Han (Google Inc.), under the SIL OFL 1.1; see FONTS.md.
- The program includes the js_of_ocaml runtime and the OCaml standard library (LGPL-2.1-or-later with the OCaml linking exception), and Brr, Uutf, Uunf and Uucp (ISC; Unicode data under the Unicode License).
许可、隐私与免责
License, privacy and disclaimer
Bourbon 按 GPL-3.0-or-later 发布,完整的第三方版权声明见 THIRD-PARTY-NOTICES.md,使用说明见 README.md。
Bourbon is released under GPL-3.0-or-later; all third-party notices are in THIRD-PARTY-NOTICES.md, and the full guide is in README.md.
预设和修改只保存在你当前的浏览器中,不会上传到服务器、影响其他访客或跨设备同步;浏览器存储不是备份,请导出 JSON。
Presets and edits stay in your current browser. They are not uploaded, shared with other visitors or synced across devices; browser storage is not a backup, so export JSON.
参考模板只是方便起步的样板,不保证适用于任何特定语言变体或研究问题。用于研究前,请根据目标语言、方言、资料来源和具体课题,自行核查并修改音位清单、音段和特征赋值;各模板的来源与范围见模板说明及 DATA.md。本工具按原样提供,不附带任何担保。
The reference inventories are starting points, not guaranteed analyses of any language variety or research question. Before research use, check and revise the inventory, segments and feature values against the target language, dialect, sources and study; each template's sources and scope are in its notes and in DATA.md. The tool is provided as is, without any warranty.