jieba-php

github.com/fukuball/jieba-php Developer Tools Open-source projectOpen source

Segment Chinese text in PHP applications with jieba-php, a library for Chinese word tokenization.

github.com/fukuball/jieba-php
jieba-php homepage screenshot

About jieba-php

jieba-php is an open-source PHP library for segmenting Chinese text into words. It provides precise, full, and search-engine modes through cut and cutForSearch methods that accept UTF-8 strings and return iterable arrays.

It supports Traditional Chinese via big dictionary mode, custom user dictionaries, CJK text handling, TF-IDF integration, and part-of-speech tagging. Full mode scans all possible words but does not resolve ambiguity and needs a sufficient dictionary, and the project notes that LLM models may give better segmentation results.

Key features

  • Precise, full, and search-engine Chinese segmentation modes
  • Traditional Chinese segmentation using big dictionary mode
  • Custom user dictionary loading for domain-specific terms
  • CJK text handling for Chinese, Japanese, and Korean
  • TF-IDF integration and part-of-speech tagging
  • cut and cutForSearch methods returning iterable arrays
Best for: PHP developers who need to add Chinese word segmentation to applications.
Good for
  • Offers three segmentation modes for text analysis and search
  • Supports custom dictionaries and custom part-of-speech tags
  • Installable via Composer with manual install option
Watch out for
  • Full mode does not resolve ambiguity
  • Full mode requires a sufficient dictionary
  • Project notes LLMs may produce better segmentation results

jieba-php at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

jieba-php alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Developer Tools

Well-known listings from the same topic.

All 423

jieba-php FAQ

How do I install jieba-php?
Run composer require fukuball/jieba-php and load it through Composer autoload, or place the files manually and include them with require_once.
How do I handle Traditional Chinese?
Switch the dictionary to big mode.
How do I add custom terms?
Use Jieba::loadUserDict with the absolute path to a dictionary file where each line contains a word, frequency, and part of speech separated by spaces.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing