/// ----------------------------------------------------------------------------------- /// <summary> /// Constructor. /// </summary> /// <param name="analysis">An analysis string from the \a field.</param> /// ----------------------------------------------------------------------------------- internal ANAAnalysis(string analysis) { m_wordCategory = null; m_originalForm = null; if (analysis == null) { m_prefixes = null; m_stem = null; m_suffixes = null; } else { char[] seps = { s_openRootDelimiter, s_closeRootDelimiter }; string[] morphemes = TokenizeLine(analysis, seps); if (morphemes.Length != 3) { throw new ApplicationException("Incorrect delimiters."); } m_prefixes = ANAPrefix.TokenizeAffixes(morphemes[0]); m_stem = new ANAStem(morphemes[1]); m_sstem = morphemes[1]; // For cat filter m_suffixes = ANASuffix.TokenizeAffixes(morphemes[2]); } }
/// ----------------------------------------------------------------------------------- /// <summary> /// Constructor. /// </summary> /// <param name="analysis">An analysis string from the \a field.</param> /// ----------------------------------------------------------------------------------- internal ANAAnalysis(string analysis) { m_wordCategory = null; m_originalForm = null; if (analysis == null) { m_prefixes = null; m_stem = null; m_suffixes = null; } else { char[] seps = {s_openRootDelimiter, s_closeRootDelimiter}; string[] morphemes = TokenizeLine(analysis, seps); if (morphemes.Length != 3) throw new ApplicationException("Incorrect delimiters."); m_prefixes = ANAPrefix.TokenizeAffixes(morphemes[0]); m_stem = new ANAStem(morphemes[1]); m_sstem = morphemes[1]; // For cat filter m_suffixes = ANASuffix.TokenizeAffixes(morphemes[2]); } }