Esempio n. 1
0
        /// <summary>
        /// Read hyphenation patterns from an XML file.
        /// </summary>
        /// <param name="source"> the InputSource for the file </param>
        /// <exception cref="IOException"> In case the parsing fails </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void loadPatterns(org.xml.sax.InputSource source) throws java.io.IOException
        public virtual void loadPatterns(InputSource 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();
            vspace.trimToSize();
            classmap.trimToSize();

            // get rid of the auxiliary map
            ivalues = null;
        }