Segmenter.Base.Collectors.FrequencyDictionary.Remove C# (CSharp) Method

Remove() public method

Removes the word (and its corresponding a list of positions) from this FrequencyDictionary. This method does nothing if the key is not in the FrequencyDictionary.
public Remove ( string str ) : void
str string the word that needs to be removed
return void
        public void Remove(string str)
        {
            try
            {
                words.Remove(str);
            }
            catch (Exception)
            {
            }
        }

Usage Example

 public void EqualsTest()
 {
     string str = chain.ToString();
     var alphabet1 = new FrequencyDictionary(str);
     var alphabet2 = new FrequencyDictionary(chain);
     Assert.True(alphabet1.Equals(alphabet2));
     alphabet1.Remove(alphabet1.GetWord(1));
     Assert.True(!alphabet1.Equals(alphabet2));
 }
All Usage Examples Of Segmenter.Base.Collectors.FrequencyDictionary::Remove