public void GetMultipleSubjects() { var sentences = new List <Sentence>(); sentences.Add(new Sentence { Subject = new Token { Lemmas = "ninja" } }); sentences.Add(new Sentence { Subject = new Token { Lemmas = "people" } }); var analyzedChat = new AnalyzedChat { naturalLanguageData = new NaturalLanguageData { sentences = sentences } }; var service = new ResponseSubjectService(); var result = service.GetSubjects(analyzedChat); Assert.Equal(2, result.Count); }
public void GetSameSubject() { var sentences = new List <Sentence>(); sentences.Add(new Sentence { Subject = new Token { Lemmas = "ninja" } }); sentences.Add(new Sentence { Subject = new Token { Lemmas = "ninja" } }); var analyzedChat = new AnalyzedChat { naturalLanguageData = new NaturalLanguageData { sentences = sentences } }; var service = new ResponseSubjectService(); var result = service.GetSubjects(analyzedChat); Assert.Single(result); Assert.Equal("ninja", result[0].Lemmas); Assert.Equal(2, result[0].OccurenceCount); }