middleman-blog-similar 1.1.0 → 1.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
  SHA1:
3
- metadata.gz: 77019d3820ab3675cfa8166316fb6df317bf3ed3
4
- data.tar.gz: 96554671c9c25895fc5d3a7e1c6918a38ddeffdc
3
+ metadata.gz: 5ee2d869f0fbef993f19006dbb2a3ffd062aa3e1
4
+ data.tar.gz: 7051b96407a79365e0959785210a2a3e55b5191a
5
5
  SHA512:
6
- metadata.gz: b09d3d7dcbda754db882dcd25bdb0b8bedde5e2bbf08bb8147fe4a7991c950ddae44079e9e0eba646de3b061a3f43770a525a59f7467fc03a89d289916ca9e34
7
- data.tar.gz: 53bbca67f5ba0f5003e60f5d55a291f47a2d6cc223efef4609bbaa6632e1d26f8790981a0ab6da6ce88d3452aa42ef5ed222c5c0e8cd7d26581b8fedbf0f4f67
6
+ metadata.gz: 419555674c318f4d018b1c39e9de9012b16f7f6fcb5ee9d95a7aa941fac010dcbc33da4dbbb014161d619cde8c3addfce3155f248472c8c0d7bbc43783eeca61
7
+ data.tar.gz: 840433955aabe91a21b59701ebe1598d4bec976752ea89e7da40de575d05fb33749e30bec8bc821b70c1901c96c629e8b77d6b8f4f0f04634c414d3f57248fa4
@@ -1,3 +1,8 @@
1
+ 1.1.1
2
+ -----
3
+
4
+ * Improve MeCab.
5
+
1
6
  1.1.0
2
7
  -----
3
8
 
@@ -12,7 +12,9 @@ class Middleman::Blog::Similar::Algorithm::WordFrequency::Mecab < ::Middleman::B
12
12
  f.close_write
13
13
  while line = f.gets
14
14
  word, pos = line.split(/[\t\s]+/)
15
- res << word if pos && pos.start_with?('名詞')
15
+ next unless pos
16
+ pos = pos.split(',')
17
+ res << word if pos[0] == '名詞' && %w{一般 固有名詞}.include?(pos[1])
16
18
  end
17
19
  }
18
20
  res
@@ -1,7 +1,7 @@
1
1
  module Middleman
2
2
  module Blog
3
3
  module Similar
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -25,7 +25,7 @@ describe 'Middleman::Blog::Similar::Algorithm::WordFrequency::Mecab' do
25
25
  describe(:output) {
26
26
  if %x{which mecab}
27
27
  subject { algorithm.tags }
28
- it { should eq ["fox","の","国家","さん","方","誰","私","坊ちゃん","立脚","西洋","矛盾","相違","発会","時分","昨日","講演","教師","拡張","悪口","尻","","結果","開始","周旋","向","叫び","反駁","反抗","前","人間","ネルソン","よう","関係","なん","ため","それ","そう","院","この世","お話","隙","expect","articl","3"] }
28
+ it { should eq ["fox", "国家", "", "教師", "悪口", "尻", "坊ちゃん", "時分", "向", "叫び", "人間", "ネルソン", "この世", "西洋", "expect", "articl"] }
29
29
  else
30
30
  pending "mecab is not installed."
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-blog-similar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Nagase