Too many spaces?

Open
#355 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
localization

Research direction

Start by reading the package's documented conversion options and the conversion path used after Stanford segmentation. Check how spaces are handled in the input and generated output, then define completion as preserving existing spaces without adding spaces around each converted character; add or update coverage for that behavior.

Written by the indexing model from the issue text.

Description

I am still learning Chinese, so I typically take a text, use the Stanford segmenter, and then convert to pinyin.

The conversion adds an unnecessary space before and after each character, which means words identified in segmentation are broken up.

I would like it to not add spaces, but also to not change spaces already in the input.  If the package contains a way to do this, I couldn't find it in the documentation.

Dominant language
Python
Stars
5.4k
Forks
628
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozillazg/python-pinyin

All issues in mozillazg/python-pinyin

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.