The "Fossies" Software Archive
... Fresh Open Source Software mainly for Internet, Engineering and Science ...

Fossies spelling error score points calculation and grade assignment

Fossies spelling error score points calculation

The basic idea for the scoring is to set the number of spelling errors in relation to the coded words (to get reasonable integers that value is multiplied by an arbitray scale factor of 100000). Every found error type counts fully but any further occurrence of such an error only half. Since the effort for counting the number of words is too big we use simply the number of lines reported by the Fossies CLOC ("Count Lines Of Code") analysis. But we are weighting the number of comment lines twice compared to the real code lines since they may contain more potential to make spelling errors.

So Fossies uses internally the following a little bit arbitrary and probably often "unfair" formula to calculate the spelling error score points:

                      NO_OF_SPELL_ERROR_TYPES + (NO_OF_SPELL_ERROR_OCCURRENCES - NO_OF_SPELL_ERROR_TYPES) / 2
     SCORE = 100000 * ---------------------------------------------------------------------------------------
                                            2 * NO_OF_COMMENT_LINES + NO_OF_CODE_LINES                        

The calculated score points are principally visible as tooltip if the mouse is moved about a shown grade (see the example line below).

Fossies grade assignment

The grade assignment may appear a little bit "strict" but it's easy to become a better grade by simply typing some correcting letters ;-)

SCOREGRADESCOREGRADESCOREGRADESCOREGRADESCOREGRADESCOREGRADE
≤ 1A+≤ 9B+≤ 24C+≤ 60D+≤ 150E+> 310F
≤ 4A ≤ 14B ≤ 37C ≤ 91D ≤ 259E
≤ 6A-≤ 17B-≤ 44C-≤107D-≤ 310E-

The in this way assigned grade is shown in a line like the following near the top of a Fossies codespelling analysis page:

   Source code spelling error rating grade: "C+"


Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)