public void WorksForGrammarRule(string word, string expectedBase, params WordType[] derivations) { var bestResult = JpConj.Deconjugate(word).First(); Assert.AreEqual(expectedBase, bestResult.Base); CollectionAssert.AreEqual(derivations, bestResult.DerivationPath); }
public void SandboxTest() { foreach (var result in JpConj.Deconjugate("されたくない")) { Console.WriteLine($"------ {result.Base} ------"); var derivations = Enumerable.Zip( result.DerivationPath, result.CurrentDerivationSequence, (derivation, word) => new { derivation, word }); foreach (var derivation in derivations) { Console.WriteLine($"{derivation.word}: {derivation.derivation.ToLongString()}"); } } }