"ProgrammingLanguage" (Built-in Classifier)

Recognize the programming language of a code snippet.



  • This classifier assumes the string input is written in a unique programming language. The probabilities reflect the belief in which language the program is written, not the proportion of languages.


open allclose all

Basic Examples  (2)

Determine the language of a given code:

Obtain the probabilities for the most likely classes:

Obtain a ClassifierFunction for this classifier:

Apply the classifier to a code snippet:

Scope  (1)

Load the ClassifierFunction corresponding to the built-in classifier:

Obtain the possible classes:

Options  (2)

ClassPriors  (1)

Use a custom ClassPriors to restrict the possible outputs:

IndeterminateThreshold  (1)

Use a custom IndeterminateThreshold:

Neat Examples  (1)

Obtain different possible languages with their corresponding probabilities:

Visualize the result using WordCloud: