public string NormalizePhrase(string phrase) { try { Console.WriteLine("NormalizePhrase phrase={0}", phrase); LoadDict(); SolarixGrammarEngineNET.GrammarEngine.MorphologyFlags morph_flags = SolarixGrammarEngineNET.GrammarEngine.MorphologyFlags.SOL_GREN_COMPLETE_ONLY; SolarixGrammarEngineNET.GrammarEngine.SyntaxFlags syntax_flags = SolarixGrammarEngineNET.GrammarEngine.SyntaxFlags.DEFAULT; int MaxAlt = 30; int constraints = 600000 | (MaxAlt << 22); int id_language = SolarixGrammarEngineNET.GrammarEngineAPI.RUSSIAN_LANGUAGE; SolarixGrammarEngineNET.AnalysisResults linkages = gren.AnalyzeSyntax(phrase, id_language, morph_flags, syntax_flags, constraints); string normal_phrase = gren.NormalizePhrase(linkages); Console.WriteLine("normal_phrase={0}", normal_phrase); return(normal_phrase); } catch (Exception ex) { Console.WriteLine("Error: {0}", ex.Message); return(phrase); } }