public void Process_clear_all_punctuation_marks(string inputText) { var wordsLemmatizer = new WordsLemmatizer(); var actualText = wordsLemmatizer.Process(inputText); var expetedList = new List <WordBox>() { new WordBox() { W = "контрольный", L = "контрольный" }, new WordBox() { W = "список", L = "список" }, new WordBox() { W = "управления", L = "управление" }, new WordBox() { W = "процессом", L = "процесс" }, new WordBox() { W = "разработки", L = "разработка" }, }; Assert.AreEqual(JsonConvert.SerializeObject(expetedList), actualText); }
public ActionResult <string> Post([FromBody] string content) { var wordsLemmatizator = new WordsLemmatizer(); wordsLemmatizator.AddTextProcessing(new ClearNewLines()); wordsLemmatizator.AddTextProcessing(new ClearTextPunctuator()); return(wordsLemmatizator.Process(content)); }