#[non_exhaustive]pub enum CasingRule {
Show 18 variants
FirstWord,
LastWord,
SubtitleBoundary,
HyphenatedCompound,
SmallWord,
AdverbialParticle,
NameParticle,
ContractedAnd,
ProtectedSpelling,
Abbreviation,
DottedAbbreviation,
CanonicalLexicon,
MultiwordLexicon,
AllCapsNormalized,
AllCapsPreservedAcronym,
AcronymPreserved,
MixedCasePreserved,
Capitalized,
}Expand description
The rule that decided a word’s casing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FirstWord
Capitalized as the first significant word of the title.
LastWord
Capitalized as the last significant word of the title.
SubtitleBoundary
Capitalized as the first or last word across a subtitle boundary (colon, question mark, or exclamation point).
HyphenatedCompound
Capitalized as part of a hyphenated compound.
SmallWord
Lowercased as an MLA small word (article, conjunction, preposition).
AdverbialParticle
Capitalized as the adverbial particle of a phrasal verb (heuristic).
NameParticle
Lowercased as a name particle inside a likely personal name (heuristic).
ContractedAnd
Lowercased as the 'n' contraction of “and”.
ProtectedSpelling
Kept as a protected spelling (user, built-in, or external).
Abbreviation
Rendered from the built-in abbreviation list (e.g. NASA).
DottedAbbreviation
Rendered as a dotted initialism (e.g. U.S.A.).
CanonicalLexicon
Rendered from an external canonical-spelling lexicon.
MultiwordLexicon
Rendered from an external multiword-phrase lexicon.
AllCapsNormalized
Recased from all-caps input to title case (heuristic).
AllCapsPreservedAcronym
Left all-caps as a likely acronym under a dictionary-gated policy (heuristic).
AcronymPreserved
Left all-caps as a likely acronym among mixed-case words (heuristic).
MixedCasePreserved
Preserved because the input already had internal capitals (e.g. iPhone).
Capitalized
Capitalized as an ordinary word with no lexicon confirmation.
Implementations§
Source§impl CasingRule
impl CasingRule
Sourcepub fn confidence(self) -> Confidence
pub fn confidence(self) -> Confidence
The confidence for this rule, before any word-specific refinement.