Lucene.Net.Analysis.Compound.Hyphenation.HyphenationTree.AddPattern C# (CSharp) Method

AddPattern() public method

Add a pattern to the tree. Mainly, to be used by PatternParser PatternParser class as callback to add a pattern to the tree.
public AddPattern ( string pattern, string ivalue ) : void
pattern string the hyphenation pattern
ivalue string interletter weight values indicating the desirability and /// priority of hyphenating at a given point within the pattern. It /// should contain only digit characters. (i.e. '0' to '9').
return void
        public virtual void AddPattern(string pattern, string ivalue)
        {
            int k = ivalues.Find(ivalue);
            if (k <= 0)
            {
                k = PackValues(ivalue);
                ivalues.Insert(ivalue, (char)k);
            }
            Insert(pattern, (char)k);
        }