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 `
| Parameter | Type | Description |
|---|---|---|
| language | str | The source language token (e.g. “python”, “cpp”). |
| samples | Raw |
Generated with Flude
Copyright © 2026