public virtual string Apply(string input) { if (input == null) { return(null); } return(Americanize.Americanize(input)); }
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); }