public void TestSimpleGerman1() { Phonetizer p = new Phonetizer(); p.Rules = RuleLoader.LoadFromRessource("phonet4n.Core.german_1.csv"); Assert.AreEqual(919 * 3, p.Rules.Length); Assert.AreEqual("MEIA", p.Phonetize("Meier")); Assert.AreEqual("MEIA", p.Phonetize("Mayer")); Assert.AreEqual("FEIFA", p.Phonetize("Pfeiffer")); Assert.AreEqual("FEIFA", p.Phonetize("Pfeifer")); }
public void TestRecurringDigits_Strip() { Phonetizer p = new Phonetizer(false); p.Rules = RuleLoader.LoadFromRessource("phonet4n.Core.german_1.csv"); Assert.AreEqual(919 * 3, p.Rules.Length); Assert.AreEqual("TEST01", p.Phonetize("Teest01")); Assert.AreEqual("TEST01", p.Phonetize("Teest001")); Assert.AreEqual("0123456789", p.Phonetize("00112233445566778899")); Assert.AreEqual("0", p.Phonetize("0000")); }