{"record":{"id":"af87ea25826d99ca","repo":"Humanizr/Humanizer","slug":"inflection-lexeme-id-pos-must-be-noun","errorCode":null,"errorMessage":"Inflection lexeme '{id}' pos must be 'noun'.","messagePattern":"Inflection lexeme '(.+?)' pos must be 'noun'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/InflectionCatalogParsing.cs","lineNumber":262,"sourceCode":"            {\n                if (value is not SimpleYamlMapping lexeme)\n                {\n                    throw new InvalidOperationException(\"Inflection lexemes must be mappings.\");\n                }\n\n                ValidateProperties(\n                    lexeme,\n                    \"Inflection lexeme\",\n                    \"id\", \"pos\", \"countability\", \"sense\", \"forms\", \"sources\");\n                var id = GetRequiredScalar(lexeme, \"id\", \"Inflection lexeme must define id\");\n                if (!ids.Add(id))\n                {\n                    throw new InvalidOperationException($\"Duplicate inflection lexeme id '{id}'.\");\n                }\n\n                if (GetRequiredScalar(lexeme, \"pos\", $\"Inflection lexeme '{id}' must define pos\") != \"noun\")\n                {\n                    throw new InvalidOperationException($\"Inflection lexeme '{id}' pos must be 'noun'.\");\n                }\n\n                var countability = GetRequiredScalar(\n                    lexeme,\n                    \"countability\",\n                    $\"Inflection lexeme '{id}' must define countability\");\n                if (!Countabilities.Contains(countability))\n                {\n                    throw new InvalidOperationException(\n                        $\"Inflection lexeme '{id}' countability '{countability}' is unsupported.\");\n                }\n\n                string? sense = null;\n                if (lexeme.TryGetValue(\"sense\", out var senseValue))\n                {\n                    if (senseValue is not SimpleYamlScalar senseScalar ||\n                        string.IsNullOrWhiteSpace(senseScalar.Value))\n                    {","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/InflectionCatalogParsing.cs#L244-L280","documentation":"The inflection engine currently only inflects nouns, so each lexeme's 'pos' must be the literal string 'noun'. ParseLexemes throws for any other value.","triggerScenarios":"A lexeme has 'pos: verb', 'pos: adjective', or any value other than 'noun'.","commonSituations":"Modeling non-noun parts of speech before the engine supports them; a typo such as 'Noun' (the check is ordinal/case-sensitive).","solutions":["Set 'pos: 'noun'' exactly","Omit the lexeme until its part of speech is supported"],"exampleFix":"# before\n      - id: 'zz.verb.run'\n        pos: 'verb'\n# after\n      - id: 'zz.noun.cat'\n        pos: 'noun'","handlingStrategy":"validation","validationCode":"foreach (var lexeme in lexemes)\n    if (lexeme.Pos != \"noun\")\n        Report($\"{locale}: lexeme '{lexeme.Id}' pos must be 'noun'.\");","typeGuard":"static bool AllPosNoun(IEnumerable<Lexeme> lexemes) =>\n    lexemes.All(l => l.Pos == \"noun\");","tryCatchPattern":null,"preventionTips":["The engine currently supports only nouns; do not author other parts of speech"],"tags":["inflection","localization","yaml","source-generator","locale","validation"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}