Module 5: The Standard Library

Core Vocabulary — Your Essential Imports

Every language has a standard library — the core packages that ship out of the box, the ones you import before you write a single line of real code. Without them, you can technically run the runtime, but you can't do anything useful.

Mandarin vocabulary works the same way. You've learned the runtime (word order), the type system (measure words), memory management (particles), and error handling. But without words loaded into memory, your programs produce nothing. This module is your stdlib — the ~150 highest-frequency words, organized by package.

// Your Chinese project so far:
import { SVO, TopicComment } from "grammar/runtime";    // Module 1
import { MeasureWords } from "grammar/types";            // Module 2
import { Particles } from "grammar/memory";              // Module 3
import { Negation, Questions } from "grammar/errors";    // Module 4

// But you still need the actual data:
import * as stdlib from "vocab/core";   // ← THIS MODULE
// ~300 words. ~80% of daily conversation. Your HSK 1-2 starter pack.
The 80/20 rule is real here. The top ~300 words in Mandarin cover roughly 80% of everyday speech. HSK levels 1 and 2 represent this core set. Learn these first, and you'll understand most of what you hear. Everything else is specialization — domain-specific libraries you import as needed.

1. Package: greetings

The most basic import. Every program starts with "Hello, World!". Every language journey starts here.

Hanzi Pinyin Meaning Example / Note
你好 nǐ hǎo hello Literally "you good." The universal greeting.
谢谢 xièxie thank you 谢谢你 = thank you specifically.
再见 zàijiàn goodbye Literally "again see" — see you again.
对不起 duìbuqǐ sorry For apologies. Literally "can't face (you)."
没关系 méi guānxi it's okay / no problem The standard response to 对不起. Literally "no relation (to worry about)."
不客气 bú kèqi you're welcome The standard response to 谢谢. Literally "don't be polite."
// greetings — the handshake protocol
greetings.hello()       // → 你好
greetings.thanks()      // → 谢谢     → response: 不客气
greetings.sorry()       // → 对不起   → response: 没关系
greetings.goodbye()     // → 再见

2. Package: pronouns

Chinese pronouns are beautifully simple. No case changes. No me/my/mine/myself. Just one form per pronoun, period. It's like a language designed by someone who actually read "Don't Repeat Yourself."

Hanzi Pinyin Meaning + = possessive
I / me 我的 = my / mine
you 你的 = your / yours
he / him 他的 = his
she / her 她的 = her / hers
it 它的 = its
我们 wǒmen we / us 我们的 = our / ours
你们 nǐmen you (plural) 你们的 = your (plural)
他们 tāmen they / them 他们的 = their / theirs
// English pronouns: a messy polymorphic interface
interface EnglishPronoun {
    subject: "I" | "he" | "she" | "we" | "they";
    object:  "me" | "him" | "her" | "us" | "them";
    possAdj: "my" | "his" | "her" | "our" | "their";
    possNoun: "mine" | "his" | "hers" | "ours" | "theirs";
    reflexive: "myself" | "himself" | "herself" | "ourselves" | "themselves";
}

// Chinese pronouns: one form, one operator
interface ChinesePronoun {
    base: "我" | "你" | "他" | "她" | "它";       // That's it.
    plural: base + "们";                           // Add 们 for plural.
    possessive: base + "的";                       // Add 的 for possessive.
}
// I/me/my/mine/myself = 我 / 我 / 我的 / 我的 / 我自己. Done.
Key insight: , , and are all pronounced exactly the same: . The characters are different (for writing clarity), but in speech there is zero distinction. Chinese effectively has a single, gender-neutral third-person pronoun. Context does the rest.

3. Package: numbers

Chinese numbers are algorithmically elegant. Learn 13 words and you can construct any number up to 99,999,999. No "eleven," "twelve," "thirteen" — just ten + one, ten + two, ten + three. It's the language equivalent of a clean, composable API.

Hanzi Pinyin Value
1
èr 2
sān 3
4
5
liù 6
7
8
jiǔ 9
shí 10
bǎi 100
qiān 1,000
wàn 10,000

Now see the composition rules — it's just arithmetic:

