GitHub builds OctoLingua: an ANN-based machine learning classifier for programming language detection
Language detection at GitHub is non-trivial because file extensions are ambiguous, shared across languages, or absent entirely. The existing tool Linguist achieved 84% file-level accuracy but its performance declined considerably when extensions were missing or incorrect, making it unsuitable for Gists and inline code snippets in READMEs, issues, and pull requests.
Linguist relies on heuristics and a Naive Bayes classifier trained on a small sample of data; it fails as soon as file extension information is altered or removed, revealing that it does not robustly learn from code vocabulary.
OctoLingua, built on an ANN architecture using Python, Keras, and TensorFlow, surpasses Linguist in accuracy and performance and maintains good performance under various conditions, learning primarily from code vocabulary rather than file extension metadata.
Frequently asked questions
What did this team achieve with this AI workflow?
OctoLingua, built on an ANN architecture using Python, Keras, and TensorFlow, surpasses Linguist in accuracy and performance and maintains good performance under various conditions, learning primarily from code vocabu…
What tools did this team use?
OctoLingua, Linguist, Python, Keras, TensorFlow, ANN.
What results were reported?
Linguist file-level accuracy (baseline): 84%; OctoLingua accuracy vs Linguist: surpasses Linguist in accuracy and performance; OctoLingua robustness under varied conditions: maintains a good performance under various conditions (source-reported, not independently verified).
What failed first in this deployment?
Linguist relies on heuristics and a Naive Bayes classifier trained on a small sample of data; it fails as soon as file extension information is altered or removed, revealing that it does not robustly learn from code v…
How is this quality assurance AI workflow structured?
Code pushed to repository → Feature extraction → ANN language classification → Language classification output.