Passer à la navigation principale Passer à la recherche Passer au contenu principal

Content-Based Textual File Type Detection at Scale

  • University of Bologna

Résultats de recherche: Le chapitre dans un livre, un rapport, une anthologie ou une collectionContribution à une conférenceRevue par des pairs

Résumé

Programming language detection is a common need in the analysis of large source code bases. It is supported by a number of existing tools that rely on several features, and most notably file extensions, to determine file types. We consider the problem of accurately detecting the type of files commonly found in software code bases, based solely on textual file content. Doing so is helpful to classify source code that lack file extensions (e.g., code snippets posted on the Web or executable scripts), to avoid misclassifying source code that has been recorded with wrong or uncommon file extensions, and also shed some light on the intrinsic recognizability of source code files. We propose a simple model that (a) use a language-agnostic word tokenizer for textual files, (b) group tokens in 1-/2-grams, (c) build feature vectors based on N-gram frequencies, and (d) use a simple fully connected neural network as classifier. As training set we use textual files extracted from GitHub repositories with at least 1000 stars, using existing file extensions as ground truth. Despite its simplicity the proposed model reaches ≈ 85% in our experiments for a relatively high number of recognized classes (more than 130 file types).

langue originaleAnglais
titre2021 13th International Conference on Machine Learning and Computing, ICMLC 2021
EditeurAssociation for Computing Machinery
Pages485-492
Nombre de pages8
ISBN (Electronique)9781450389310
Les DOIs
étatPublié - 26 févr. 2021
Modification externeOui
Evénement2021 13th International Conference on Machine Learning and Computing, ICMLC 2021 - Virtual, Online, Chine
Durée: 26 févr. 20211 mars 2021

Série de publications

NomACM International Conference Proceeding Series

Une conférence

Une conférence2021 13th International Conference on Machine Learning and Computing, ICMLC 2021
Pays/TerritoireChine
La villeVirtual, Online
période26/02/211/03/21

Empreinte digitale

Examiner les sujets de recherche de « Content-Based Textual File Type Detection at Scale ». Ensemble, ils forment une empreinte digitale unique.

Contient cette citation