Swahili Grammar Analysis Tool
Swahili Noun Class Identifier
Enter a noun above to see its class and agreement examples.
Brief Overview of Swahili Noun Classes:
M-WA (Class 1/2): People. Singular prefix 'm-', plural 'wa-'. Ex: mtu (person) - watu (people).
M-MI (Class 3/4): Trees, inanimate objects. Singular prefix 'm-', plural 'mi-'. Ex: mti (tree) - miti (trees).
JI-MA (Class 5/6): Augmentatives, some nouns. Singular prefix 'ji-', plural 'ma-'. Ex: jicho (eye) - macho (eyes).
KI-VI (Class 7/8): Things, diminutives, languages. Singular prefix 'ki-', plural 'vi-'. Ex: kitabu (book) - vitabu (books).
N-N (Class 9/10): Animals, some inanimate. Singular and plural typically 'n-' or 'm-' or no prefix. Ex: nyumba (house) - nyumba (houses).
U-N (Class 11/10): Abstract nouns, long thin objects. No common plural class, or N-N. Ex: ufagio (broom) - fagio (brooms).
U- (Class 11 singular): Abstract nouns with no common plural. Ex: uwizi (theft).
KU- (Class 15): Infinitives (verb nouns). Ex: kusoma (to read).
MA- (Class 6): Plural of Ji-, also mass nouns. Ex: maji (water).
PA- (Class 16 Locative): Definite place. Ex: pamoja (at one place).
KU- (Class 17 Locative): Indefinite direction/to. Ex: kule (there/to there).
MU- (Class 18 Locative): Inside/in. Ex: mtoni (in the river).
Swahili Verb Structure Analyzer
Enter a verb above to see its components.
Common Swahili Phrases with Basic Grammar Notes
Habari? - How are you? (Lit: News?)
Grammar: Informal greeting, common response "Nzuri" (Good).
Jina langu ni... - My name is...
Grammar: "Jina" (name - JI-MA class), "langu" (my - agrees with JI-MA), "ni" (is).
Unaongea Kiingereza? - Do you speak English?
Grammar: "U-" (you - singular subject prefix), "-na-" (present tense marker), "-ongea" (speak - verb root), "Kiingereza" (English - KI-VI class language prefix).
Nataka maji. - I want water.
Grammar: "N-" (I - subject prefix), "-a-" (present indefinite/habitual tense marker), "-taka" (want - verb root), "maji" (water - MA- class, mass noun).
Ninaenda sokoni. - I am going to the market.
Grammar: "Ni-" (I - subject prefix), "-na-" (present continuous tense marker), "-enda" (go - verb root), "sokoni" (to the market - locative '-ni' suffix).
Samahani. - Excuse me / Sorry.
Grammar: A common interjection, derived from the verb "kusamehe" (to forgive).
Asante sana. - Thank you very much.
Grammar: "Asante" (thank you), "sana" (very much).
This might be an Imperative or a verb starting directly with its root.
`; } } // Step 2: Identify Tense Marker (Longest first) let foundTense = false; const sortedTenseMarkers = Object.keys(tenseMarkers).sort((a, b) => b.length - a.length); for (const tense of sortedTenseMarkers) { if (tempVerb.startsWith(tense)) { tenseMarker = tense; analysis += `Tense/Aspect Marker: ${tenseMarker} (${tenseMarkers[tense]})
`; tempVerb = tempVerb.substring(tense.length); foundTense = true; break; } } if (!foundTense && foundSubject) { // Only state implied 'a' if a subject prefix was found analysis += `Tense/Aspect Marker: Ø (Often implied 'a' for habitual/indefinite present)
`; } // Step 3: Identify Object Infix (optional, Longest first) let foundObjectInfix = false; const sortedObjectInfixes = Object.keys(objectInfixes).sort((a, b) => b.length - a.length); for (const objInfix of sortedObjectInfixes) { if (tempVerb.startsWith(objInfix) && tempVerb.length > objInfix.length) { // Ensure it's a true infix, not just a root start objectInfix = objInfix; analysis += `Object Infix: ${objectInfix} (refers to ${objectInfixes[objInfix]})
`; tempVerb = tempVerb.substring(objInfix.length); foundObjectInfix = true; break; } } // The remaining part is the verb root + final vowel/suffix verbRoot = tempVerb; // Attempt to identify final suffix and true root if (verbRoot.endsWith('a')) { finalSuffix = 'a (Final Vowel)'; verbRoot = verbRoot.slice(0, -1); // Remove 'a' for a more core root } else if (verbRoot.endsWith('e')) { finalSuffix = 'e (Subjunctive/Passive/Applicative)'; verbRoot = verbRoot.slice(0, -1); } else if (verbRoot.endsWith('i')) { finalSuffix = 'i (Stative/Passive/Reciprocal)'; verbRoot = verbRoot.slice(0, -1); } else if (verbRoot.endsWith('wa')) { finalSuffix = 'wa (Passive)'; verbRoot = verbRoot.slice(0, -2); } else if (verbRoot.endsWith('ana')) { finalSuffix = 'ana (Reciprocal)'; verbRoot = verbRoot.slice(0, -3); } else if (verbRoot.endsWith('isha')) { finalSuffix = 'isha (Causative)'; verbRoot = verbRoot.slice(0, -4); } else if (verbRoot.endsWith('ia')) { finalSuffix = 'ia (Applicative)'; verbRoot = verbRoot.slice(0, -2); } analysis += `Approximate Verb Root: ${verbRoot || 'N/A'}
`; if (finalSuffix) { analysis += `Final Suffix: -${finalSuffix}
`; } else if (verbRoot.length > 0) { analysis += `Final Suffix: N/A (Irregular or Imperative Form)
`; } // Basic common conjugations for known verbs (example) if (verbRoot === 'som') { analysis += `Examples of '-soma' (to read) conjugation:
`; analysis += `- Ninasoma (I am reading)
- Ulisoma (You read)
- Atasoma (He/She will read)
- Wamesoma (They have read)
Examples of '-la' (to eat) conjugation:
`; analysis += `- Nakula (I am eating)
- Alikula (He/She ate)
- Tutakula (We will eat)
- Mmekula (You (pl) have eaten)
