public virtual string Apply(string input)
 {
     if (input == null)
     {
         return(null);
     }
     return(Americanize.Americanize(input));
 }
Esempio n. 2
0
        public virtual void TestAmericanize()
        {
            Americanize am = new Americanize();

            System.Diagnostics.Debug.Assert((exBrEWords.Length == exAmEWords.Length));
            for (int i = 0; i < exBrEWords.Length; i++)
            {
                NUnit.Framework.Assert.AreEqual("Americanization failed to agree", Americanize.Americanize(exBrEWords[i]), exAmEWords[i]);
            }
        }
 private string Fix(string word)
 {
     if (flags.normalizeTerms || flags.normalizeTimex)
     {
         // Same case for days/months: map to lowercase
         if (monthDayPattern.Matcher(word).Matches())
         {
             return(word.ToLower());
         }
     }
     if (flags.normalizeTerms)
     {
         return(Americanize.Americanize(word, false));
     }
     return(word);
 }