ABB.Swum.WordData.PositionalFrequencies.GetNounProbability C# (CSharp) Method

GetNounProbability() public method

Calculates the probability that the given word is a noun, based on its positional frequencies.
public GetNounProbability ( string word ) : double
word string The word.
return double
        public double GetNounProbability(string word)
        {
            double prob = 0d;
            int total = GetTotalFrequency(word);
            if (total > 0)
            {
                prob = 100d * (GetMiddleFrequency(word) + GetLastFrequency(word)) / total;
            }
            return prob;
        }
    }