ipa_phonetics 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 374298034b82bcef59d30ece27896762ad79a22e2b3c5413f6814544d1b59e4e
4
- data.tar.gz: 0e7bf2b5111a1f6d72a2fea94386611e2442b1315a3460020e8dd37e79a94a56
3
+ metadata.gz: b1789e87907155f4231e92cff8bd3f50cfbb373f9321027e07e675437f6673c7
4
+ data.tar.gz: 05de17c8ba93f90834bfa52fc7f5a45db545f13986b2d47a974a4dbc86ed2875
5
5
  SHA512:
6
- metadata.gz: cac999ad6f32fa690778d2a3d84e693c97ba07a9c3705569cc93b9a80e2b648a08740e5debed0dab37380f20b54aeb83590ceeeca79815ba05486e1f3fcfbf00
7
- data.tar.gz: 265fc4f7cb30c01b349778a3b589d3c4876cc3069cc912f3742d2e05f6d7def0d72a6873a8efc478a92ff75271a41556aeb56023059ba30c90bd256783342b5c
6
+ metadata.gz: 9aa5f74e33a023654ba45e97194ad5d437f5666ea7f8ddfb6d0c5c605e006fe1d7e67f23eb12236e35fb47adbb3bcd1c45f51369c9dbf478b8f80aaef84584c1
7
+ data.tar.gz: 7ea8178c743c609a134bab1b83bc00ea65e59dcdd6ac349622a4b40e6883d95707aeef5114428b70eecad8fc5471fea2537ba40aa978b288dc1480ad90777ec9
@@ -4,7 +4,7 @@ require "ipa_phonetics/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "ipa_phonetics"
7
- spec.version = "0.1.2"
7
+ spec.version = "0.1.3"
8
8
  spec.authors = ["nico_lrx"]
9
9
  spec.email = ["nicolas.leroux@sciencespo.fr"]
10
10
 
data/lib/ipa_phonetics.rb CHANGED
@@ -9,27 +9,27 @@ module IpaPhonetics
9
9
 
10
10
  @timeout = 1
11
11
 
12
- def self.parseCSV(path)
12
+ def IpaPhonetics.parseCSV(path)
13
13
  Hash[File.open("#{ROOT}/data/#{path}.csv").read.split("\n").map {|ligne| ligne.split("#")}]
14
14
  end
15
15
 
16
- def self.exceptions
16
+ def IpaPhonetics.exceptions
17
17
  @exceptions ||= JSON.parse(File.read("#{ROOT}/data/dict.json"))
18
18
  end
19
19
 
20
- def self.conversion
20
+ def IpaPhonetics.conversion
21
21
  @conversion ||= parseCSV "conversion"
22
22
  end
23
23
 
24
- def self.set_timeout(seconds)
24
+ def IpaPhonetics.set_timeout(seconds)
25
25
  @timeout = seconds
26
26
  end
27
27
 
28
- def self.timeout
28
+ def IpaPhonetics.timeout
29
29
  @timeout
30
30
  end
31
31
 
32
- def self.get(text)
32
+ def IpaPhonetics.get(text)
33
33
  text = text.downcase
34
34
  text.gsub(SPE, "").split.map do |word|
35
35
  exceptions[word] || "".tap do |result|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipa_phonetics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nico_lrx