ankusa 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/docs/classes/String.html +1 -1
- data/docs/created.rid +1 -1
- data/docs/files/lib/ankusa/extensions_rb.html +1 -1
- data/lib/ankusa/extensions.rb +1 -1
- metadata +4 -4
data/Rakefile
CHANGED
@@ -22,9 +22,9 @@ Rake::TestTask.new("test") { |t|
|
|
22
22
|
|
23
23
|
spec = Gem::Specification.new do |s|
|
24
24
|
s.name = "ankusa"
|
25
|
-
s.version = "0.0.
|
25
|
+
s.version = "0.0.5"
|
26
26
|
s.authors = ["Brian Muller"]
|
27
|
-
s.date = %q{2010-12-
|
27
|
+
s.date = %q{2010-12-03}
|
28
28
|
s.description = "Naive Bayes classifier with HBase storage"
|
29
29
|
s.summary = "Naive Bayes classifier in Ruby that uses Hadoop's HBase for storage"
|
30
30
|
s.email = "brian.muller@livingsocial.com"
|
data/docs/classes/String.html
CHANGED
@@ -150,7 +150,7 @@
|
|
150
150
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ascii</span>
|
151
151
|
<span class="ruby-comment cmt"># from http://www.jroller.com/obie/tags/unicode</span>
|
152
152
|
<span class="ruby-identifier">converter</span> = <span class="ruby-constant">Iconv</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'ASCII//IGNORE//TRANSLIT'</span>, <span class="ruby-value str">'UTF-8'</span>)
|
153
|
-
<span class="ruby-identifier">converter</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'U*'</span>).<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">cp</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cp</span> <span class="ruby-operator"><</span> <span class="ruby-value">127</span> }.<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'U*'</span>)
|
153
|
+
<span class="ruby-identifier">converter</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'U*'</span>).<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">cp</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cp</span> <span class="ruby-operator"><</span> <span class="ruby-value">127</span> }.<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'U*'</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-value str">""</span>
|
154
154
|
<span class="ruby-keyword kw">end</span>
|
155
155
|
</pre>
|
156
156
|
</div>
|
data/docs/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Fri, 03 Dec 2010
|
1
|
+
Fri, 03 Dec 2010 15:29:25 -0500
|
data/lib/ankusa/extensions.rb
CHANGED
@@ -8,6 +8,6 @@ class String
|
|
8
8
|
def to_ascii
|
9
9
|
# from http://www.jroller.com/obie/tags/unicode
|
10
10
|
converter = Iconv.new('ASCII//IGNORE//TRANSLIT', 'UTF-8')
|
11
|
-
converter.iconv(self).unpack('U*').select { |cp| cp < 127 }.pack('U*')
|
11
|
+
converter.iconv(self).unpack('U*').select { |cp| cp < 127 }.pack('U*') rescue ""
|
12
12
|
end
|
13
13
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ankusa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Muller
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-03 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|