/// <summary> /// Runs the analyzation. /// </summary> /// <param name="originalText"></param> /// <returns></returns> public AntextAnalyzeResult Analyze(string originalText) { List <AntextStringItem> foundItems = analyzeService.Analyze(originalText); string revisedText = ReplaceOriginalValuesByRevisedAndWrapValues(foundItems, originalText); AntextAnalyzeResult result = new AntextAnalyzeResult(foundItems, revisedText); return(result); }
/// <summary> /// Runs the analyzation and fixing (if enabled). /// </summary> /// <param name="originalText">The text to be analyzed.</param> /// <returns></returns> public AntextString Analyze(string originalText) { var outputAntex = new AntextString(); outputAntex.OriginalText = originalText; outputAntex.RevisedText = outputAntex.OriginalText; if (originalText == null) { return(outputAntex); } foreach (var analyzeService in analyzeServices) { AntextAnalyzeResult analyzedResult = analyzeService.Analyze(outputAntex.RevisedText); outputAntex.FoundItems.AddRange(analyzedResult.FoundItems); outputAntex.RevisedText = analyzedResult.RevisedText ?? outputAntex.RevisedText; } return(outputAntex); }