Example #1
0
        public void SpellZimbabwe()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.IsFinalEPronounced = true;
            Assert.AreEqual("Sinpapuwe", engine.OneName("Zimbabwe", options));
        }
Example #2
0
        public void SpellCameroon()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage = LanguageForR.TrilledTapped;
            Assert.AreEqual("Kamelun", engine.OneName("Cameroon", options));
        }
Example #3
0
        public void SpellVanuatu()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.VowelCluster = ClusterPreference.Split;
            Assert.AreEqual("Wanuwatu", engine.OneName("Vanuatu", options));
        }
Example #4
0
        public void SpellKiribati()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage = LanguageForR.TrilledTapped;
            Assert.AreEqual("Kilipasi", engine.OneName("Kiribati", options));
        }
Example #5
0
        public void SpellSamoa()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.VowelCluster = ClusterPreference.Split;
            Assert.AreEqual("Samowa", engine.OneName("Samoa", options));
        }
Example #6
0
        public void SpellRwanda()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage = LanguageForR.TrilledTapped;
            Assert.AreEqual("Luwanta", engine.OneName("Rwanda", options));
        }
Example #7
0
        public void SpellGuineaBissau()
        {
            //We will never do better, but we want the test to fail if we do worse.
            Assert.IsTrue(TransliterateEngine.DifferByOnlyOneLetter("Kinepisa", engine.OneName("Guinea-Bissau")));

            //Assert.AreEqual("Kinepisa", engine.OneName("Guinea-Bissau"));
        }
Example #8
0
        public void SpellPapuaNewGuinea()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.VowelCluster = ClusterPreference.Split;
            Assert.AreEqual("Papuwanukineja", engine.OneName("Papua New Guinea", options));
            Assert.AreEqual("Papuwanijukini", engine.OneName("Papua Niugini", options));
        }
Example #9
0
        public void SpellSierraLeone()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage    = LanguageForR.TrilledTapped;
            options.VowelCluster = ClusterPreference.Split;
            Assert.AreEqual("Sijelalijon", engine.OneName("Sierra Leone", options));
        }
Example #10
0
        [Ignore] //Can't make this pass.
        public void SpellAlgeria()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage = LanguageForR.FrenchGerman;

            Assert.AreEqual("Sasali", engine.OneName("Algeria", options));
        }
Example #11
0
        public void SpellBurkinaFaso()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage = LanguageForR.FrenchGerman;

            Assert.AreEqual("Pukinapaso", engine.OneName("Burkina Faso", options));
        }
Example #12
0
 private void IsCloseEnough(string expected, string actual)
 {
     //string expected = "Isijopija";
     //string actual = engine.OneName("Ethiopia", options);
     Assert.IsTrue(
         TransliterateEngine.DifferByOnlyOneLetter(expected, actual),
         string.Format("Expected {0} found {1}", expected, actual));
 }
Example #13
0
        public void SpellEritrea()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage    = LanguageForR.TrilledTapped;
            options.VowelCluster = ClusterPreference.Split;
            Assert.AreEqual("Eliteja", engine.OneName("Eritrea", options));
        }
Example #14
0
        public void SpellEquatorialGuinea()
        {
            //Too hard, with 2 words
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage    = LanguageForR.TrilledTapped;
            options.VowelCluster = ClusterPreference.Split;
            Assert.AreEqual("Kinejekatolija", engine.OneName("Guinea Equatorial", options));
        }
Example #15
0
        public void SpellEnglishSingleLetterA()
        {
            Options options = TransliterateEngine.DefaultOptions();


            string tokipona = engine.OneName("a", options);

            Assert.AreEqual("a", tokipona);
        }
Example #16
0
        [Ignore]//Ran out of timne
        public void SpellEnglishSpasm()
        {
            Options options = TransliterateEngine.DefaultOptions();


            string tokipona = engine.OneName("spasm", options);

            Assert.AreEqual("Sasim", tokipona);
        }
Example #17
0
        public void SpellEnglishBeach()
        {
            Options options = TransliterateEngine.DefaultOptions();


            string tokipona = engine.OneName("beach", options);

            Assert.AreEqual("Pe", tokipona);
        }
Example #18
0
        public void SpellBotswana()
        {
            //Potana
            Options options = TransliterateEngine.DefaultOptions();

            options.ConsonantCluster = ClusterPreference.Split;
            options.NeutralVowel     = "u";

            Assert.AreEqual("Posuwana", engine.OneName("Botswana", options));
        }
Example #19
0
        public void SpellEnglishMary()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage = LanguageForR.TrilledTapped;

            string tokipona = engine.OneName("Mery", options);

            Assert.AreEqual("Meli", tokipona);
        }
Example #20
0
        public void SpellEthiopia()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.VowelCluster = ClusterPreference.Split;

            const string expected = "Isijopija";
            string       actual   = engine.OneName("Ethiopia", options);

            IsCloseEnough(expected, actual);
        }
Example #21
0
        public void SpellLiberia()
        {
            Options options = TransliterateEngine.DefaultOptions();

            options.RLanguage    = LanguageForR.English;
            options.VowelCluster = ClusterPreference.Split;

            const string expected = "Lapewija";
            string       actual   = engine.OneName("Liberia", options);

            IsCloseEnough(expected, actual);
        }
Example #22
0
        public string Transliterate(Options options = null)
        {
            if (options == null)
            {
                options = new Options()
                {
                    ConsonantCluster   = ClusterPreference.Merge,
                    IsFinalEPronounced = false,
                    NeutralConsonant   = "j",
                    NeutralVowel       = "o",
                    RLanguage          = LanguageForR.English,
                    SorT         = "s",
                    VowelCluster = ClusterPreference.Merge
                };
            }
            TransliterateEngine engine = new TransliterateEngine();
            string trace;
            string plain = Text.Replace("*", " ").Replace(@"""", " ");

            return(engine.Transliterate(plain, out trace, options));
        }
 public void LeaveConsonantClustersWithNk()
 {
     Assert.AreEqual("nanka", TransliterateEngine.DropConsonantClusters("nanka"));
 }
 public void RemoveDoubleConsonantsTs()
 {
     Assert.AreEqual("mata", TransliterateEngine.RemoveDoubleConstants("matta"));
 }
 public void TestMayLetterDifferent()
 {
     Assert.IsTrue(TransliterateEngine.DifferByOnlyOneLetter("aadsfasdf", "aadsfastf"));
 }
 public void TestSingleLetterSame()
 {
     Assert.IsTrue(TransliterateEngine.DifferByOnlyOneLetter("a", "a"));
 }