sanscript 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sanscript/detect.rb +2 -0
- data/lib/sanscript/transliterate.rb +3 -0
- data/lib/sanscript/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: 9faf67ffc560128328faa6ade8e07f2cde41a1a7
|
4
|
+
data.tar.gz: 23a0366c64070cda87fe0063e064e49325cc732a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2137e83f2ee4028214336d2d5e04699cdf6eed7425990367a19822b0a26452a92c64ce2796ef5c74f296223df1b56fc25e46b3e8fcd51c496c85e19ff7bd2f3f
|
7
|
+
data.tar.gz: 11672ae4c5ecf28144921033b7883a3a470e87bccc8aaa8df4abb36928cfa39b47011aa0b17240809006241a940b3ccb48f04a2080e912b5019ce96d5794fe7a
|
data/lib/sanscript/detect.rb
CHANGED
@@ -51,6 +51,8 @@ module Sanscript
|
|
51
51
|
module_function
|
52
52
|
|
53
53
|
def detect_script(text)
|
54
|
+
text = text.to_str.gsub(/(?<!\\)##.*?(?<!\\)##/, "\\1")
|
55
|
+
|
54
56
|
# Brahmic schemes are all within a specific range of code points.
|
55
57
|
if RE_BRAHMIC_RANGE === text
|
56
58
|
RE_BRAHMIC_SCRIPTS.each do |script, regex|
|
@@ -122,6 +122,9 @@ module Sanscript
|
|
122
122
|
add_roman_scheme(name, @schemes[name])
|
123
123
|
end
|
124
124
|
|
125
|
+
# Add Kyoto-Harvard copy (alternate name of Harvard-Kyoto scheme)/
|
126
|
+
add_roman_scheme(:kh, @schemes[:hk])
|
127
|
+
|
125
128
|
# ITRANS variant, which supports Dravidian short 'e' and 'o'.
|
126
129
|
itrans_dravidian = @schemes[:itrans].deep_dup
|
127
130
|
itrans_dravidian[:vowels] = %w[a A i I u U Ri RRI LLi LLi e E ai o O au]
|
data/lib/sanscript/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Bellefleur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|