README.md in ting-0.10.0 vs README.md in ting-0.11.0

- old
+ new

@@ -8,10 +8,14 @@ to pinyin with tones. Hanyu Pinyin, Bopomofo, Wade-Giles, Tongyong Pinyin and International Phonetic Alphabet (IPA) are supported. +## INSTALL + +* gem install ting + ## SYNOPSIS To parse your strings create a `Reader` object. Ting.reader() takes two parameters : the transliteration format, and the way that tones are represented. @@ -72,32 +76,34 @@ ipa = Ting.writer.new(:ipa, :ipa) ipa.(reader.("you3 peng2 zi4 yuan2 fang1 lai2")) # => "iou˧˩˧ pʰeŋ˧˥ ts˥˩ yɛn˧˥ faŋ˥˥ lai˧˥" ```` -Since this is such a common use case, a convenience method to add diacritics to pinyin. +Since this is such a common use case, a convenience method exists to add diacritics to pinyin. ````ruby Ting.pretty_tones "wo3 ai4 ni3" # => "wǒ ài nǐ" ```` Note that syllables need to be separated by spaces, feeding "peng2you3" to the parser -does not work. The `String#pretty_tones` method does handle these things a bit more gracefully. +does not work. The `Ting.pretty_tones(string)` method does handle these things a bit more gracefully. If you need to parse input that does not conform, consider using a regexp to scan for valid -syllables, then feed the syllables to the parser one by one. Have a look at `#pretty_tones` for -an example of how to do this. +syllables, then feed the syllables to the parser one by one. Have a look at `Ting.pretty_tones` for +an example of how to do this, but note that it does not support special cases like erhua +(wanr2 = wan2 er) or non-standard Pinyin syllables like 嗯/"ń" or 呣/"ḿ" (which appear in the official +Unicode data and some textbooks). +### ting_table + +The `ting_table` script will spit out a CSV table of all syllables and formats Ting knows about. Useful if you want to do conversion in other languages. + ## REQUIREMENTS * none, Ting uses nothing but Ruby -## INSTALL - -* gem install ting - ## LICENSE -Copyright (c) 2007-2014, Arne Brasseur. (http://www.arnebrasseur.net) +Copyright (c) 2007-2017, Arne Brasseur. (http://www.arnebrasseur.net) Available as Free Software under the GPLv3 License, see LICENSE.txt for details