semvec/pypi-packages huggingface dataset:
hanzidentifier 1.3.0
Python module that identifies Chinese text as Simplified or Traditional.
License: MIT
Requires Python: >=3.9
Keywords: characters, chinese, cjk, hanzi, mandarin, simplified, traditional

================
Hanzi Identifier
================

.. image:: https://badge.fury.io/py/hanzidentifier.svg
    :target: https://pypi.org/project/hanzidentifier

.. image:: https://github.com/tsroten/hanzidentifier/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/tsroten/hanzidentifier/actions/workflows/ci.yml

Hanzi Identifier is a simple Python module that identifies a string of text as 
having Simplified or Traditional characters.

* GitHub: https://github.com/tsroten/hanzidentifier
* Free software: MIT license

About
-----

Easy-to-use helper functions for identifying strings:

.. code:: python

    >>> import hanzidentifier
    >>> hanzidentifier.has_chinese('Hello my name is John.')
    False
    >>> hanzidentifier.is_simplified('John说：你好！')
    True
    >>> hanzidentifier.is_traditional('John說：你好！')
    True
    >>> hanzidentifier.has_chinese('Country in Simplified: 国家. Country in Traditional: 國家.')
    True

Here it is without the helper functions:

.. code:: python

    >>> hanzidentifier.identify('Hello my name is Thomas.') is hanzidentifier.UNKNOWN
    True
    >>> hanzidentifier.identify('Thomas 说：你好！') is hanzidentifier.SIMPLIFIED
    True
    >>> hanzidentifier.identify('Thomas 說：你好！') is hanzidentifier.TRADITIONAL
    True
    >>> hanzidentifier.identify('你好！') is hanzidentifier.BOTH
    True
    >>> hanzidentifier.identify('Country in Simplified: 国家. Country in Traditional: 國家.' ) is hanzidentifier.MIXED
    True

``hanzidentifier.identify`` has five possible return values:

* ``hanzidentifier.UNKNOWN``: there are no recognized Chinese characters in the string.
* ``hanzidentifier.BOTH``: the string is compatible with both Simplified and Traditional character systems.
* ``hanzidentifier.TRADITIONAL``: the string consists of Traditional characters.
* ``hanzidentifier.SIMPLIFIED``: the string consists of Simplified characters.
* ``hanzidentifier.MIXED``: the string consists of characters recognized solely as Traditional characters and also consists of characters recognized solely as Simplified characters.

Characters that aren't found in CC-CEDICT are ignored when determining a string's identity.
Hanzi Identifier uses the CC-CEDICT data provided by `Zhon <https://github.com/tsroten/zhon>`_ to identify Chinese characters.

Because the Traditional and Simplified Chinese character systems overlap, a
string containing Simplified characters could identify as
``hanzidentifier.SIMPLIFIED`` or ``hanzidentifier.BOTH`` depending on if the
characters are also Traditional characters.

Getting Started
---------------

* Install Hanzi Identifier: ``$ pip install hanzidentifier``
* Report bugs and ask questions via `GitHub Issues <https://github.com/tsroten/hanzidentifier/issues>`_
* `Contribute features or bug fixes <https://github.com/tsroten/hanzidentifier/pulls>`_
spacy-thai 0.7.8
Dependency-parser for Thai language
License: MIT
Requires Python: >=3.6
Keywords: spaCy udpipe nlp

