apion 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2dd16503da79fcb82019addc0d0473d2cf4fa6f6
4
+ data.tar.gz: 41d8768701806beaf03bed5162445b86abd9515a
5
+ SHA512:
6
+ metadata.gz: f8289f6977ace26b36afd0bad2fac58ff7ef108df6b33c77c37e4a514b61870e611226d102f90218630446c44d1d73dc4a1fda63f9d3bbddc3c2d84f3328a2a4
7
+ data.tar.gz: bde4153a1ee1164eafa7eb248839e176bd5bc8e0bc815c1aa8f6d355229509e4c7bdc9a4f1a4e8a1c8683be3fda68eb7c68e75291bd9bff8c676dc5bffbfc19a
data/Gemfile ADDED
@@ -0,0 +1 @@
1
+ gem "json"
data/Gemfile.lock ADDED
@@ -0,0 +1,9 @@
1
+ GEM
2
+ specs:
3
+ json (1.8.0)
4
+
5
+ PLATFORMS
6
+ ruby
7
+
8
+ DEPENDENCIES
9
+ json
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ #Apion
2
+
3
+ Easy-to-use French => Phonetic Alphabet translator
4
+
5
+ ~~~
6
+ gem install apion
7
+ ~~~
8
+
9
+ ~~~
10
+ require "apion"
11
+ ~~~
12
+
13
+
14
+ *Examples* :
15
+
16
+ ~~~
17
+ irb(main):002:0> apion("Le chat dodu et roux mange une quiche aux lardons")
18
+ => ["lœ", "ʃa", "dɔdy", "e", "ru", "mɑ̃ʒ", "yn", "kiʃ", "o", "lardɔ̃"]
19
+ ~~~
20
+
21
+ *Automatic ponctuation removal* :
22
+
23
+ ~~~
24
+ irb(main):003:0> apion("Le chat dodu et roux mange ? Oh ! C'est une belle quiche aux lardons !!!")
25
+ => ["lœ", "ʃa", "dɔdy", "e", "ru", "mɑ̃ʒ", "o", "sɛ", "yn", "bɛl", "kiʃ", "o", "lardɔ̃"]
26
+ ~~~
27
+
28
+ *Handles both existing and non-existing words*
29
+
30
+ ~~~
31
+ irb(main):004:0> apion("Un chat dodu")
32
+ => ["œ̃", "ʃa", "dɔdy"]
33
+
34
+ irb(main):005:0> apion("Un chat toudouchoubidou")
35
+ => ["œ̃", "ʃa", "tuduʃubidu"]
36
+ ~~~
37
+
38
+
39
+
40
+
41
+ ***Important : All IPA characters can't be displayed in this README, so the translation can be slightly off***
data/apion-0.1.0.gem ADDED
Binary file
data/apion.gemspec ADDED
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'apion'
3
+ s.version = '0.1.0'
4
+ s.date = '2013-08-21'
5
+ s.summary = "Apion"
6
+ s.description = "Easy-to-use Fr/Api translator"
7
+ s.authors = ["Galaad Gauthier"]
8
+ s.email = 'coontail7@gmail.com'
9
+ s.files = Dir['**/*']
10
+ s.executables = ["apion"]
11
+ s.require_path = 'lib'
12
+ s.add_dependency "json"
13
+ s.homepage =
14
+ 'https://github.com/Galaad-Gauthier/Apion'
15
+ s.license = 'MIT'
16
+ end
data/bin/apion ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ root = File.expand_path("../..", __FILE__)
4
+ require "#{root}/lib/apion.rb"
5
+
6
+ puts apion(ARGV[0]).join
@@ -0,0 +1,178 @@
1
+ ^mm#m
2
+ ^ix$#iks
3
+ ^nn#n
4
+ ^où$#u
5
+ ^pp#p
6
+ ^rr#r
7
+ ^ll#l
8
+ ^ss#s
9
+ ^ciel$#sjɛl
10
+ ^tiel$#sjɛl
11
+ ^ieux$#jø
12
+ ^eux$#ø
13
+ ^end$#ɑ̃
14
+ ^iser#ize
15
+ ^ser$#se
16
+ ^gn#nj
17
+ ^ciné#sine
18
+ ^ant$#ɑ̃
19
+ ^er$#e
20
+ ^ez$#e
21
+ ^tin$#tɛ̃
22
+ ^ch$#k
23
+ ^aill#aj
24
+ ^eill#ɛj
25
+ ^ille$#j
26
+ ^uë#y
27
+ ^oë#oɛ
28
+ ^s(?=['ç'])#s
29
+ ^ueil#œj
30
+ ^aient$#ɛ
31
+ ^emment$#amɑ̃
32
+ ^ente$#ɑ̃t
33
+ ^ment$#mɑ̃
34
+ ^ent$#
35
+ ^et$#ɛ
36
+ ^eau#o
37
+ ^ea#a
38
+ ^et$#ɛ
39
+ ^oin#wɛ̃
40
+ ^ouin$#wɛ̃
41
+ ^oin$#wɛ̃
42
+ ^em(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#ɑ̃
43
+ ^ou(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#w
44
+ ^eu(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#œ
45
+ ^eu$#ø
46
+ ^eue$#ø
47
+ ^tien$#sjɛ̃
48
+ ^tion$#sjɔ̃
49
+ ^t(?=['in'])#t
50
+ ^ce$#sœ
51
+ ^t'#t
52
+ ^je$#ʒœ
53
+ ^ien#jɛ̃
54
+ ^(eur|oeur)$#œr
55
+ ^oe#œ
56
+ ^(ou|ou$)#u
57
+ ^à$#a
58
+ ^aise$#ɛz
59
+ ^en$#ɑ̃
60
+ ^g$#
61
+ ^d$#
62
+ ^gu(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#gy
63
+ ^gu(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#g
64
+ ^g(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#g
65
+ ^g(?=['o','ô','a','â','u','û'])#g
66
+ ^g(?=['e','ë','ê','i','y'])#ʒ
67
+ ^ille#ij
68
+ ^oi#wa
69
+ ^t(?=['i'])#s
70
+ ^aine$#ɛn
71
+ ^ys#iz
72
+ ^an(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#an
73
+ ^onn#ɔn
74
+ ^on#ɔ̃
75
+ ^oin$#wɛ̃
76
+ ^t$#
77
+ ^p$#
78
+ ^(l|ll)#l
79
+ ^j'#ʒ
80
+ ^h(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#
81
+ ^l'#l
82
+ ^c'#s
83
+ ^sym(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#sɛ̃
84
+ ^y(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#i
85
+ ^es$#
86
+ ^th#t
87
+ ^ine$#in
88
+ ^ph#f
89
+ ^i(?=['a','â','i','o','ô','u','û','è'])#j
90
+ ^and$#ɑ̃
91
+ ^euse$#øz
92
+ ^est$#ɛ
93
+ ^s(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#s
94
+ ^c(?=['b', 'c', 'd', 'f', 'g', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#k
95
+ ^c(?=['a','â','u','û','o','ô'])#k
96
+ ^c(?=['e','ë','ê','é','è','y','i','î'])#s
97
+ ^ç(?=['a','â','u','û','o','ô'])#s
98
+ ^y(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#j
99
+ ^en(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#ɑ̃
100
+ ^en(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#en
101
+ ^e(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z']{2})#ɛ
102
+ ^e(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z']{1})#œ
103
+ ^an(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#an
104
+ ^qu#k
105
+ ^eu$#œ
106
+ ^ouai#wɛ
107
+ ^ouet#wɛ
108
+ ^ch(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#k
109
+ ^in#ɛ̃
110
+ ^ou(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#w
111
+ ^ain#ɛ̃
112
+ ^ein#ɛ̃
113
+ ^ei#ɛ
114
+ ^er$#e
115
+ ^eu$#ø
116
+ ^gno#gno
117
+ ^hou#u
118
+ ^in$#ɛ̃
119
+ ^un$#œ̃
120
+ ^ai#ɛ
121
+ ^an#ɑ̃
122
+ ^au#o
123
+ ^ce$#s
124
+ ^ce#sɛ
125
+ ^ch(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#ʃ
126
+ ^eu#œ
127
+ ^ff#f
128
+ ^imm#im
129
+ ^im#ɛ̃
130
+ ^on(?=["a","â","e","ë","ê","i","o","ô","u","û","û","y","é","è","â","à","ï","î","ë","û","ù","ê"])#on
131
+ ^on(?=['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'z'])#ɔ̃
132
+ ^om(?=['b'])#ɔ̃
133
+ ^oû#u
134
+ ^s(?=.)#s
135
+ ^s$#
136
+ ^sh#ʃ
137
+ ^s#z
138
+ ^t$#
139
+ ^e$#
140
+ ^tt#t
141
+ ^ui#µi
142
+ ^x$#
143
+ ^x#ks
144
+ ^ça#sa
145
+ ^a#a
146
+ ^b#b
147
+ ^d#d
148
+ ^f#f
149
+ ^g#ʒ
150
+ ^i#i
151
+ ^j#ʒ
152
+ ^k#k
153
+ ^m#m
154
+ ^n#n
155
+ ^o#ɔ
156
+ ^p#p
157
+ ^r#r
158
+ ^t#t
159
+ ^u#y
160
+ ^v#v
161
+ ^w#w
162
+ ^z#z
163
+ ^â#a
164
+ ^è#ɛ
165
+ ^é#e
166
+ ^î#i
167
+ ^ï#i
168
+ ^ô#o
169
+ ^ö#o
170
+ ^c$#k
171
+ ^é#e
172
+ ^è#ɛ
173
+ ^ê#ɛ
174
+ ^ë#œ
175
+ ^û#y
176
+ ^à#a
177
+ ^h#
178
+ ^y#i