github/linguist — pull request #1779 by larsbrinkhoff (2014-11-27 11:12:21+00:00)
Title: Disambiguate .fr between Frege, Forth, and plain text files

This expands the scope of #1701, which is superseded if this PR more appropriate.

There are about 20000 `.fr` files on GitHub. They are currently all detected as `Frege`, but actually most are just plain text files (mostly in French). This PR adds samples, heuristics, etc to vastly improve classification.

Tested with two sets of samples provided by @arfon: one with the keyword "the" and another one with "le". Below are the result of running `linguist` **before** and **after** my changes. **Actual** is my manual classification of the samples.

#### "The" samples:
| Language | Before | After | Actual |
|----------|-------:|------:|-------:|
| text | | 702 | 671 |
| Forth | | 132 | 132 |
| Frege | 1000 | 122 | 122 |
| XML | | 44 | 49 |
| C | | | 11 |
| Groff | | | 8 |
| Makefile | | | 7 |

#### "Le" samples:
| Language | Before | After | Actual |
|----------|-------:|------:|-------:|
| text | | 910 | 916 |
| XML | | 41 | 41 |
| HTML | | 40 | 40 |
| Frege | 1000 | 3 | |
| Forth | | 3 | |
| Shell | | 2 | 2 |
| Perl | | 1 | 1 |