ssmd 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/SPECIFICATION.md +2 -0
- data/lib/ssmd/annotations/phoneme_annotation.rb +9 -4
- data/lib/ssmd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e270af9f80cfc4b89fca218e7172e1be5b8aa11a
|
4
|
+
data.tar.gz: 52fcd2bda2ba55f205034fe8e9f892c7ac0093e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdd9b4a390e7f0b1f2520b833d0fd202485b8c8fd19f6109c45ada7a1ad699dc31072ff91780fe01fb5948136989a039da3b1f36348690a00cf7af426e1484f4
|
7
|
+
data.tar.gz: 2666e4b1ef10393a8aea63aee19d6ad97785df536ca7ebc83b177edad341fac56c0a5eda2fbe38ea12136ea173f230b2a0cc839732be150e5e705c7deaca19b3
|
data/SPECIFICATION.md
CHANGED
@@ -153,11 +153,13 @@ This can be done via phonemes. While SSML supports IPA, SSMD uses [X-SAMPA](http
|
|
153
153
|
SSMD:
|
154
154
|
```
|
155
155
|
The German word ["dich"](ph: dIC) does not sound like dick.
|
156
|
+
You can also use IPA directly: ["dich"](ipa: dɪç)
|
156
157
|
```
|
157
158
|
|
158
159
|
SSML:
|
159
160
|
```html
|
160
161
|
The German word <phoneme alphabet="ipa" ph="dɪç">"dich"</phoneme> does not sound like dick.
|
162
|
+
You can also use IPA directly: <phoneme alphabet="ipa" ph="dɪç">"dich"</phoneme>
|
161
163
|
```
|
162
164
|
|
163
165
|
***
|
@@ -7,12 +7,17 @@ module SSMD::Annotations
|
|
7
7
|
attr_reader :x_sampa, :ipa
|
8
8
|
|
9
9
|
def self.regex
|
10
|
-
/ph: ?(.+)/
|
10
|
+
/((?:ph)|(?:ipa)): ?(.+)/
|
11
11
|
end
|
12
12
|
|
13
|
-
def initialize(
|
14
|
-
@x_sampa =
|
15
|
-
|
13
|
+
def initialize(ph, text)
|
14
|
+
@x_sampa = text if ph == "ph"
|
15
|
+
|
16
|
+
if ph == "ph"
|
17
|
+
@ipa = x_sampa_to_ipa x_sampa
|
18
|
+
elsif ph == "ipa"
|
19
|
+
@ipa = text
|
20
|
+
end
|
16
21
|
end
|
17
22
|
|
18
23
|
def wrap(text)
|
data/lib/ssmd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssmd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Kahl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|