Пример #1
0
        public string[] GetVnKeywords()
        {
            var _keywords = CleanWordObjects
                            .Where(t => t.IsVnKeyword())
                            .Select(t => t.Value)
                            .Distinct()
                            .ToArray();

            return(_keywords);
        }
Пример #2
0
 public void LoadFull()
 {
     Words        = FullWordObjects.Select(t => t.Value).ToList();
     EnglihsWords = CleanWordObjects.Where(t => t.Lang == WordLang.English)
                    .Select(t => t.Value.ToLower())
                    .Distinct()
                    .ToList();
     VietnameseWords = CleanWordObjects.Where(t => t.Lang == WordLang.Vietnamese)
                       .Select(t => t.Value.ToLower())
                       .Distinct()
                       .ToList();
     Numbers = CleanWordObjects.Where(t => t.IsNumber())
               .Select(t => t.Value.ToLower())
               .Distinct()
               .ToList();
     UrlLinks = CleanWordObjects.Where(t => t.Value.IsUrl())
                .Select(t => t.Value.ToLower())
                .Distinct()
                .ToList();
     Emails = CleanWordObjects.Where(t => t.Value.IsEmail())
              .Select(t => t.Value.ToLower())
              .Distinct()
              .ToList();
     Sentences = CurrentText.GetSentences()
                 .Distinct()
                 .ToList();
     QuestionSentences = GetQuestionSentences();
     CountOfQuestions  = QuestionSentences.Count();
     try
     {
         Phrases   = GetPhrases().ToList();
         MathExprs = GetMathExprs().ToList();
         Commands  = GetCommands();
         MakeOutput();
     }
     catch
     {
         return;
     }
 }
Пример #3
0
 public IEnumerable <WordObject> GetWordsBy(WordLang lang)
 {
     return(CleanWordObjects.Where(t => t.Lang == lang));
 }