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

GetWordsPositions() public method

Returns all words positions
public GetWordsPositions ( ) : List>
return List>
        public List<List<int>> GetWordsPositions()
        {
            return new List<List<int>>(words.Values);
        }

Usage Example

        /// <summary>
        /// The get taxons value.
        /// </summary>
        /// <param name="alphabet">
        /// The alphabet.
        /// </param>
        /// <returns>
        /// The <see cref="double"/>.
        /// </returns>
        public double GetTaxonsValue(FrequencyDictionary alphabet)
        {
            double taxons = 0;

            List<List<int>> positions = alphabet.GetWordsPositions();

            for (int index = 0; index < alphabet.Count; index++)
            {
                int countT = positions[index].Count;
                taxons += (Math.Log(countT) * countT) - countT;
            }

            return taxons;
        }
All Usage Examples Of Segmenter.Base.Collectors.FrequencyDictionary::GetWordsPositions