Master Chinese With Lotus Lotus Precision
Explore over 11,000+ vocabulary items spanning HSK Levels 1 through 9, interactive Spaced Repetition (SRS) flashcards, native audio speech synthesis, categorized phrases, and language games.
Word of the Day (每日一词)
Phrase of the Day (每日一句)
HSK 3.0 Vocabulary Database
Search, filter by HSK level & part of speech, listen to audio, and save words.
| Level | Characters (Simp. / Trad.) | Pinyin | POS | English Definition | Audio | Save |
|---|
Saved Vocabulary List
Review your bookmarked words for study and flashcard revision.
Common Mandarin Phrases
Explore practical daily expressions grouped by category.
HTML5 Interactive Learning Games
Reinforce your tones, pinyin recognition, and character meanings with games.
SRS Flashcards Study Deck
Spaced Repetition System algorithm for active recall mastery.
MySQL Database Schema & Standalone PHP Importer
Production SQL script for table creation and PHP parser for importing the 11,094 row HSK 3.0 CSV dataset into MySQL.
-- Create Database
CREATE DATABASE IF NOT EXISTS mandarin_master CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE mandarin_master;
-- 1. Vocabulary Table (HSK 3.0)
CREATE TABLE IF NOT EXISTS vocabulary (
id INT AUTO_INCREMENT PRIMARY KEY,
vocab_id VARCHAR(32) NOT NULL UNIQUE,
simplified VARCHAR(255) NOT NULL,
traditional VARCHAR(255) NOT NULL,
pinyin VARCHAR(255) NOT NULL,
pos VARCHAR(64) NOT NULL,
hsk_level VARCHAR(16) NOT NULL,
web_no INT DEFAULT 0,
web_pinyin VARCHAR(255),
ocr TEXT,
variants TEXT,
cedict TEXT,
english_definition TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_level (hsk_level),
INDEX idx_simplified (simplified),
INDEX idx_pinyin (pinyin)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 2. User Saved Words Table
CREATE TABLE IF NOT EXISTS user_saved_words (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT DEFAULT 1,
vocab_id VARCHAR(32) NOT NULL,
saved_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY unique_user_vocab (user_id, vocab_id),
FOREIGN KEY (vocab_id) REFERENCES vocabulary(vocab_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 3. Phrases Table
CREATE TABLE IF NOT EXISTS phrases (
id INT AUTO_INCREMENT PRIMARY KEY,
category VARCHAR(64) NOT NULL,
characters VARCHAR(255) NOT NULL,
pinyin VARCHAR(255) NOT NULL,
english VARCHAR(255) NOT NULL,
audio_text VARCHAR(255),
INDEX idx_category (category)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 4. Flashcard SRS State Table
CREATE TABLE IF NOT EXISTS srs_cards (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT DEFAULT 1,
vocab_id VARCHAR(32) NOT NULL,
repetition_count INT DEFAULT 0,
interval_days INT DEFAULT 0,
ease_factor FLOAT DEFAULT 2.5,
status ENUM('new', 'learning', 'mastered') DEFAULT 'new',
next_review DATE,
FOREIGN KEY (vocab_id) REFERENCES vocabulary(vocab_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
<?php
/**
* Learn Chinese Together - HSK 3.0 CSV Data Importer and English Definition Extractor
* Reads hsk_data.csv containing ID, Simplified, Traditional, Pinyin, POS, Level, CEDICT, etc.
* Parses CEDICT definitions and maps them into MySQL.
*/
$host = 'localhost';
$db = 'mandarin_master';
$user = 'root';
$pass = '';
$charset = 'utf8mb4';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
try {
$pdo = new PDO($dsn, $user, $pass, $options);
} catch (\PDOException $e) {
throw new \PDOException($e->getMessage(), (int)$e->getCode());
}
function extractEnglishFromCedict($cedictString) {
if (empty($cedictString)) return 'Definition not available';
if (preg_match('/\[(.*?)\]/', $cedictString, $matches)) {
$cleaned = trim(str_replace($matches[0], '', $cedictString));
$cleaned = trim($cleaned, '|[]');
return $cleaned ?: 'Mandarin Entry';
}
return $cedictString;
}
$csvFile = __DIR__ . '/hsk_data.csv';
if (($handle = fopen($csvFile, 'r')) !== FALSE) {
$header = fgetcsv($handle);
$stmt = $pdo->prepare("INSERT INTO vocabulary (vocab_id, simplified, traditional, pinyin, pos, hsk_level, web_no, web_pinyin, ocr, variants, cedict, english_definition)
VALUES (:vocab_id, :simplified, :traditional, :pinyin, :pos, :hsk_level, :web_no, :web_pinyin, :ocr, :variants, :cedict, :english)
ON DUPLICATE KEY UPDATE english_definition = VALUES(english_definition)");
$count = 0;
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
if (count($data) >= 11) {
$stmt->execute([
'vocab_id' => $data[0],
'simplified' => $data[1],
'traditional' => $data[2],
'pinyin' => $data[3],
'pos' => $data[4],
'hsk_level' => $data[5],
'web_no' => is_numeric($data[6]) ? (int)$data[6] : 0,
'web_pinyin' => $data[7],
'ocr' => $data[8],
'variants' => $data[9],
'cedict' => $data[10],
'english' => extractEnglishFromCedict($data[10])
]);
$count++;
}
}
fclose($handle);
echo "Successfully imported {$count} HSK 3.0 records into MySQL!";
} else {
echo "Error opening CSV file.";
}
?>
Learn Chinese Together
HSK 3.0 Standardized Curriculum
The new HSK 3.0 Framework established by the Chinese Ministry of Education provides a 9-level roadmap (Level 1 to 9). Learn Chinese Together gives learners complete access to the entire 11,094-item vocabulary dataset.
Lotus Lotus Color Palette
The design theme directly matches the identity of our logo:
- Vibrant Lotus Gold (`#f5b800`): Representing energy, warmth, and learning vitality.
- Imperial Burgundy (`#801a35`): Derived from lotus petal outlines and text branding.
- Petal Pink (`#ec5b8c`): Highlights, interactive flashcard ratings, and soft badges.