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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f34d91a175036bcba54aebf0a3de916ef9ba463
4
- data.tar.gz: b4235616cbf5f6767bc7e709b037b1f4b152f997
3
+ metadata.gz: e270af9f80cfc4b89fca218e7172e1be5b8aa11a
4
+ data.tar.gz: 52fcd2bda2ba55f205034fe8e9f892c7ac0093e7
5
5
  SHA512:
6
- metadata.gz: aaf0d622360f70bca2f64c01f9a8ea77e6b332eccf5c506558b75bf15cb2b2b699b45055af1a76d9381dc1b0d553327aae817501acdbdf8674909d0c241745d8
7
- data.tar.gz: 48f0e911ac1c06d3faaebd9506a486eb85e248e5a410d1d5c0750679f15d37839e74667850d7d34b18e30eccd9be6b40028b54ea75c652cf5ea8a09f9e8aaf59
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(x_sampa)
14
- @x_sampa = x_sampa
15
- @ipa = x_sampa_to_ipa x_sampa
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
@@ -1,3 +1,3 @@
1
1
  module SSMD
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
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.6.1
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-17 00:00:00.000000000 Z
11
+ date: 2017-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler