private bool checkForWord(string word)
 {
     while (true)
     {
         if (rawWords.Any(x => Soundex.Generate(word) == Soundex.Generate(x.Word)))
         {
             return(true);
         }
     }
 }
 private bool checkForCommand(string word, int applicationId)
 {
     while (true)
     {
         if (processedWords.Any(x => Soundex.Generate(word) == Soundex.Generate(x.Word) && x.WordType == VoiceWord.wordType.ApplicationCommand && x.ApplicationIdCommand == applicationId))
         {
             return(true);
         }
     }
 }
 public bool commandWasSaid(string command, int applicationId)
 {
     if (processedWords.Any(x => Soundex.Generate(command) == Soundex.Generate(x.Word) && x.WordType == VoiceWord.wordType.ApplicationCommand && x.ApplicationIdCommand == applicationId))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
 public bool wordWasSaid(string word)
 {
     if (rawWords.Any(x => Soundex.Generate(word) == Soundex.Generate(x.Word)))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        private List <VoiceWord> getCommandMessage(string word, int applicationId)
        {
            var command = processedWords.Where(x => Soundex.Generate(word) == Soundex.Generate(x.Word) && x.WordType == VoiceWord.wordType.ApplicationCommand && x.ApplicationIdCommand == applicationId).FirstOrDefault();

            if (command != null)
            {
                var message = rawWords.Where(x => x.MessageId == command.MessageId).ToList();
                return(message);
            }
            else
            {
                return(null);
            }
        }
        private List <VoiceWord> getWordMessage(string word, int applicationId)
        {
            var requestedWord = rawWords.Where(x => Soundex.Generate(word) == Soundex.Generate(x.Word)).FirstOrDefault();

            if (requestedWord != null)
            {
                var message = rawWords.Where(x => x.MessageId == requestedWord.MessageId).ToList();
                return(message);
            }
            else
            {
                return(null);
            }
        }