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
Go from Code to Production URL in Seconds Icon
Go from Code to Production URL in Seconds

Cloud Run deploys apps in any language instantly. Scales to zero. Pay only when code runs.

Skip the Kubernetes configs. Cloud Run handles HTTPS, scaling, and infrastructure automatically. Two million requests free per month.
Try it 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