Votes among scored dialects; falls back to NumpySwigDialect for Python or PlainDialect otherwise. docstring samples to score each scored dialect against. DocstringDialect`, or the language-appropriate fallback if no dialect scored above 0.0.

Returns:

An instance of the highest-confidence `

Methods

detect_dialect

detect_dialect(language: str, samples: Raw) -> DocstringDialect

Votes among scored dialects; falls back to NumpySwigDialect for Python or PlainDialect otherwise. docstring samples to score each scored dialect against. DocstringDialect`, or the language-appropriate fallback if no dialect scored above 0.0.

Returns:

An instance of the highest-confidence `

ParameterTypeDescription
languagestrThe source language token (e.g. “python”, “cpp”).
samplesRaw

Generated with Flude

Copyright © 2026