middleman-blog-similar 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ee2d869f0fbef993f19006dbb2a3ffd062aa3e1
|
4
|
+
data.tar.gz: 7051b96407a79365e0959785210a2a3e55b5191a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 419555674c318f4d018b1c39e9de9012b16f7f6fcb5ee9d95a7aa941fac010dcbc33da4dbbb014161d619cde8c3addfce3155f248472c8c0d7bbc43783eeca61
|
7
|
+
data.tar.gz: 840433955aabe91a21b59701ebe1598d4bec976752ea89e7da40de575d05fb33749e30bec8bc821b70c1901c96c629e8b77d6b8f4f0f04634c414d3f57248fa4
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
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
|
@@ -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","
|
28
|
+
it { should eq ["fox", "国家", "隙", "教師", "悪口", "尻", "坊ちゃん", "時分", "向", "叫び", "人間", "ネルソン", "この世", "西洋", "expect", "articl"] }
|
29
29
|
else
|
30
30
|
pending "mecab is not installed."
|
31
31
|
end
|