WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Recognize the programming language of a code snippet.

Classes

Details

  • 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.

Examples

open all close 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 :

See Also

Classify   TextCases   Import

Interpreter Types: ComputedProgrammingLanguage

Classifiers: Language   FacebookTopic   Sentiment

History

Introduced in 2018 (11.3)

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /