Adjetivos Masculinos - Adjetivos masculinos/femeninos by Spanish with la Sra Rodriguez | TPT
Adjetivos masculinos/femeninos by Spanish with la Sra Rodriguez | TPT

Gender agreement in Portuguese adjectives

When I first started writing code that processes Portuguese text, I assumed adjective gender matching was just a simple string replacement job. It isn't. You have the basic rule — add -a to form the feminine — and then you have everything else.

Os adjetivos masculinos mais comuns

Most masculine adjectives end in a consonant or -o in their base form. Words like grande, feliz, azul — these don't change shape based on gender at all. They're invariable. That's the first thing people miss. They try to force a feminine form where none exists and end up writing "grandea" or something equally wrong. Then there are the ones that actually change. Bom becomes boa. Novo becomes nova. These follow patterns, but the patterns have exceptions even within the patterns.

How the transformation actually works

The standard approach is to look at the noun's gender and apply a suffix rule. If the noun is feminine and the adjective ends in -o, swap it for -a. If it ends in a consonant, usually add -a. If it already ends in -a, leave it alone. That covers maybe 70% of cases you'll encounter in normal text. The remaining 30% is where things get annoying. Adjectives ending in -ês like português become portuguesa, not portuguesaa. Adjectives ending in -ão like alemão become alemã. There's no single transformation rule for -ão — it depends on the word. I spent two weeks debugging a script that was outputting "alemõa" because I had written a naive replace-all rule.

Here's a practical list of the most common ones you'll need to handle:

👉 Clique no botão abaixo para saber mais sobre o assunto!

A specific problem I ran into

Last year I was building a localized UI that pulled product descriptions from a database. The backend stored everything in masculine form because the database schema used masculine as the default gender for adjective columns. When displaying to female users in European Portuguese, I needed to flip adjectives to match the gender of the product noun. Simple enough in theory. The edge case was compound adjectives. Things like "verde-escuro" (dark green). My parser saw the hyphen and split it into two tokens, then tried to inflect both separately. It produced "verde-escura" which is grammatically wrong — only the second element changes, so it should be "verde-escuro" for masculine and "verde-escura" for feminine. Wait, actually in this case the first element stays the same regardless. So "verde-escuro" "verde-escura". But my code also tried to inflect "verde" to "verdea" because it didn't know verde was invariable. Fixed it by adding a whitelist of invariable color adjectives before running any transformation.

The whitelist approach is the most reliable method I've found. Hardcode the exceptions — there aren't that many high-frequency ones — and let a rule-based system handle the rest. It takes about an hour to build the initial list if you're thorough, and then it covers 99% of real-world usage.

Things that will break your implementation

Preposed adjectives behave differently from postposed ones in some cases. A word like bonito can change meaning depending on position, and the gender agreement still has to happen. Don't try to be clever with semantic analysis. Just match the nearest noun and apply the rule. You'll be right most of the time. European Portuguese and Brazilian Portuguese agree on adjective gender 99% of the time, but there are regional forms that differ. Words like "carinhoso/carinhosa" work everywhere, but some speakers use different forms in specific contexts. If you're localizing for a specific region, add that region's variants to your whitelist. If you're building a general tool, stick to the standard forms and document the limitation.

The biggest bottleneck is context. Without knowing the noun's gender, you can't determine the adjective's form. Some nouns are notoriously variable — gente is feminine but refers to people collectively, coisas is plural feminine. If your system only sees the adjective in isolation, it's guessing. You need the noun, or at least the noun phrase, to get this right.

Practical recommendation

Start with a rules engine: -o -a, consonant + -a, already -a unchanged. Then layer in a static lookup table for invariable adjectives and irregulars. Don't overcomplicate it with NER or dependency parsing unless your use case requires it. For most applications — forms, simple content generation, basic localization — the rule-plus-table approach handles everything correctly with zero ML overhead. If you need to process large volumes of text and you're dealing with technical or legal documents where precision matters, consider using an existing NLP library that already has PT morphological analysis built in. They've already solved the edge cases. Rolling your own is fine for learning or simple projects, but you'll reinvent a lot of wheels.