pinyin 0.0.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +0,0 @@
1
- module Pinyin
2
- module Tones
3
- module NoTones
4
- def self.add_tone(s,t)
5
- s
6
- end
7
- def self.peek_tone(s)
8
- NEUTRAL_TONE
9
- end
10
- def self.pop_tone(s)
11
- [NEUTRAL_TONE, s]
12
- end
13
- end
14
- end
15
- end
16
-
@@ -1,24 +0,0 @@
1
- module Pinyin
2
- module Tones
3
- class Numbers
4
-
5
- def self.add_tone(syll, tone)
6
- syll + Tones.normalize(tone).to_s
7
- end
8
-
9
-
10
- def self.peek_tone(syll)
11
- if syll =~ /(\d)\Z/
12
- Tones.normalize Integer($1)
13
- else
14
- NEUTRAL_TONE
15
- end
16
- end
17
-
18
- def self.pop_tone(syll)
19
- [ peek_tone(syll), syll[/\A\D+/] ]
20
- end
21
-
22
- end
23
- end
24
- end