word_count_analyzer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +554 -0
- data/Rakefile +2 -0
- data/lib/word_count_analyzer.rb +14 -0
- data/lib/word_count_analyzer/analyzer.rb +34 -0
- data/lib/word_count_analyzer/contraction.rb +176 -0
- data/lib/word_count_analyzer/counter.rb +230 -0
- data/lib/word_count_analyzer/date.rb +149 -0
- data/lib/word_count_analyzer/ellipsis.rb +48 -0
- data/lib/word_count_analyzer/hyperlink.rb +53 -0
- data/lib/word_count_analyzer/hyphenated_word.rb +23 -0
- data/lib/word_count_analyzer/number.rb +23 -0
- data/lib/word_count_analyzer/numbered_list.rb +61 -0
- data/lib/word_count_analyzer/punctuation.rb +52 -0
- data/lib/word_count_analyzer/slash.rb +84 -0
- data/lib/word_count_analyzer/version.rb +3 -0
- data/lib/word_count_analyzer/xhtml.rb +26 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/word_count_analyzer/analyzer_spec.rb +11 -0
- data/spec/word_count_analyzer/contraction_spec.rb +124 -0
- data/spec/word_count_analyzer/counter_spec.rb +647 -0
- data/spec/word_count_analyzer/date_spec.rb +257 -0
- data/spec/word_count_analyzer/ellipsis_spec.rb +69 -0
- data/spec/word_count_analyzer/hyperlink_spec.rb +77 -0
- data/spec/word_count_analyzer/hyphenated_word_spec.rb +81 -0
- data/spec/word_count_analyzer/number_spec.rb +63 -0
- data/spec/word_count_analyzer/numbered_list_spec.rb +69 -0
- data/spec/word_count_analyzer/punctuation_spec.rb +91 -0
- data/spec/word_count_analyzer/slash_spec.rb +105 -0
- data/spec/word_count_analyzer/xhtml_spec.rb +65 -0
- data/word_count_analyzer.gemspec +26 -0
- metadata +153 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe WordCountAnalyzer::Number do
|
4
|
+
context '#includes_number?' do
|
5
|
+
it 'returns true if the string includes a number #001' do
|
6
|
+
string = 'It cost $10,000 dollars.'
|
7
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
8
|
+
expect(ws.includes_number?).to eq(true)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns true if the string includes a number #002' do
|
12
|
+
string = 'It cost 500 dollars.'
|
13
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
14
|
+
expect(ws.includes_number?).to eq(true)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'returns true if the string includes a number #003' do
|
18
|
+
string = 'It was only 50% of the total.'
|
19
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
20
|
+
expect(ws.includes_number?).to eq(true)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'returns true if the string includes a number #004' do
|
24
|
+
string = 'It was only 50 % of the total.'
|
25
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
26
|
+
expect(ws.includes_number?).to eq(true)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "returns false if the string doesn't includes a number #005" do
|
30
|
+
string = 'Hello world.'
|
31
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
32
|
+
expect(ws.includes_number?).to eq(false)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns false if the string doesn't includes a number #006" do
|
36
|
+
string = 'Today is 2/18/2014.'
|
37
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
38
|
+
expect(ws.includes_number?).to eq(false)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context '#replace' do
|
43
|
+
it 'returns the string with number and unit substituted as one token #001' do
|
44
|
+
string = 'It was only 50 % of the total. 500 total $300.'
|
45
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
46
|
+
expect(ws.replace).to eq("It was only wsnumword % of the total. wsnumword total wsnumword ")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context '#occurences' do
|
51
|
+
it 'returns the number of occurences of a number in the string #001' do
|
52
|
+
string = 'It was only 50 % of the total. 500 total. That costs $300 and is 50% off.'
|
53
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
54
|
+
expect(ws.occurences).to eq(4)
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'ignores dates #002' do
|
58
|
+
string = 'It was only 50 % of the total on Wednesday, June 4 2015. 500 total. That costs $300 and is 50% off only on Apr 5th 1999.'
|
59
|
+
ws = WordCountAnalyzer::Number.new(string: string)
|
60
|
+
expect(ws.occurences).to eq(4)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe WordCountAnalyzer::NumberedList do
|
4
|
+
context '#includes_numbered_list?' do
|
5
|
+
it 'returns true if the string includes a numbered list #001' do
|
6
|
+
string = "1. List item a\n\n2. List item b\n\n3. List item c."
|
7
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
8
|
+
expect(ws.includes_numbered_list?).to eq(true)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns false if the string does not include a numbered list #002' do
|
12
|
+
string = "I have 1.00 dollar and 2 cents."
|
13
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
14
|
+
expect(ws.includes_numbered_list?).to eq(false)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'returns false if the string does not include at least 2 list items #003' do
|
18
|
+
string = "I have 2."
|
19
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
20
|
+
expect(ws.includes_numbered_list?).to eq(false)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context '#replace' do
|
25
|
+
it 'replaces any numbered list numbers with an empty string' do
|
26
|
+
string = "1. List item a\n\n2. List item b\n\n3. List item c."
|
27
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
28
|
+
expect(ws.replace).to eq(" List item a\n\n List item b\n\n List item c.")
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'replaces any numbered list numbers with an empty string' do
|
32
|
+
string = "It also shouldn't have too many contractions, maybe 2. Let's add a list 1. List item a\n\n2. List item b\n\n3. List item c."
|
33
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
34
|
+
expect(ws.replace).to eq("It also shouldn't have too many contractions, maybe 2. Let's add a list List item a\n\n List item b\n\n List item c.")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context '#occurences' do
|
39
|
+
it 'counts the occurences of numbered lists #001' do
|
40
|
+
string = "1. List item a\n\n2. List item b\n\n3. List item c."
|
41
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
42
|
+
expect(ws.occurences).to eq(3)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'counts the occurences of numbered lists #002' do
|
46
|
+
string = "I have 2."
|
47
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
48
|
+
expect(ws.occurences).to eq(0)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'counts the occurences of numbered lists #003' do
|
52
|
+
string = "1. List item a\n\n2. List item b\n\n3. List item c. Then more text. Ok start a new list. 1. item a 2. item b."
|
53
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
54
|
+
expect(ws.occurences).to eq(5)
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'counts the occurences of numbered lists #004' do
|
58
|
+
string = "1. List item a\n\n2. List item b\n\n3. List item c. Then more text. Ok start a new non-list. I have 2."
|
59
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
60
|
+
expect(ws.occurences).to eq(3)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'counts the occurences of numbered lists #005' do
|
64
|
+
string = "It also shouldn't have too many contractions, maybe 2. Let's add a list 1. item a 2. item b 3. item c."
|
65
|
+
ws = WordCountAnalyzer::NumberedList.new(string: string)
|
66
|
+
expect(ws.occurences).to eq(3)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe WordCountAnalyzer::Punctuation do
|
4
|
+
context '#dotted_line_ocurrances' do
|
5
|
+
it 'returns the number of dotted line occurences #001' do
|
6
|
+
string = "Here is one …………………………………………………………………… and another ......"
|
7
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
8
|
+
expect(ws.dotted_line_ocurrances).to eq(2)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns the number of dotted line occurences #002' do
|
12
|
+
string = "Hello world"
|
13
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
14
|
+
expect(ws.dotted_line_ocurrances).to eq(0)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context '#dashed_line_ocurrances' do
|
19
|
+
it 'returns the number of dotted line occurences #001' do
|
20
|
+
string = "Here is one ----- and another -----"
|
21
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
22
|
+
expect(ws.dashed_line_ocurrances).to eq(2)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'returns the number of dotted line occurences #002' do
|
26
|
+
string = "Hello world"
|
27
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
28
|
+
expect(ws.dashed_line_ocurrances).to eq(0)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context '#underscore_ocurrances' do
|
33
|
+
it 'returns the number of undescore occurences #001' do
|
34
|
+
string = "Here is one ______ and another ______"
|
35
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
36
|
+
expect(ws.underscore_ocurrances).to eq(2)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'returns the number of undescore occurences #002' do
|
40
|
+
string = "Hello world"
|
41
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
42
|
+
expect(ws.underscore_ocurrances).to eq(0)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context '#stray_punctuation_occurences' do
|
47
|
+
it 'returns the number of stray punctuation occurences #001' do
|
48
|
+
string = "Hello world ? This is another - sentence ."
|
49
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
50
|
+
expect(ws.stray_punctuation_occurences).to eq(3)
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'returns the number of stray punctuation occurences #002' do
|
54
|
+
string = "Hello world. Great?"
|
55
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
56
|
+
expect(ws.stray_punctuation_occurences).to eq(0)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context '#replace_dotted_line' do
|
61
|
+
it 'replaces the dotted lines' do
|
62
|
+
string = "Here is one …………………………………………………………………… and another ......"
|
63
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
64
|
+
expect(ws.replace_dotted_line).to eq("Here is one and another ")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context '#replace_dashed_line' do
|
69
|
+
it 'replaces the dashed lines' do
|
70
|
+
string = "Here is one ----- and another -----"
|
71
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
72
|
+
expect(ws.replace_dashed_line).to eq("Here is one and another ")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
context '#replace_underscore' do
|
77
|
+
it 'replaces the underscores' do
|
78
|
+
string = "Here is one ______ and another ______"
|
79
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
80
|
+
expect(ws.replace_underscore).to eq("Here is one and another ")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
context '#replace_stray_punctuation' do
|
85
|
+
it 'replaces any stray punctutation' do
|
86
|
+
string = "Hello world ? This is another - sentence ."
|
87
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
88
|
+
expect(ws.replace_stray_punctuation).to eq("Hello world This is another sentence ")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe WordCountAnalyzer::Slash do
|
4
|
+
context '#includes_forward_slash?' do
|
5
|
+
it 'returns true if the string includes a token with a forward slash #001' do
|
6
|
+
string = "Using the solidus for he/she/it is often discouraged, except in this case."
|
7
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
8
|
+
expect(ws.includes_forward_slash?).to eq(true)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns false if the string does not includes a token with a forward slash #002' do
|
12
|
+
string = "Hello world."
|
13
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
14
|
+
expect(ws.includes_forward_slash?).to eq(false)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'ignores hyperlinks #003' do
|
18
|
+
string = "http://www.google.com/google"
|
19
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
20
|
+
expect(ws.includes_forward_slash?).to eq(false)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'ignores dates #004' do
|
24
|
+
string = "Today is 2/15/2013"
|
25
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
26
|
+
expect(ws.includes_forward_slash?).to eq(false)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context '#includes_backslash?' do
|
31
|
+
it 'returns true if the string includes a token with a backslash #001' do
|
32
|
+
string = 'The file location is c:\Users\johndoe.'
|
33
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
34
|
+
expect(ws.includes_backslash?).to eq(true)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'returns false if the string does not includes a token with a backslash #002' do
|
38
|
+
string = "Hello world."
|
39
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
40
|
+
expect(ws.includes_backslash?).to eq(false)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context '#forward_slash_occurences' do
|
45
|
+
it 'returns the number of occurences of tokens with a forward slash #001' do
|
46
|
+
string = "Using the solidus for he/she/it is often discouraged, except in this case she/he said."
|
47
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
48
|
+
expect(ws.forward_slash_occurences).to eq(2)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'returns the number of occurences of tokens with a forward slash #002' do
|
52
|
+
string = "Hello world."
|
53
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
54
|
+
expect(ws.forward_slash_occurences).to eq(0)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context '#backslash_occurences' do
|
59
|
+
it 'returns the number of occurences of tokens with a backslash #001' do
|
60
|
+
string = 'The file location is c:\Users\johndoe or d:\Users\john\www'
|
61
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
62
|
+
expect(ws.backslash_occurences).to eq(2)
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'returns the number of occurences of tokens with a backslash #002' do
|
66
|
+
string = "Hello world."
|
67
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
68
|
+
expect(ws.backslash_occurences).to eq(0)
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'returns the number of occurences of tokens with a backslash #003' do
|
72
|
+
string = "<span>Hello world.</span>"
|
73
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
74
|
+
expect(ws.backslash_occurences).to eq(0)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
context '#replace_forward_slashes_multiple' do
|
79
|
+
it 'replaces forward slashes with multiple tokens #001' do
|
80
|
+
string = "he/she/it"
|
81
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
82
|
+
expect(ws.replace_forward_slashes).to eq("he she it")
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'replaces forward slashes with multiple tokens #002' do
|
86
|
+
string = "hello//world"
|
87
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
88
|
+
expect(ws.replace_forward_slashes).to eq("hello world")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
context '#replace_forward_slashes_except_dates' do
|
93
|
+
it 'replaces forward slashes with multiple tokens #001' do
|
94
|
+
string = "he/she/it 4/28/2013"
|
95
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
96
|
+
expect(ws.replace_forward_slashes).to eq("he she it wsdateword ")
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'replaces forward slashes with multiple tokens #002' do
|
100
|
+
string = "hello//world 4/28/2013"
|
101
|
+
ws = WordCountAnalyzer::Slash.new(string: string)
|
102
|
+
expect(ws.replace_forward_slashes).to eq("hello world wsdateword ")
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe WordCountAnalyzer::Xhtml do
|
4
|
+
context '#includes_xhtml?' do
|
5
|
+
it 'returns true if the string includes XML or HTML #001' do
|
6
|
+
string = '<span class="cool-text">Hello world</span>'
|
7
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
8
|
+
expect(ws.includes_xhtml?).to eq(true)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns true if the string includes XML or HTML #002' do
|
12
|
+
string = 'Hello there. Another sentence <tuv>Sentence</tuv> here.'
|
13
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
14
|
+
expect(ws.includes_xhtml?).to eq(true)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "returns false if the string doesn't include XML or HTML #003" do
|
18
|
+
string = 'Hello world.'
|
19
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
20
|
+
expect(ws.includes_xhtml?).to eq(false)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context '#replace' do
|
25
|
+
it 'replaces XML or HTML with an empty string #001' do
|
26
|
+
string = '<span class="cool-text">Hello world</span>'
|
27
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
28
|
+
expect(ws.replace).to eq(" Hello world ")
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'replaces XML or HTML with an empty string #002' do
|
32
|
+
string = 'Hello there. Another sentence <tuv>Sentence</tuv> here.'
|
33
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
34
|
+
expect(ws.replace).to eq("Hello there. Another sentence Sentence here.")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context '#count_difference_word_boundary' do
|
39
|
+
it 'counts the difference in word count between with xhtml and without #001' do
|
40
|
+
string = '<span class="cool-text">Hello world</span>'
|
41
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
42
|
+
expect(ws.count_difference_word_boundary).to eq(1)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'counts the difference in word count between with xhtml and without #002' do
|
46
|
+
string = 'Hello there. Another sentence <tuv>Sentence</tuv> here.'
|
47
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
48
|
+
expect(ws.count_difference_word_boundary).to eq(0)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'counts the difference in word count between with xhtml and without #003' do
|
52
|
+
string = '<span class=”cool-text”>Hello world</span> Hello there. Another sentence <tuv>Sentence</tuv> here. Hello world.'
|
53
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
54
|
+
expect(ws.count_difference_word_boundary).to eq(1)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context '#occurences' do
|
59
|
+
it 'counts the number of tags (1 opening set and 1 closing set of tags counts as 1)' do
|
60
|
+
string = '<span class=”cool-text”>Hello world</span> Hello there. Another sentence <tuv>Sentence</tuv> here. Hello world.'
|
61
|
+
ws = WordCountAnalyzer::Xhtml.new(string: string)
|
62
|
+
expect(ws.occurences).to eq(2)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'word_count_analyzer/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "word_count_analyzer"
|
8
|
+
spec.version = WordCountAnalyzer::VERSION
|
9
|
+
spec.authors = ["Kevin S. Dias"]
|
10
|
+
spec.email = ["diasks2@gmail.com"]
|
11
|
+
spec.summary = %q{A word count analyzer - see what word count gray areas might be affecting your word count.}
|
12
|
+
spec.description = %q{Word Count Analyzer is a Ruby gem that analyzes a string for potential areas of the text that might cause word count discrepancies depending on the tool used. It also provides comprehensive configuration options so you can easily customize how different gray areas should be counted and find the right word count for your purposes.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
spec.required_ruby_version = '>= 2.1.0'
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec"
|
25
|
+
spec.add_runtime_dependency "engtagger"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: word_count_analyzer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kevin S. Dias
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: engtagger
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Word Count Analyzer is a Ruby gem that analyzes a string for potential
|
70
|
+
areas of the text that might cause word count discrepancies depending on the tool
|
71
|
+
used. It also provides comprehensive configuration options so you can easily customize
|
72
|
+
how different gray areas should be counted and find the right word count for your
|
73
|
+
purposes.
|
74
|
+
email:
|
75
|
+
- diasks2@gmail.com
|
76
|
+
executables: []
|
77
|
+
extensions: []
|
78
|
+
extra_rdoc_files: []
|
79
|
+
files:
|
80
|
+
- ".gitignore"
|
81
|
+
- ".rspec"
|
82
|
+
- ".travis.yml"
|
83
|
+
- Gemfile
|
84
|
+
- LICENSE.txt
|
85
|
+
- README.md
|
86
|
+
- Rakefile
|
87
|
+
- lib/word_count_analyzer.rb
|
88
|
+
- lib/word_count_analyzer/analyzer.rb
|
89
|
+
- lib/word_count_analyzer/contraction.rb
|
90
|
+
- lib/word_count_analyzer/counter.rb
|
91
|
+
- lib/word_count_analyzer/date.rb
|
92
|
+
- lib/word_count_analyzer/ellipsis.rb
|
93
|
+
- lib/word_count_analyzer/hyperlink.rb
|
94
|
+
- lib/word_count_analyzer/hyphenated_word.rb
|
95
|
+
- lib/word_count_analyzer/number.rb
|
96
|
+
- lib/word_count_analyzer/numbered_list.rb
|
97
|
+
- lib/word_count_analyzer/punctuation.rb
|
98
|
+
- lib/word_count_analyzer/slash.rb
|
99
|
+
- lib/word_count_analyzer/version.rb
|
100
|
+
- lib/word_count_analyzer/xhtml.rb
|
101
|
+
- spec/spec_helper.rb
|
102
|
+
- spec/word_count_analyzer/analyzer_spec.rb
|
103
|
+
- spec/word_count_analyzer/contraction_spec.rb
|
104
|
+
- spec/word_count_analyzer/counter_spec.rb
|
105
|
+
- spec/word_count_analyzer/date_spec.rb
|
106
|
+
- spec/word_count_analyzer/ellipsis_spec.rb
|
107
|
+
- spec/word_count_analyzer/hyperlink_spec.rb
|
108
|
+
- spec/word_count_analyzer/hyphenated_word_spec.rb
|
109
|
+
- spec/word_count_analyzer/number_spec.rb
|
110
|
+
- spec/word_count_analyzer/numbered_list_spec.rb
|
111
|
+
- spec/word_count_analyzer/punctuation_spec.rb
|
112
|
+
- spec/word_count_analyzer/slash_spec.rb
|
113
|
+
- spec/word_count_analyzer/xhtml_spec.rb
|
114
|
+
- word_count_analyzer.gemspec
|
115
|
+
homepage: ''
|
116
|
+
licenses:
|
117
|
+
- MIT
|
118
|
+
metadata: {}
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 2.1.0
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.4.1
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: A word count analyzer - see what word count gray areas might be affecting
|
139
|
+
your word count.
|
140
|
+
test_files:
|
141
|
+
- spec/spec_helper.rb
|
142
|
+
- spec/word_count_analyzer/analyzer_spec.rb
|
143
|
+
- spec/word_count_analyzer/contraction_spec.rb
|
144
|
+
- spec/word_count_analyzer/counter_spec.rb
|
145
|
+
- spec/word_count_analyzer/date_spec.rb
|
146
|
+
- spec/word_count_analyzer/ellipsis_spec.rb
|
147
|
+
- spec/word_count_analyzer/hyperlink_spec.rb
|
148
|
+
- spec/word_count_analyzer/hyphenated_word_spec.rb
|
149
|
+
- spec/word_count_analyzer/number_spec.rb
|
150
|
+
- spec/word_count_analyzer/numbered_list_spec.rb
|
151
|
+
- spec/word_count_analyzer/punctuation_spec.rb
|
152
|
+
- spec/word_count_analyzer/slash_spec.rb
|
153
|
+
- spec/word_count_analyzer/xhtml_spec.rb
|