Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

POS-scoped deletion blocks metathesis analysis of other words (ParseWord incomplete)

未关闭
#520 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
compilers

调研方向

Start with the ParseWord path and the conformance fixture languages/metathesis-phase-isolation, adding the prHDel rule to reproduce the missing parses for nui and mu+i. Trace how the optional deletion node is handled across deeper strata and compare it with rewrite-rule handling. Done means ParseWord returns NIU and MI+3SGU while forward generation and the existing fixture expectations still pass.

由索引模型根据 Issue 内容生成。

描述

A part-of-speech-scoped deletion rule makes metathesis words of another part of speech unparseable. Forward generation still produces them, so ParseWord is incomplete.

Repro

Start from conformance fixture languages/metathesis-phase-isolation (PR #480, 34215889) and add one deletion rule to the surface Morphology stratum, scoped to a part of speech that no metathesis word uses:

<PhonologicalRule id="prHDel">
  <PhoneticInput><PhoneticSequence><SimpleContext naturalClass="ncH" /></PhoneticSequence></PhoneticInput>
  <PhonologicalSubrules>
    <PhonologicalSubrule requiredPartsOfSpeech="posRedup">
      <PhoneticOutput><PhoneticSequence /></PhoneticOutput>
      <Environment>
        <LeftEnvironment><PhoneticTemplate><PhoneticSequence><SimpleContext naturalClass="ncVowel" /></PhoneticSequence></PhoneticTemplate></LeftEnvironment>
        <RightEnvironment><PhoneticTemplate><PhoneticSequence><SimpleContext naturalClass="ncVowel" /></PhoneticSequence></PhoneticTemplate></RightEnvironment>
      </Environment>
    </PhonologicalSubrule>
  </PhonologicalSubrules>
</PhonologicalRule>

(ncH = <SegmentNaturalClass id="ncH"><Segment segment="cH" /></SegmentNaturalClass>; add prHDel to the Morphology stratum's phonologicalRules.)

Word Root stratum / POS Expected Got
nui SimpleMeta / posSimpleMeta NIU none
mu+i ComplexMeta / posComplexMeta MI+3SGU none

Both words still generate forward (they are in the fixture's expected set, and removing prHDel restores them). The rule can never apply to either word in synthesis: wrong part of speech, and their roots live in deeper strata.

What seems to happen

Unapplying the deletion inserts an optional h between every vowel pair, before the part of speech is known, so n u (h) i. The deeper strata's metathesis rules then fail to match u–i adjacency across that optional node, so neither the (h)-present nor the (h)-absent reading reaches the metathesis unapplication. The optional node should be skippable, as it is for rewrite rules.

Notes

  • Found while adding reduplication × phonology cases for #519. The fixture now uses V _ a so it doesn't hit this.
  • It is independent of #519; master fails the same way.
  • Scope unknown: any POS-scoped deletion in a shallower stratum may block metathesis in deeper ones.
主要语言
C#
星标
29
派生
17
平均合并
4 天 15 小时
30 天内合并 PR
8

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sillsdev/machine 的其他 Issue

查看 sillsdev/machine 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。