"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.
Examplesopen 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:
Load the ClassifierFunction corresponding to the built-in classifier:
Obtain the possible classes:
Use a custom ClassPriors to restrict the possible outputs:
Neat Examples (1)
Obtain different possible languages with their corresponding probabilities:
Visualize the result using WordCloud: