Segmenter.Base.Collectors.FrequencyDictionary.GetWord C# (CSharp) Méthode

GetWord() public méthode

Returns the word to the index at a given
public GetWord ( int index ) : string
index int a specified cursorPosition of word
Résultat string
        public string GetWord(int index)
        {
            string str = string.Empty;
            try
            {
                str = GetWords()[index];
            }
            catch (Exception)
            {
            }

            return str;
        }

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::GetWord