Budou is a Python library developed by Google to improve web typography for CJK (Chinese, Japanese, Korean) languages by producing semantically meaningful line breaks. Unlike English, CJK scripts lack spaces or hyphenation cues, often resulting in awkward or unreadable text wrapping on web pages. Budou addresses this issue by segmenting sentences into logical lexical chunks and wrapping each chunk in non-breaking HTML <span> tags. These spans can be styled with CSS to ensure smooth, visually coherent line breaks without splitting words or phrases. The tool supports multiple segmentation backends, including Google Cloud Natural Language API, MeCab, and TinySegmenter, enabling flexibility for both cloud-based and offline processing. Budou can be used via command line, in Python scripts, or integrated into web applications, and it provides advanced options such as caching and entity recognition for improved segmentation accuracy.

Features

  • Automatically segments and wraps CJK text for proper web line breaking
  • Supports Google Cloud NLP, MeCab, and TinySegmenter as segmentation backends
  • Outputs HTML with <span> tags to control line breaks through CSS
  • Offers optional entity recognition for improved handling of proper nouns
  • Includes both CLI and Python API for integration into scripts and web frameworks
  • Provides caching and offline segmentation for performance and flexibility

Project Samples

Project Activity

See All Activity >

Categories

Data Formats

License

Apache License V2.0

Follow Budou

Budou Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Budou!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Python

Related Categories

Python Data Formats Software

Registered

2025-10-11