public Text Parse(TextReader reader) { Text text = new Text(); _sentenceItemFactory = new SentenceItemFactory(PunctuationFactory, WordFactory); string buffer = reader.ReadLine(); while (buffer != null) { text.Lines.Add(ParseLine(buffer)); buffer = reader.ReadLine(); } Console.WriteLine("Text is parsed!"); return(text); }
public Sentence Parse(string source) { _sentenceItemFactory = new SentenceItemFactory(PunctuationFactory, WordFactory); return(ParseSentence(source)); }