All Projects → vinta → Pangu.py

vinta / Pangu.py

Licence: mit
Paranoid text spacing in Python

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pangu.py

Typewriterview
Android library for typewriter like effects
Stars: ✭ 124 (-23.93%)
Mutual labels:  text
Peep
The CLI text viewer tool that works like less command on small pane within the terminal window.
Stars: ✭ 139 (-14.72%)
Mutual labels:  text
Vim Ditto
🙊 Stop repeating yourself
Stars: ✭ 148 (-9.2%)
Mutual labels:  text
Zfont
💬 Text plugin for Zdog - works with any .ttf font!
Stars: ✭ 126 (-22.7%)
Mutual labels:  text
Typesettable
📐 A typesetting library for SVG and Canvas
Stars: ✭ 134 (-17.79%)
Mutual labels:  text
Assignment writer
So your teacher told you to upload written assignments? Hate writing assigments? This tool will help you convert your text to handwriting ;-; https://saiteja69.github.io/Assignment_Writer/
Stars: ✭ 143 (-12.27%)
Mutual labels:  text
Snodge
Randomly mutate JSON, XML, HTML forms, text and binary data for fuzz testing
Stars: ✭ 121 (-25.77%)
Mutual labels:  text
Wgpu glyph
A fast text renderer for wgpu (https://github.com/gfx-rs/wgpu)
Stars: ✭ 159 (-2.45%)
Mutual labels:  text
Notepanda
📃 A simple cross-platform notepad. Based on Qt and C++.
Stars: ✭ 134 (-17.79%)
Mutual labels:  text
Handwritten.js
Convert typed text to realistic handwriting!
Stars: ✭ 1,806 (+1007.98%)
Mutual labels:  text
Tytext
text asynchronous rendering by TextKit for iOS
Stars: ✭ 127 (-22.09%)
Mutual labels:  text
Textrecognitiondatagenerator
A synthetic data generator for text recognition
Stars: ✭ 2,075 (+1173.01%)
Mutual labels:  text
React Native See More Inline
Show a "read more", "see more", "read less", "see less" inline with your text in React Native
Stars: ✭ 141 (-13.5%)
Mutual labels:  text
Lucenenet
Apache Lucene.NET
Stars: ✭ 1,704 (+945.4%)
Mutual labels:  text
Aeneas
aeneas is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment)
Stars: ✭ 1,942 (+1091.41%)
Mutual labels:  text
Scribble
Efficient multi-effects text renderer for GameMaker Studio 2.3.1
Stars: ✭ 123 (-24.54%)
Mutual labels:  text
Baffle
A tiny javascript library for obfuscating and revealing text in DOM elements. 😲
Stars: ✭ 1,721 (+955.83%)
Mutual labels:  text
Xlnet Gen
XLNet for generating language.
Stars: ✭ 164 (+0.61%)
Mutual labels:  text
East icpr
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
Stars: ✭ 154 (-5.52%)
Mutual labels:  text
Parjs
JavaScript parser-combinator library
Stars: ✭ 145 (-11.04%)
Mutual labels:  text

pangu.py

.. image:: https://img.shields.io/travis/vinta/pangu.py/master.svg?style=flat-square :target: https://travis-ci.org/vinta/pangu.py

.. image:: https://img.shields.io/codecov/c/github/vinta/pangu.py/master.svg?style=flat-square :target: https://codecov.io/github/vinta/pangu.py

.. image:: https://img.shields.io/pypi/v/pangu.svg?style=flat-square :target: https://pypi.org/project/pangu/

.. image:: https://img.shields.io/pypi/pyversions/pangu.svg?style=flat-square :target: https://pypi.org/project/pangu/

.. image:: https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square :target: https://vinta.ws/code/

Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).

  • pangu.go <https://github.com/vinta/pangu>_ (Go)
  • pangu.java <https://github.com/vinta/pangu.java>_ (Java)
  • pangu.js <https://github.com/vinta/pangu.js>_ (JavaScript)
  • pangu.py <https://github.com/vinta/pangu.py>_ (Python)
  • pangu.space <https://github.com/vinta/pangu.space>_ (Web API)

Installation

.. code-block:: bash

$ pip install -U pangu

Usage

In Python

.. code-block:: py

import pangu

new_text = pangu.spacing_text('當你凝視著bug,bug也凝視著你')
# new_text = '當你凝視著 bug,bug 也凝視著你'

nwe_content = pangu.spacing_file('path/to/file.txt')
# nwe_content = '與 PM 戰鬥的人,應當小心自己不要成為 PM'

In CLI

.. code-block:: bash

$ pangu "請使用uname -m指令來檢查你的Linux作業系統是32位元或是[敏感词已被屏蔽]位元"
請使用 uname -m 指令來檢查你的 Linux 作業系統是 32 位元或是 [敏感词已被屏蔽] 位元

$ python -m pangu "為什麼小明有問題都不Google?因為他有Bing"
為什麼小明有問題都不 Google?因為他有 Bing

$ echo "未來的某一天,Gmail配備的AI可能會得出一個結論:想要消滅垃圾郵件最好的辦法就是消滅人類" >> path/to/file.txt
$ pangu -f path/to/file.txt >> pangu_file.txt
$ cat pangu_file.txt
未來的某一天,Gmail 配備的 AI 可能會得出一個結論:想要消滅垃圾郵件最好的辦法就是消滅人類

$ echo "心裡想的是Microservice,手裡做的是Distributed Monolith" | pangu
心裡想的是 Microservice,手裡做的是 Distributed Monolith

$ echo "你從什麼時候開始產生了我沒使用Monkey Patch的錯覺?" | python -m pangu
你從什麼時候開始產生了我沒使用 Monkey Patch 的錯覺?
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].