The positional frequency data for a given word.
Exemplo n.º 1
0
        /// <summary>
        /// Stores the given frequency data for the given word. This will overwrite any existing data for that word.
        /// </summary>
        /// <param name="word">The word.</param>
        /// <param name="first">A count of how often the word appears at the beginning of an identifier.</param>
        /// <param name="middle">A count of how often the word appears in the middle of an identifier, i.e. not first or last.</param>
        /// <param name="last">A count of how often the word appears at the end of an identifier.</param>
        /// <param name="only">A count of how often the word appears by itself in an identifier.</param>
        public void AddFrequency(string word, int first, int middle, int last, int only)
        {
            PositionalFrequencyRecord fr = new PositionalFrequencyRecord {
                First = first, Middle = middle, Last = last, Only = only, Total = first + middle + last + only
            };

            this.AddFrequency(word, fr);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Stores the given frequency data for the given word. This will overwrite any existing data for that word.
 /// </summary>
 /// <param name="word">The word.</param>
 /// <param name="record">The frequency data for the word.</param>
 public void AddFrequency(string word, PositionalFrequencyRecord record)
 {
     frequencies[word] = record;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Stores the given frequency data for the given word. This will overwrite any existing data for that word.
 /// </summary>
 /// <param name="word">The word.</param>
 /// <param name="record">The frequency data for the word.</param>
 public void AddFrequency(string word, PositionalFrequencyRecord record)
 {
     frequencies[word] = record;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Stores the given frequency data for the given word. This will overwrite any existing data for that word.
 /// </summary>
 /// <param name="word">The word.</param>
 /// <param name="first">A count of how often the word appears at the beginning of an identifier.</param>
 /// <param name="middle">A count of how often the word appears in the middle of an identifier, i.e. not first or last.</param>
 /// <param name="last">A count of how often the word appears at the end of an identifier.</param>
 /// <param name="only">A count of how often the word appears by itself in an identifier.</param>
 public void AddFrequency(string word, int first, int middle, int last, int only)
 {
     PositionalFrequencyRecord fr = new PositionalFrequencyRecord { First = first, Middle = middle, Last = last, Only = only, Total = first + middle + last + only };
     this.AddFrequency(word, fr);
 }