/// <summary> /// Read hyphenation patterns from an <see cref="XmlReader"/>. /// </summary> /// <param name="source"> <see cref="XmlReader"/> input source for the file </param> /// <exception cref="IOException"> In case the parsing fails </exception> public virtual void LoadPatterns(XmlReader source) { PatternParser pp = new PatternParser(this); ivalues = new TernaryTree(); pp.Parse(source); // patterns/values should be now in the tree // let's optimize a bit TrimToSize(); m_vspace.TrimToSize(); m_classmap.TrimToSize(); // get rid of the auxiliary map ivalues = null; }