org.apache.lucene.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);
	  }