ruby-pinyin 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/lib/ruby-pinyin/backend/simple.rb +5 -1
- data/lib/ruby-pinyin/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0433765c652e4fd6b3cf750f93c432d535e3034f
|
4
|
+
data.tar.gz: 49e73c852d4f7ab99ce2ce77f43281dfbf220b28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0352956d02fb5e9ba74492d622de0bd203bfcdf6b82772c99ac0a83740628f080f6cdaa64b76a782ca91ee8b45f8457fcea3e3dcb00925876b79abc9ed7a7561
|
7
|
+
data.tar.gz: 147b224102bfcb95dbdca8f8879ea7ed940bb35e50734fa1b5ac6fc51f1fbdbed73bb81974c8f138004c4c8bb2bb3ee852dffd7b803ae37c3cd690b4da7922ce
|
@@ -21,7 +21,11 @@ module PinYin
|
|
21
21
|
else
|
22
22
|
val = [t].pack('U*')
|
23
23
|
if val =~ /^[_0-9a-zA-Z\s]*$/ # 复原,去除特殊字符,如全角符号等。
|
24
|
-
|
24
|
+
if res.last && res.last.english?
|
25
|
+
res.last << Value.new(val, true)
|
26
|
+
elsif val != ' '
|
27
|
+
res << Value.new(val, true)
|
28
|
+
end
|
25
29
|
elsif include_punctuations
|
26
30
|
val = [Punctuation[code]].pack('H*') if Punctuation.include?(code)
|
27
31
|
(res.last ? res.last : res) << Value.new(val, false)
|
data/lib/ruby-pinyin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-pinyin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Xie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmmseg-cpp
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2
|
19
|
+
version: '0.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2
|
26
|
+
version: '0.2'
|
27
27
|
description: Pinyin is a romanization system (phonemic notation) of Chinese characters,
|
28
28
|
this gem helps you to convert Chinese characters into pinyin form.
|
29
29
|
email:
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.2.
|
69
|
+
rubygems_version: 2.2.2
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: Convert Chinese characters into pinyin.
|