HermitCrab: analysis metathesis drops the middle context that synthesis keeps

Abierto
#619 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@johnml1135 ya está trabajando en esto.

Desde el 6/11/2026.

  • #620 de @johnml1135 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
backend, testing

Línea de trabajo

Read the constructor in src/SIL.Machine.Morphology.HermitCrab/PhonologicalRules/AnalysisMetathesisRuleSpec.cs alongside SynthesisMetathesisRuleSpec.ApplyRhs to understand how the middle context is handled. Keep that context in the analysis pattern and add the metathesis-middle-context fixture to the conformance suite; done means parsing kita finds root tika and the conformance case passes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

AnalysisMetathesisRuleSpec drops the segments between the two switch groups, but SynthesisMetathesisRuleSpec keeps them, so hc.dll never un-applies a metathesis rule with a middle context. For a rule t i k -> k i t, root tika synthesizes to kita, yet parsing kita returns only the analysis of root kita and never tika.

Where: the constructor of src/SIL.Machine.Morphology.HermitCrab/PhonologicalRules/AnalysisMetathesisRuleSpec.cs rebuilds the pattern from the nodes before the first Group, the two switch groups, and the nodes after the last Group (TakeWhile(n => !(n is Group)) from each end). Every node between the groups is lost. SynthesisMetathesisRuleSpec.ApplyRhs (MoveNodesAfter) leaves the middle node in its slot.

Reachable from FieldWorks: a rule's StrucChange can hold a context between the switches.

Repro: fixture conformance-staging/edge-cases/metathesis-middle-context in sillsdev/pangloss (#162). On machine 4d9b454d, kita gives KITA|kita only, and tika gives no analysis.

PanGloss: PanGloss keeps the middle context in analysis and finds root tika. The conformance case will expect that once this is fixed.

Next: keep the middle context in the analysis pattern and add the fixture to the conformance suite.

🤖 Generated with Claude Code

Lenguaje dominante
C#
Estrellas
29
Forks
16
Merge medio
3 d 20 h
PR fusionados (30 d)
12

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sillsdev/machine

Todos los issues de sillsdev/machine

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.