phonology 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/phonology/ipa.rb +1 -1
- data/lib/phonology/orthography.rb +9 -0
- data/lib/phonology/sound.rb +5 -5
- data/lib/phonology/version.rb +1 -1
- metadata +3 -3
data/lib/phonology/ipa.rb
CHANGED
@@ -8,6 +8,11 @@ module Phonology
|
|
8
8
|
last_sound.__send__(sym, *args, &block)
|
9
9
|
end
|
10
10
|
|
11
|
+
def context(before, after)
|
12
|
+
string.downcase[offset - before.length, before.length] == before &&
|
13
|
+
string.downcase[offset + 1, after.length] == after
|
14
|
+
end
|
15
|
+
|
11
16
|
def anticipate(&block)
|
12
17
|
@anticipation = block
|
13
18
|
nil
|
@@ -36,6 +41,10 @@ module Phonology
|
|
36
41
|
false
|
37
42
|
end
|
38
43
|
|
44
|
+
def offset
|
45
|
+
@index
|
46
|
+
end
|
47
|
+
|
39
48
|
def between(before, after)
|
40
49
|
follows(*before) && precedes(*after)
|
41
50
|
end
|
data/lib/phonology/sound.rb
CHANGED
@@ -34,11 +34,11 @@ module Phonology
|
|
34
34
|
|
35
35
|
def sonority
|
36
36
|
case
|
37
|
-
when vocalic?
|
37
|
+
when vocalic? then 5
|
38
38
|
when approximant? then 4
|
39
|
-
when liquid?
|
40
|
-
when nasal?
|
41
|
-
when fricative?
|
39
|
+
when liquid? then 3
|
40
|
+
when nasal? then 2
|
41
|
+
when fricative? then 1
|
42
42
|
else 0
|
43
43
|
end
|
44
44
|
end
|
@@ -160,7 +160,7 @@ module Phonology
|
|
160
160
|
end
|
161
161
|
|
162
162
|
|
163
|
-
# A sound which begins plosive and
|
163
|
+
# A sound which begins plosive and finishes fricative.
|
164
164
|
class Affricate
|
165
165
|
|
166
166
|
include SoundBase
|
data/lib/phonology/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 9
|
9
|
+
version: 0.0.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Norman Clarke
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-13 00:00:00 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|