Skip to content

Commit

Permalink
update sinopy data
Browse files Browse the repository at this point in the history
  • Loading branch information
lingulist committed Aug 24, 2018
1 parent e3b34ca commit ebb7d88
Show file tree
Hide file tree
Showing 20 changed files with 620,477 additions and 2 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

This is intended as a plugin for LingPy, or an addon, however, you define "plugin". The library gives utility functions that prove useful to handle Chinese data in a very broad context, raning from Chinese character readings up to proposed readings in Middle Chinese and older stages of the language.

## Quick Usage Example
## Quick Usage Examples

Convert Baxter's (1992) Middle Chinese transcription system to plain IPA (with tone marks).

```python
>>> from sinopy import baxter2ipa
>>> baxter2ipa('bjang')
'bjaŋ¹'
>>> baxter2ipa('bjang', segmented=True)
['b', 'j', 'a', 'ŋ', '¹']
```

Convert Chinese characters to Pīnyīn

```python
>>> from sinopy import pinyin
>>> pinyin('', variant='cantonese')
'ngo5'
>>> pinyin('', variant='mandarin')
''
```

Try to find character by combining two characters:

```python
>>> from sinopy import character_from_structure
>>> character_from_structure('+人我')
''
```


.. pending ..
5 changes: 5 additions & 0 deletions src/sinopy/data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Data Sources for SinoPy

* TLS data stems from the Thesaurus Linguae Sericae
* Unihan data stems from the Unihan project
* Data on Chinese characters (motivation and structure) stems from the [CJKV project](https://github.com/cjkvi/)
Loading

0 comments on commit ebb7d88

Please sign in to comment.