Number Chinese Pinyin Construction
11 十一 shí yī 10 + 1
23 二十三 èr shí sān 2 * 10 + 3
99 九十九 jiǔ shí jiǔ 9 * 10 + 9
105 一百零五 yì bǎi líng wǔ 1 * 100 + + 5
1,000 一千 yì qiān 1 * 1,000
10,000 一万 yí wàn 1 * 10,000
// Chinese number construction: it's literally math
function toChineseNumber(n: number): string {
    // 11 = 十一     → shí yī       → "ten-one"
    // 23 = 二十三   → èr shí sān   → "two-ten-three"
    // 99 = 九十九   → jiǔ shí jiǔ  → "nine-ten-nine"
    // 105 = 一百零五 → yì bǎi líng wǔ → "one-hundred-zero-five"

    // English: eleven, twelve, thirteen, fourteen... (why?!)
    // Chinese: 十一, 十二, 十三, 十四... (ten+1, ten+2, ten+3, ten+4)
    // Guess which one a programmer's brain prefers.
}

// Note: 零 (líng) = zero, used as a placeholder when a middle digit is missing.
// 105 = 一百零五, not 一百五 (that means 150 in shorthand).

4. Package: time

Time in Chinese follows a strict ordering rule: big to small. Year, then month, then day, then time of day, then hour. The same order as ISO 8601 (2026-04-07T14:30). If you've ever argued that ISO dates are the only sane format, congratulations — Chinese agrees with you.

Hanzi Pinyin Meaning
今天 jīntiān today
明天 míngtiān tomorrow
昨天 zuótiān yesterday
现在 xiànzài now
上午 shàngwǔ morning (AM)
下午 xiàwǔ afternoon (PM)
晚上 wǎnshang evening / night
nián year
yuè month
day (formal)
hào day (spoken)
星期 xīngqī week
diǎn o'clock
fēn minute

Dates and times compose naturally — big unit to small unit:

// Date format: YEAR年 MONTH月 DAY日 — literally ISO 8601
// 2026年4月7日 = April 7, 2026
// èr líng èr liù nián sì yuè qī rì

// American English: April 7, 2026   (month-day-year... why?)
// Chinese:          2026年4月7日      (year-month-day ✓)
// ISO 8601:         2026-04-07       (year-month-day ✓)
// Chinese got it right from the start.

// Days of the week: 星期 + number
// 星期一 = Monday    (week-one)
// 星期二 = Tuesday   (week-two)
// 星期三 = Wednesday (week-three)
// ...
// 星期六 = Saturday  (week-six)
// 星期天 or 星期日 = Sunday (week-sky/day)

// Time: AM/PM marker BEFORE the hour (big → small)
// 下午三点十五分 = 3:15 PM
// "afternoon three o'clock fifteen minutes"
// Not "three fifteen PM" — the period-of-day comes first.
The big-to-small principle is everywhere in Chinese. Addresses go country, province, city, street, number (opposite of Western style). Dates go year, month, day. Names go family name first, given name second. It's a consistent design decision — like a language spec that actually has a coherent sorting order.

5. Package: verbs.core

The 20 most essential verbs. Remember: these never conjugate. No past tense, no third-person-s, no irregular forms. const, not let. Each one below comes with a single example sentence — enough to see the word in context.

Hanzi Pinyin Meaning Example
shì to be 我是学生。
yǒu to have / there is 我有一只猫。
zài to be at / in 她在家。
to go 我们去学校。
lái to come 他明天来。
zuò to do / to make 你做什么?
kàn to look / to read 我看书。
tīng to listen 她听音乐。
shuō to speak / to say 他说中文。
to read (aloud) 请读这个。
xiě to write 我写汉字。
xué to study / to learn 我学中文。
chī to eat 我们吃饭吧!
to drink 你喝茶吗?
shuì to sleep 我想睡觉。
mǎi to buy 我买东西。
xiǎng to think / to want 我想去中国。
知道 zhīdào to know (a fact) 我知道了。
认识 rènshi to know (a person) 我认识她。
喜欢 xǐhuan to like 我喜欢编程。
Two kinds of "know": 知道 = know a fact (like knowing an answer, an address, a concept). 认识 = know a person or recognize something. Think of it as knowsFact() vs knowsEntity(). "Do you know Python?" = 知道. "Do you know Linus Torvalds?" = 认识.

6. Package: nouns.core

