Ejemplo n.º 1
0
        protected override void DoTranslate(string phrase, LanguagePair languagesPair, string subject, Result result, NetworkSetting networkSetting)
        {
            List <string> words = StringParser.SplitToWords(phrase);

            foreach (string word in words)
            {
                TranslateWord(word, languagesPair, subject, result, networkSetting);
            }
        }
Ejemplo n.º 2
0
 static int GetWordsCount(string phrase)
 {
     lock (cacheLock)
     {
         if (cachedPhrase != phrase)
         {
             cachedPhrase           = phrase;
             cachedPhraseWordsCount = StringParser.SplitToWords(phrase).Count;
         }
         return(cachedPhraseWordsCount);
     }
 }