natto2classifier 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/natto2classifier/natto.rb +6 -3
- data/lib/natto2classifier/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: eaa514ae1b94d1dcc0b9c7447ad810f6fbf423ca
|
4
|
+
data.tar.gz: 2c7723924be08e45e09bdd8dc98196008fc9a0c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82d279d860e9f99ec196165895e08c0042aecf19363e5f21a5ce40ae8c2bbbe1976a638e058e0d02bae75b34dc4042b8c5a0d78ac293c8797567211c3fb83b26
|
7
|
+
data.tar.gz: f5cc0675543899e842ff5f3fc22cf5f207c0c871eb8cd9e6e4d4d5d809a874facd0010f4ec465b1ebb075699d528517a8d691717b098fd72f226acab593ed6ab
|
data/Gemfile.lock
CHANGED
@@ -4,10 +4,13 @@ require 'natto'
|
|
4
4
|
module Natto2classifier
|
5
5
|
class Natto
|
6
6
|
def self.parse(word)
|
7
|
-
nm = ::Natto::MeCab.new
|
7
|
+
nm = ::Natto::MeCab.new
|
8
8
|
results = []
|
9
|
-
nm.
|
10
|
-
|
9
|
+
nm.parse(word.to_s) do |n|
|
10
|
+
break if n.is_eos?
|
11
|
+
kana = n.feature.split(',')[7]
|
12
|
+
results << n.surface
|
13
|
+
results << kana if !kana.nil? && kana != '*'
|
11
14
|
end
|
12
15
|
results
|
13
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: natto2classifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kanayannet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|