The 20 most essential nouns. These are your core data types — the objects you'll pass around in almost every conversation.

Hanzi Pinyin Meaning Example
rén person / people 那个人是谁?
朋友 péngyou friend 她是我的朋友。
老师 lǎoshī teacher 老师很好。
学生 xuéshēng student 我是学生。
jiā home / family 我想回家。
学校 xuéxiào school 学校很大。
shū book 这本书很好。
shuǐ water 我要喝水。
chá tea 中国茶很好喝。
fàn rice / food / meal 我们吃饭吧!
qián money 我没有钱。
东西 dōngxi thing / stuff 这个东西多少钱?
电话 diànhuà telephone / phone 你的电话号码是多少?
名字 míngzi name 你叫什么名字?
天气 tiānqì weather 今天天气很好。
中国 zhōngguó China 我想去中国。
工作 gōngzuò work / job 我的工作很忙。
事情 shìqing matter / affair 这件事情很重要。
问题 wèntí question / problem 没问题!
时间 shíjiān time 我没有时间。
// Notice how some nouns double as verbs:
// 工作 (gōngzuò) = "work" (noun) AND "to work" (verb)
// 学习 (xuéxí)   = "study" (noun) AND "to study" (verb)
//
// No conversion needed. No nominalization. No "-tion" suffix.
// It's duck typing: if it fits in the verb slot, it's a verb.
// If it fits in the noun slot, it's a noun. Same word. Zero ceremony.

7. Package: adjectives

Here's where Chinese does something your English-trained brain won't expect: adjectives function as verbs. There is no "is" needed. 他很高 literally says "He very tall" — and that's a complete, grammatical sentence. The adjective itself carries the "to be" meaning.

Hanzi Pinyin Meaning Opposite
hǎo good huài bad
big xiǎo small
duō many / much shǎo few
kuài fast màn slow
gāo tall / high ǎi short
cháng long duǎn short
xīn new jiù old
yuǎn far jìn near
lěng cold hot
nán difficult 容易 róngyì easy
// English: Subject + "is" + adjective
// "She is tall."    → 3 words, requires a linking verb

// Chinese: Subject + 很 + adjective (adjective IS the predicate)
// 她很高。           → "She very tall."  (complete sentence, no verb needed)
// tā hěn gāo

// ⚠ The 很 (hěn, "very") is often just a grammatical filler — it doesn't
// always mean "very." Without it, 她高 sounds comparative ("she's tallER").
// Think of 很 as a default parameter:
//   adjective(subject, degree = 很)

// To actually emphasize "very," use 很 with stress, or upgrade to:
// 非常 (fēicháng) = extremely / 特别 (tèbié) = especially
// 她非常高。= She is extremely tall.
Adjectives as verbs — the mental shift: Don't think "She is pretty." Think "She pretties." In Chinese, 漂亮 acts as a predicate on its own: 她很漂亮。 Adding ("is") here would actually be wrong. The adjective doesn't need a helper verb. It is the verb.

8. Package: connectors

Connectors are the control flow keywords of language — if, else, while, and, or. Without them, you can only write one-line statements. With them, you can build complex logic. We'll go deeper in Module 6 (Control Flow), but here's your initial import.