[![Current PyPI packages](https://badge.fury.io/py/spacy-thai.svg)](https://pypi.org/project/spacy-thai/)

# spaCy-Thai

Tokenizer, POS-tagger, and dependency-parser for Thai language, working on [Universal Dependencies](https://github.com/UniversalDependencies/UD_Thai-PUD).

## Basic Usage

```py
>>> import spacy_thai
>>> nlp=spacy_thai.load()
>>> doc=nlp("แผนกนี้กำลังเผชิญกับความท้าทายใหม่")
>>> for t in doc:
...   print("\t".join([str(t.i+1),t.orth_,t.lemma_,t.pos_,t.tag_,"_",str(0 if t.head==t else t.head.i+1),t.dep_,"_","_" if t.whitespace_ else "SpaceAfter=No"]))
...
1	แผนก	แผนก	NOUN	NCMN	_	4	nsubj	_	SpaceAfter=No
2	นี้	นี้	DET	DDAC	_	1	det	_	SpaceAfter=No
3	กำลัง	กำลัง	AUX	XVBM	_	4	aux	_	SpaceAfter=No
4	เผชิญ	เผชิญ	VERB	VSTA	_	0	ROOT	_	SpaceAfter=No
5	กับ	กับ	ADP	RPRE	_	6	case	_	SpaceAfter=No
6	ความ	ความ	PART	FIXN	_	4	obl	_	SpaceAfter=No
7	ท้าทาย	ท้าทาย	VERB	VACT	_	6	acl	_	SpaceAfter=No
8	ใหม่	ใหม่	ADV	ADVN	_	7	advmod	_	SpaceAfter=No
>>> import deplacy
>>> deplacy.render(doc,WordRight=True)
 nsubj ╔════════>╔═ NOUN แผนก
   det ║         ╚> DET  นี้
   aux ║ ╔════════> AUX  กำลัง
  ROOT ╚═╚═╔═══════ VERB เผชิญ
  case     ║ ╔════> ADP  กับ
   obl     ╚>╚═╔═══ PART ความ
   acl         ╚>╔═ VERB ท้าทาย
advmod           ╚> ADV  ใหม่
```

## Installation for Linux

```sh
pip3 install spacy_thai --user
```

## Installation for Cygwin

Make sure to get `python37-devel` `python37-pip` `python37-numpy` `python37-cython` `gcc-g++`, and then:

```sh
pip3.7 install spacy_thai
```

## Installation for Google Colaboratory

```py
!pip install spacy_thai
```

Try [notebook](https://colab.research.google.com/github/KoichiYasuoka/spaCy-Thai/blob/master/spacy_thai.ipynb).
PyNLPIR 0.6.1
A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
License: MIT
Requires Python: >=3.9
Keywords: chinese, ictclas, nlp, nlpir, pynlpir, segmentation

=======
PyNLPIR
=======

.. image:: https://badge.fury.io/py/pynlpir.svg
    :target: https://pypi.org/project/pynlpir

.. image:: https://github.com/tsroten/pynlpir/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/tsroten/pynlpir/actions/workflows/ci.yml

PyNLPIR is a Python wrapper around the
`NLPIR/ICTCLAS Chinese segmentation software <http://www.nlpir.org/wordpress/>`_.

* Documentation: https://tsroten.github.io/pynlpir/
* GitHub: https://github.com/tsroten/pynlpir
* Support: https://github.com/tsroten/pynlpir/issues
* Free software: `MIT license <http://opensource.org/licenses/MIT>`_

About
-----

Easily segment text using NLPIR, one of the most widely-regarded Chinese text
analyzers:

.. code:: python

    import pynlpir
    pynlpir.open()

    s = '欢迎科研人员、技术工程师、企事业单位与个人参与NLPIR平台的建设工作。'
    pynlpir.segment(s)

    [('欢迎', 'verb'), ('科研', 'noun'), ('人员', 'noun'), ('、', 'punctuation mark'), ('技术', 'noun'), ('工程师', 'noun'), ('、', 'punctuation mark'), ('企事业', 'noun'), ('单位', 'noun'), ('与', 'conjunction'), ('个人', 'noun'), ('参与', 'verb'), ('NLPIR', 'noun'), ('平台', 'noun'), ('的', 'particle'), ('建设', 'verb'), ('工作', 'verb'), ('。', 'punctuation mark')]

Features
--------

* Helper functions for common use cases
* English/Chinese part of speech mapping
* Support for UTF-8, GBK, and BIG5 encoded strings (and unicode of course!)
* Access to NLPIR's C functions via ``ctypes``
* Includes a copy of NLPIR
* Supports macOS (Intel), Linux, and Windows

Getting Started
---------------

* `Install PyNLPIR <https://tsroten.github.io/pynlpir/installation.html>`_

  * ``pip install pynlpir`` to install PyNLPIR
  * ``pynlpir update`` to download the latest license

* Read `PyNLPIR's tutorial <https://tsroten.github.io/pynlpir/tutorial.html>`_
* Learn from the `API documentation <https://tsroten.github.io/pynlpir/api.html>`_
* `Contribute <https://tsroten.github.io/pynlpir/contributing.html>`_ documentation, code, or feedback
zhon 2.1.1
Zhon provides constants used in Chinese text processing.
License: MIT
Requires Python: >=3.9
Keywords: cc-cedict, cedict, characters, chinese, cjk, han, hanzi, mandarin, pinyin, punctuation, radicals, segmentation, simplified, tokenization, traditional, unicode, zhuyin

====
Zhon
====

.. image:: https://badge.fury.io/py/zhon.svg
    :target: https://pypi.org/project/zhon

.. image:: https://github.com/tsroten/zhon/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/tsroten/zhon/actions/workflows/ci.yml

Zhon is a Python library that provides constants commonly used in Chinese text
processing.

* Documentation: https://tsroten.github.io/zhon/
* GitHub: https://github.com/tsroten/zhon
* Support: https://github.com/tsroten/zhon/issues
* Free software: `MIT license <http://opensource.org/licenses/MIT>`_

About
-----

Zhon's constants can be used in Chinese text processing, for example:

* Find CJK characters in a string:

  .. code:: python

    >>> re.findall('[{}]'.format(zhon.hanzi.characters), 'I broke a plate: 我打破了一个盘子.')
    ['我', '打', '破', '了', '一', '个', '盘', '子']

* Validate Pinyin syllables, words, or sentences:

  .. code:: python

    >>> re.findall(zhon.pinyin.syllable, 'Yuànzi lǐ tíngzhe yí liàng chē.', re.I)
    ['Yuàn', 'zi', 'lǐ', 'tíng', 'zhe', 'yí', 'liàng', 'chē']

    >>> re.findall(zhon.pinyin.word, 'Yuànzi lǐ tíngzhe yí liàng chē.', re.I)
    ['Yuànzi', 'lǐ', 'tíngzhe', 'yí', 'liàng', 'chē']

    >>> re.findall(zhon.pinyin.sentence, 'Yuànzi lǐ tíngzhe yí liàng chē.', re.I)
    ['Yuànzi lǐ tíngzhe yí liàng chē.']

Features
--------

Zhon includes the following commonly-used constants:

* CJK characters and radicals
* Chinese punctuation marks
* Chinese sentence regular expression pattern
* Pinyin vowels, consonants, lowercase, uppercase, and punctuation
* Pinyin syllable, word, and sentence regular expression patterns
* Zhuyin characters and marks
* Zhuyin syllable regular expression pattern
* CC-CEDICT characters

Getting Started
---------------

* `Install Zhon <https://tsroten.github.io/zhon/installation.html>`_
* `Learn how to use Zhon <https://tsroten.github.io/zhon/api.html>`_
* `Contribute <https://github.com/tsroten/zhon/blob/develop/CONTRIBUTING.rst>`_ documentation, code, or feedback
dragonmapper 0.3.0
Identification and conversion functions for Chinese text processing
License: MIT
Requires Python: >=3.9
Keywords: bopomofo, characters, chinese, convert, hanzi, ipa, mandarin, pinyin, readings, transcription, zhuyin

=============
Dragon Mapper
=============

.. image:: https://badge.fury.io/py/dragonmapper.svg
    :target: https://pypi.org/project/dragonmapper

.. image:: https://github.com/tsroten/dragonmapper/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/tsroten/dragonmapper/actions/workflows/ci.yml

Dragon Mapper is a Python library that provides identification and conversion
functions for Chinese text processing.

* Documentation: https://tsroten.github.io/dragonmapper/
* GitHub: https://github.com/tsroten/dragonmapper
* Free software: MIT license

Features
--------

* Convert between Chinese characters, Pinyin, Zhuyin, and the International
  Phonetic Alphabet.
* Identify a string as Traditional or Simplified Chinese, Pinyin, Zhuyin, or
  the International Phonetic Alphabet.

.. code:: python

    >>> s = '我是一个美国人。'
    >>> dragonmapper.hanzi.is_simplified(s)
    True
    >>> dragonmapper.hanzi.to_pinyin(s)
    'wǒshìyīgèměiguórén。'
    >>> dragonmapper.hanzi.to_pinyin(s, all_readings=True)
    '[wǒ][shì/shi/tí][yī][gè/ge/gě/gàn][měi][guó][rén/ren]。'

.. code:: python

    >>> s = 'Wǒ shì yīgè měiguórén.'
    >>> dragonmapper.transcriptions.is_pinyin(s)
    True
    >>> dragonmapper.transcriptions.pinyin_to_zhuyin(s)
    'ㄨㄛˇ ㄕˋ ㄧ ㄍㄜˋ ㄇㄟˇ ㄍㄨㄛˊ ㄖㄣˊ.'
    >>> dragonmapper.transcriptions.pinyin_to_ipa(s)
    'wɔ˧˩˧ ʂɨ˥˩ i˥ kɤ˥˩ meɪ˧˩˧ kwɔ˧˥ ʐən˧˥.'

Getting Started
---------------
* `Install Dragon Mapper <https://tsroten.github.io/dragonmapper/installation.html>`_
* Read `Dragon Mapper's tutorial <https://tsroten.github.io/dragonmapper/tutorial.html>`_
* Report bugs and ask questions via `GitHub Issues <https://github.com/tsroten/dragonmapper>`_
* Refer to the `API documentation <https://tsroten.github.io/dragonmapper/api.html>`_ when you need more technical information
* `Contribute <https://tsroten.github.io/dragonmapper/contributing.html>`_ documentation, code, or feedback