semvec/pypi-packages huggingface dataset:
pyjyutping 1.0.0
Chinese text to Jyutping conversion library in Python
License: MIT

# PyJyutping

Chinese text to [Jyutping](https://en.wikipedia.org/wiki/Jyutping) 
(粵拼; a standard of Cantonese romanization) conversion library in Python. 
Conversion is based on an officially published [Cantonese Pronunciation List](http://www.iso10646hk.net/jp/document/jyut_yam_table.jsp). 
This library performs the conversion using the Jyutping romanization table 
prepared by [Dr. Samuel Cheng](https://www.samuelcheng.info/jyutping.html), 
which has been further converted to a [dictionary file in JSON format](pyjyutping/data/jyutping_dictionary.json).


## Installation

```shell
pip install pyjyutping
```


## Usage

### Python

```python
>>> from pyjyutping import jyutping
>>> jyutping.convert("我係香港人")
'ngo5 hai6 hoeng1 gong2 jan4'
```

Tone number in output can be disabled:

```python
>>> jyutping.convert("我係香港人", tone=False)
'ngo hai hoeng gong jan'
```

Alphabets and digits are preserved in the conversion:

```python
>>> jyutping.convert("香港嘅英文係Hong Kong")
'hoeng1 gong2 ge3 jing1 man4 hai6 Hong Kong'
>>> jyutping.convert("1841年1月25號香港開埠")
'1841 nin4 1 jyut6 25 hou6 hoeng1 gong2 hoi1 bou6'
```

### Command-Line Interface Tool

```shell
$ pyjyutping 我係香港人
ngo5 hai6 hoeng1 gong2 jan4
```


## License

MIT
hk80 1.0.1
Hong Kong 1980 Grid coordinates conversion library in Python
License: MIT

# HK80

Hong Kong 1980 Grid coordinates conversion library in Python. This library 
provides a simple API for coordinates conversion between Hong Kong 1980 Grid 
and WGS 84. Underlying conversions are performed using [`pyproj`](https://pyproj4.github.io/pyproj).


## Installation

```shell
pip install hk80
```


## Usage

```python
>>> from hk80 import LatLon, HK80
>>> hku = LatLon(22.284034, 114.137814).to_hk80()
>>> (hku.northing, hku.easting)
(816128.2739028323, 832242.6232703187)
>> (hku.x, hku.y)
(832242.6232703187, 816128.2739028323)
>>> hku = HK80(northing=816128, easting=832243).to_wgs84()
>>> (hku.latitude, hku.longitude)
(22.284031525857237, 114.13781766034742)
```


## License

MIT