analy_z 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 +4 -4
- data/lib/analy_z/version.rb +1 -1
- data/lib/analy_z.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c26e4e3a7ea59261a8fd4fe5512f72add1f9a55
|
4
|
+
data.tar.gz: 8fbc07f23bcf2e0f166a5d17155f28405fee1fc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c3738d40db2d336ff09ca96f8affc7dc3c965b2c97df003056cf96cdfd68d462e2d9b7237db54865f5cd84df99bd58b33787cdc75d7e82c39ee20011b1d7d9b
|
7
|
+
data.tar.gz: 02fd6e2a56420fb1dc03a7dc43d2272da158cf4080601a465bbabae43608d9dfbe42790faaf6599b02f9c55979d46b4da787a99197a2739dfe4c0923a3d6c1d3
|
data/lib/analy_z/version.rb
CHANGED
data/lib/analy_z.rb
CHANGED
@@ -16,9 +16,9 @@ module AnalyZ
|
|
16
16
|
attr_accessor :texts
|
17
17
|
attr_accessor :sentences
|
18
18
|
|
19
|
-
def initialize
|
19
|
+
def initialize html_path, selector = 'body', type_ary = ['名詞']
|
20
20
|
@sentences = {}
|
21
|
-
Dir.glob(
|
21
|
+
Dir.glob(html_path).each do |f|
|
22
22
|
@sentences[f] = parse_html(Nokogiri::HTML.parse(File.read(f), nil, nil).css(selector).to_html)
|
23
23
|
end
|
24
24
|
analyze_words(@sentences)
|