Spacing Examples
This document provides comprehensive examples of spacing rules for English words and numbers in Chinese text.
Basic Spacing Rules
Rule 1: Single English Word in Chinese Text
Add half-width space before and after English words.
✅ Correct:
這是一個 example 範例我們使用 Python 開發這個 API 很好用學習 JavaScript 很重要
❌ Incorrect:
這是一個example範例(no spaces)我們使用Python 開發(missing space before)這個 API很好用(missing space after)學習JavaScript很重要(no spaces)
Rule 2: Single Number in Chinese Text
Add half-width space before and after numbers.
✅ Correct:
總共有 3 個步驟需要 10 分鐘版本 2.0 發布了大約 100 人參加
❌ Incorrect:
總共有3個步驟(no spaces)需要10 分鐘(missing space before)版本 2.0發布了(missing space after)大約100人參加(no spaces)
Complex Spacing Scenarios
Multiple English Words (Phrase)
Keep English phrases together, add spaces only at boundaries.
✅ Correct:
使用 machine learning 技術這是 open source 專案採用 deep learning 方法基於 artificial intelligence 開發
❌ Incorrect:
使用machine learning技術(no boundary spaces)使用 machine learning 技術(extra space within phrase)這是open source專案(no boundary spaces)
English Word + Number Combination
Treat as single unit if they form a compound term.
✅ Correct:
使用 Python 3.9 版本支援 HTTP 2.0 協議需要 Node.js 16 以上基於 ES6 標準
❌ Incorrect:
使用Python3.9版本(no spaces)使用 Python3.9 版本(missing space between Python and 3.9)支援HTTP 2.0協議(missing spaces)
Version Numbers
Add spaces around complete version numbers.
✅ Correct:
Python 3.9.1 版本版本 2.0.5 已發布使用 v1.2.3 進行測試升級到 4.0.0 版本
❌ Incorrect:
Python3.9.1版本(no spaces)版本2.0.5已發布(no spaces)使用v1.2.3進行測試(no spaces)
Acronyms and Abbreviations
Treat acronyms as single English words.
✅ Correct:
使用 API 進行整合透過 REST 介面支援 HTTP 協議基於 JSON 格式使用 AI 技術
❌ Incorrect:
使用API進行整合(no spaces)透過 REST介面(missing space after)支援HTTP 協議(missing space before)基於JSON格式(no spaces)
Brand Names and Products
Follow brand-specific capitalization and spacing.
✅ Correct:
使用 iPhone 拍攝在 macOS 上運行透過 GitHub 分享使用 Visual Studio Code 編輯部署到 AWS 雲端
❌ Incorrect:
使用iPhone拍攝(no spaces)在macOS上運行(no spaces)透過Github分享(incorrect capitalization + no spaces)使用Visual Studio Code編輯(missing spaces)
Numbers with Units
Add space before number, keep unit attached or spaced based on convention.
✅ Correct:
需要 10 分鐘(space before number and unit)大約 5GB 空間(space before number, unit attached)溫度 25 度(space before number and unit)長度 100cm(space before number, unit attached for metric)
Note: Unit spacing can vary by convention. Be consistent within document.
Percentages
Add space before number, percentage sign typically attached.
✅ Correct:
成功率 95%增長了 20%大約 50% 的人
❌ Incorrect:
成功率95%(no space before)增長了20%(no space before)大約50%的人(no spaces)
Ranges and Intervals
Add spaces around range indicators.
✅ Correct:
需要 3-5 天支援 Python 3.6 - 3.9年齡 18~25 歲範圍 1 到 10
❌ Incorrect:
需要3-5天(no spaces)支援Python 3.6-3.9(missing spaces)年齡18~25歲(no spaces)
Edge Cases
Punctuation
Do not add extra spaces around punctuation.
✅ Correct:
使用 Python,JavaScript 和 Ruby這是 API。它很好用學習 Python(推薦)版本 2.0「已發布」
❌ Incorrect:
使用 Python , JavaScript 和 Ruby(extra spaces around comma)這是 API 。它很好用(extra space before period)學習 Python (推薦)(extra space before parenthesis)
Already Spaced Content
Do not add duplicate spaces.
✅ Correct:
使用 Python 開發(already has spaces)
❌ Incorrect:
使用 Python 開發(duplicate spaces)
Mixed Chinese and English Sentences
Apply spacing at language boundaries.
✅ Correct:
Let's use Python 來開發這個 project這個 feature 很 useful 對吧
❌ Incorrect:
Let's usePython來開發這個project(no spaces)這個feature很useful對吧(no spaces)
URLs and Paths
Generally preserve URLs and file paths as-is.
✅ Correct:
訪問 https://example.com 查看檔案位於 /usr/local/bin 目錄參考 www.example.com 網站
Note: Add spaces at boundaries, but don't add spaces within URLs/paths.
Code Snippets
Preserve code formatting, add spaces at boundaries.
✅ Correct:
執行 print("Hello") 指令使用 const x = 10 宣告呼叫 getData() 函數
❌ Incorrect:
執行print("Hello")指令(no spaces)使用const x = 10宣告(no spaces)
Mathematical Expressions
Add spaces around complete expressions.
✅ Correct:
結果是 2 + 3 = 5計算 x * y 的值公式 a² + b² = c²
❌ Incorrect:
結果是2 + 3 = 5(missing space before)計算x * y的值(no spaces)
Dates and Times
Add spaces around date/time components.
✅ Correct:
日期是 2024-01-15時間 14:30 開始在 2024 年 1 月
❌ Incorrect:
日期是2024-01-15(no space before)時間14:30開始(no spaces)
Special Considerations
Consecutive English Words
When multiple English words appear consecutively, maintain phrase integrity.
✅ Correct:
使用 Visual Studio Code 編輯器基於 Model View Controller 架構採用 Test Driven Development 方法
❌ Incorrect:
使用VisualStudioCode編輯器(no spaces)使用 Visual Studio Code 編輯器(extra spaces within phrase)
Consecutive Numbers
When multiple numbers appear, treat each distinctly.
✅ Correct:
版本從 1.0 升級到 2.0支援 Python 3.6, 3.7, 3.8需要 2 到 3 天
❌ Incorrect:
版本從1.0升級到2.0(no spaces)支援Python 3.6,3.7,3.8(missing spaces)
English Possessives
Keep possessive markers attached to English words.
✅ Correct:
這是 Python's 特性使用 user's 資料
❌ Incorrect:
這是 Python 's 特性(extra space before possessive)
Contractions
Keep contractions intact.
✅ Correct:
這是 don't 的用法使用 it's 表示
❌ Incorrect:
這是 don 't 的用法(split contraction)
Validation Checklist
When applying spacing rules, verify:
- Space before English word/number
- Space after English word/number
- No duplicate spaces
- Phrases kept together
- Punctuation spacing preserved
- URLs and paths intact
- Brand capitalization correct
- Consistent spacing throughout
Common Patterns
Technology Stack
✅ Correct:
使用 React 和 Node.js 開發
基於 Python Django 框架
採用 Vue.js 3.0 版本
部署到 AWS Lambda 服務
使用 Docker 容器化
透過 Git 版本控制Version Information
✅ Correct:
Python 3.9.1 版本
Node.js v16.14.0
React 18.0.0
升級到 2.0 版本
支援 ES6+ 語法Measurements and Quantities
✅ Correct:
需要 10GB 空間
大約 5 分鐘
長度 100 公分
重量 2.5kg
溫度 25 度Technical Terms
✅ Correct:
使用 RESTful API
基於 JSON 格式
透過 HTTP 協議
採用 OAuth 2.0 認證
支援 WebSocket 連接Summary
Golden Rules:
- Add half-width space before and after English words in Chinese text
- Add half-width space before and after numbers in Chinese text
- Keep English phrases together (don't add spaces within)
- Preserve punctuation spacing
- Don't add duplicate spaces
- Maintain URL and code integrity
- Follow brand-specific capitalization
When in Doubt:
- Prioritize readability
- Be consistent throughout document
- Preserve original spacing if already correct
- Don't over-space or under-space
Focus on creating clean, readable text that flows naturally while maintaining clear boundaries between Chinese and English/numeric content.