suri_lang 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4587346ccace049559a79d1d1136f481522556362ecc47cb32171cb52ae55f6
4
- data.tar.gz: e883717fe386728ed9d1e89c49b4bb961ce4a62b6c2b9856cf7cbbc9644cb975
3
+ metadata.gz: e4370e30c5284bb7e14676c436631086769b8729fb14f1c42c96abb27507a554
4
+ data.tar.gz: fe3de3b94ccdd7a666c4d6f2e359b652c6faa46f29618353ffe2c72db97015f8
5
5
  SHA512:
6
- metadata.gz: 91822ca0d9ca5e4aabc723f826dcde808890eae2fc7cfd1c1e37698e2880b895e3effc521954916099440e73d32ac0924be9b41a969cc1b9f138ff4a7b616d6f
7
- data.tar.gz: c1363595922750f22699e3356137c093665f698af433fb6118c808515171692de7cb201fc7313d95db9adb129bae2f44078bcb6b17bc49a1532636b21d8c6840
6
+ metadata.gz: f2cb35c9626f80a24e1ce5662615ffedb40cec778032552c6fd8128cc758fb99aee07b668f6a2a288e4ed083a34d829e45724abd082bbd79d3541326bee38fdd
7
+ data.tar.gz: e4b38bbcabab8ad47a17ce85d51faa63f4fd1b71a9590ae767b61ef92c54848e4e0b0e5c441a91662d573012291482845544f7f42106b98ec4de45525485ebc4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suri_lang (0.1.0)
4
+ suri_lang (0.1.1)
5
5
  natto (~> 1.1)
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ module SuriLang
13
13
 
14
14
  def self.wakati(text)
15
15
  nm = Natto::MeCab.new('-Owakati')
16
- nm.enum_parse(text).select{|n| n.is_nor?}.map(&:surface)
16
+ nm.enum_parse(text).select{|n| !n.is_eos?}.map(&:surface)
17
17
  end
18
18
 
19
19
  def self.katakana(word, word_class)
@@ -22,7 +22,7 @@ module SuriLang
22
22
 
23
23
  def self.translate(text)
24
24
  nm = Natto::MeCab.new('-F%m,%f[0]')
25
- features = nm.enum_parse(text).select{|n| n.is_nor?}.map{|n| n.feature.split(',')}
25
+ features = nm.enum_parse(text).select{|n| !n.is_eos?}.map{|n| n.feature.split(',')}
26
26
  words = features.map{|feature| katakana(feature[0], feature[1])}
27
27
  words.join
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module SuriLang
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suri_lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tanaken0515
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-25 00:00:00.000000000 Z
11
+ date: 2019-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: natto