コード例 #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);
            }
        }
コード例 #2
0
ファイル: ServiceItem.cs プロジェクト: cyotek/translateclient
 static int GetWordsCount(string phrase)
 {
     lock (cacheLock)
     {
         if (cachedPhrase != phrase)
         {
             cachedPhrase           = phrase;
             cachedPhraseWordsCount = StringParser.SplitToWords(phrase).Count;
         }
         return(cachedPhraseWordsCount);
     }
 }