Hanzi Pinyin Meaning Programming Analogy
and && (for nouns: 我和你)
但是 dànshì but / however else好,但是贵。
因为 yīnwèi because // reason: — states the cause
所以 suǒyǐ so / therefore // therefore: — states the effect
如果 rúguǒ if if (condition)
虽然 suīrán although try { — concedes a point, expects a but
还是 háishi or (questions) a | b — used in questions: "coffee or tea?"
或者 huòzhě or (statements) a || b — used in statements: "maybe X or Y"
// Chinese connectors often come in pairs (like matching braces):

// 因为...所以... = because...therefore...
因为下雨,所以我不去。
// yīnwèi xià yǔ, suǒyǐ wǒ bú qù
// "Because raining, therefore I not-go."
// if (raining) { stay_home(); }

// 虽然...但是... = although...but...
虽然很难,但是很有意思。
// suīrán hěn nán, dànshì hěn yǒu yìsi
// "Although very hard, but very interesting."
// try { hard(); } catch { interesting(); }

// 如果...就... = if...then...
如果你来,我就很高兴。
// rúguǒ nǐ lái, wǒ jiù hěn gāoxìng
// "If you come, I then very happy."
// if (you.come()) { me.happy = true; }

// Note: 还是 for questions, 或者 for statements
// 你喝茶还是咖啡? = Tea or coffee? (asking you to pick)
// 我喝茶或者咖啡。  = I'll drink tea or coffee. (either is fine)
Two kinds of "or": 还是 is for questions where you're asking someone to choose. 或者 is for statements where either option is acceptable. Think switch (choose one) vs union type (either works).

9. How to Study Vocabulary

You now have ~150 words loaded. Here's the thing: you don't memorize an API by reading the docs cover to cover. You learn it by using it — writing code, hitting errors, looking things up, building muscle memory through repetition. Vocabulary works the same way.

// The wrong way to learn vocabulary:
for (const word of allWords) {
    brain.memorize(word.hanzi, word.meaning);    // rote memorization
}
// Result: words stored in short-term cache, evicted within hours.

// The right way:
for (const word of allWords) {
    brain.encounter(word, context);              // see it in a sentence
    brain.use(word, ownSentence);                // produce it yourself
    await brain.sleep();                         // consolidation happens offline
    brain.review(word, spacedInterval);          // SRS — review right before you forget
}
// Result: words promoted to long-term storage.

The Strategy

1. Use the flashcard review system. Spaced repetition is the single most efficient way to move words from short-term to long-term memory. Review cards daily. The algorithm handles the spacing — you just show up.

2. Prioritize high-frequency words. The words in this module are already sorted roughly by frequency. The greetings, pronouns, and top verbs will appear in almost every conversation. Master those before chasing rare vocabulary. Don't npm install obscure packages before you've learned to use the standard library.

3. Learn words in context, not isolation. A word without a sentence is like a function without a call site — you understand the signature but not the behavior. Every word in the tables above has an example sentence. Learn the sentence, not just the word. When you review a flashcard, try to recall a sentence it appears in, not just the English translation.

4. Focus on recognition first, production second. Reading comprehension comes before speaking fluency, just like reading code comes before writing it. Don't stress about producing every word from memory right away. If you can recognize it when you see or hear it, that's a passing test. Production will follow with practice.

The engineer's advantage: You already have a system for learning unfamiliar APIs — you read the docs, try things in a REPL, build small projects, and look things up when you get stuck. Chinese vocabulary is the same loop. The flashcard system is your REPL. These tables are your docs. Conversation is production. You know how to do this.

Standard Library Summary

/**
 * stdlib/core — Vocabulary Quick Reference
 *
 * PACKAGES INSTALLED:
 *   greetings    →  6 words   (hello, thanks, sorry, goodbye...)
 *   pronouns     →  8 words   (I, you, he, she, it, we, you-all, they)
 *   numbers      → 13 words   (1-10, 100, 1000, 10000)
 *   time         → 14 words   (today, tomorrow, days, months, hours...)
 *   verbs.core   → 20 words   (be, have, go, come, do, see, say, eat...)
 *   nouns.core   → 20 words   (person, friend, home, book, water, money...)
 *   adjectives   → 17 words   (good, big, small, fast, slow, new, old...)
 *   connectors   →  8 words   (and, but, because, so, if, although, or...)
 *
 * TOTAL: ~106 core words (covers ~60% of basic conversation)
 *
 * KEY INSIGHTS:
 *   - Pronouns never change form (no case system)
 *   - Numbers compose mathematically (十一 = 10+1 = 11)
 *   - Time follows ISO 8601 order (big → small)
 *   - Adjectives ARE verbs (no linking "is" needed)
 *   - Connectors often come in pairs (因为...所以...)
 *   - Many words are both noun and verb (duck typing)
 *
 * LEARNING METHOD:
 *   SRS flashcards + context sentences + daily review
 *   You don't memorize an API by reading docs.
 *   You learn it by shipping code.
 *
 * NEXT MODULE: Control Flow (if/then, because/so, although/but)
 * → How to connect sentences into complex logic.
 */

Your standard library is loaded. You have the runtime (word order), the type system (measure words), and now the core vocabulary to actually build sentences. Next up: Module 6: Control Flow — where we learn to connect simple sentences into complex logic using the connectors you just imported.

Practice what you learned