Skip to content

Commit

Permalink
修复 tone_convert 中无声调相关风格转换没有正确处理 v_to_u 参数的问题
Browse files Browse the repository at this point in the history
``tone2_to_tone3`` 、``tone3_to_tone2`` 新增 ``v_to_u=False`` 参数

Fixes #251
  • Loading branch information
mozillazg committed Nov 13, 2021
1 parent 497fb6c commit 1fc78a6
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 103 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ Changelog
---------


`0.44.0`_ (2021-11-xx)
+++++++++++++++++++++++++

* **[New]** ``tone2_to_tone3`` 、``tone3_to_tone2`` 新增 ``v_to_u=False`` 参数
* **[Fixed]** 修复 ``pypinyin.contrib.tone_convert`` 中无声调相关风格转换没有正确处理 ``v_to_u`` 参数的问题 (Fixes `#251`_)


`0.43.0`_ (2021-10-06)
++++++++++++++++++++++++

Expand Down Expand Up @@ -848,6 +855,7 @@ __ https://github.com/mozillazg/python-pinyin/issues/8
.. _#174: https://github.com/mozillazg/python-pinyin/issues/174
.. _#139: https://github.com/mozillazg/python-pinyin/issues/139
.. _#205: https://github.com/mozillazg/python-pinyin/issues/205
.. _#251: https://github.com/mozillazg/python-pinyin/issues/251
.. _#164: https://github.com/mozillazg/python-pinyin/pull/164
.. _#176: https://github.com/mozillazg/python-pinyin/pull/176
.. _@hanabi1224: https://github.com/hanabi1224
Expand Down Expand Up @@ -936,3 +944,4 @@ __ https://github.com/mozillazg/python-pinyin/issues/8
.. _0.42.0: https://github.com/mozillazg/python-pinyin/compare/v0.41.0...v0.42.0
.. _0.42.1: https://github.com/mozillazg/python-pinyin/compare/v0.42.0...v0.42.1
.. _0.43.0: https://github.com/mozillazg/python-pinyin/compare/v0.42.1...v0.43.0
.. _0.44.0: https://github.com/mozillazg/python-pinyin/compare/v0.43.0...v0.44.0
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ test: lint
make testonly

.PHONY: testonly
testonly:
testonly: doctest
py.test --random-order --cov pypinyin tests/ pypinyin/

.PHONY: doctest
doctest:
for f in $(shell find pypinyin -name '*.py' |grep -v __ ); do python -m doctest $$f; done

.PHONY: publish
publish: clean
@echo "publish to pypi"
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
汉字拼音转换工具(Python 版)
=============================

|Build| |GitHubAction| |Coverage| |Pypi version| |DOI|
|Build| |GitHubAction| |Coverage| |Pypi version| |PyPI downloads| |DOI|


将汉字转为拼音。可以用于汉字注音、排序、检索(`Russian translation`_) 。
Expand Down Expand Up @@ -217,6 +217,8 @@ __ https://github.com/mozillazg/rust-pinyin
:target: https://pypi.org/project/pypinyin/
.. |DOI| image:: https://zenodo.org/badge/12830126.svg
:target: https://zenodo.org/badge/latestdoi/12830126
.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/pypinyin.svg
:target: https://pypi.org/project/pypinyin/



Expand Down
Loading

0 comments on commit 1fc78a6

Please sign in to comment.