chat_correct 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +208 -0
  8. data/Rakefile +4 -0
  9. data/chat_correct.gemspec +28 -0
  10. data/lib/chat_correct/capitalization.rb +13 -0
  11. data/lib/chat_correct/combine_multi_word_verbs.rb +51 -0
  12. data/lib/chat_correct/common_verb_mistake.rb +62 -0
  13. data/lib/chat_correct/contraction.rb +103 -0
  14. data/lib/chat_correct/correct.rb +352 -0
  15. data/lib/chat_correct/corrections_hash.rb +204 -0
  16. data/lib/chat_correct/mistake_analyzer.rb +40 -0
  17. data/lib/chat_correct/pluralization.rb +22 -0
  18. data/lib/chat_correct/possessive.rb +25 -0
  19. data/lib/chat_correct/punctuation.rb +17 -0
  20. data/lib/chat_correct/punctuation_masquerading_as_spelling_error.rb +14 -0
  21. data/lib/chat_correct/spelling.rb +20 -0
  22. data/lib/chat_correct/time.rb +14 -0
  23. data/lib/chat_correct/tokenize.rb +164 -0
  24. data/lib/chat_correct/verb.rb +65 -0
  25. data/lib/chat_correct/version.rb +3 -0
  26. data/lib/chat_correct.rb +16 -0
  27. data/spec/chat_correct/capitalization_spec.rb +17 -0
  28. data/spec/chat_correct/combine_multi_word_verbs_spec.rb +39 -0
  29. data/spec/chat_correct/common_verb_mistake_spec.rb +24 -0
  30. data/spec/chat_correct/contraction_spec.rb +259 -0
  31. data/spec/chat_correct/correct_spec.rb +1650 -0
  32. data/spec/chat_correct/mistake_analyzer_spec.rb +99 -0
  33. data/spec/chat_correct/pluralization_spec.rb +31 -0
  34. data/spec/chat_correct/possessive_spec.rb +31 -0
  35. data/spec/chat_correct/punctuation_masquerading_as_spelling_error_spec.rb +24 -0
  36. data/spec/chat_correct/punctuation_spec.rb +21 -0
  37. data/spec/chat_correct/spelling_spec.rb +59 -0
  38. data/spec/chat_correct/time_spec.rb +21 -0
  39. data/spec/chat_correct/tokenize_spec.rb +142 -0
  40. data/spec/chat_correct/verb_spec.rb +60 -0
  41. data/spec/spec_helper.rb +1 -0
  42. metadata +201 -0
@@ -0,0 +1,1650 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe ChatCorrect::Correct do
4
+ context "example correction #001 (no mistakes)" do
5
+ before do
6
+ original_sentence = 'There are no mistakes here.'
7
+ corrected_sentence = 'There are no mistakes here.'
8
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
9
+ end
10
+
11
+ it 'Annotates the corrections' do
12
+ expect(@cc.correct).to eq({0 => {'token' => 'There', 'type' => 'no_mistake'}, 1 => {'token' => 'are', 'type' => 'no_mistake'}, 2 => {'token' => 'no', 'type' => 'no_mistake'}, 3 => {'token' => 'mistakes', 'type' => 'no_mistake'}, 4 => {'token' => 'here', 'type' => 'no_mistake'}, 5 => {'token' => '.', 'type' => 'no_mistake'}})
13
+ #expect(@cc.correct).to eq("{\"0\":{\"There\":\"no_mistake\"},\"1\":{\"are\":\"no_mistake\"},\"2\":{\"no\":\"no_mistake\"},\"3\":{\"mistakes\":\"no_mistake\"},\"4\":{\"here\":\"no_mistake\"},\"5\":{\".\":\"no_mistake\"}}")
14
+ end
15
+
16
+ it 'Reports the mistakes' do
17
+ expect(@cc.mistakes).to eq({})
18
+ end
19
+
20
+ it 'Counts the number of mistakes' do
21
+ expect(@cc.number_of_mistakes).to eq(0)
22
+ end
23
+
24
+ it 'Reports the mistakes by mistake type' do
25
+ expect(@cc.mistake_report).to eq({'missing_word' => 0, 'unnecessary_word' => 0, 'spelling' => 0, 'verb' => 0, 'punctuation' => 0, 'word_order' => 0, 'capitalization' => 0, 'duplicate_word' => 0, 'word_choice' => 0, 'pluralization' => 0, 'possessive' => 0, 'stylistic_choice' => 0})
26
+ end
27
+ end
28
+
29
+ context "example correction #002" do
30
+ before do
31
+ original_sentence = 'is the, puncttuation are wrong.'
32
+ corrected_sentence = 'Is the punctuation wrong?'
33
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
34
+ end
35
+
36
+ it 'Annotates the corrections' do
37
+ expect(@cc.correct).to eq({0 => {'token' => 'is', 'type' => 'capitalization_mistake'}, 1 => {'token' => 'Is', 'type' => 'capitalization_correction'}, 2 => {'token' => 'the', 'type' => 'no_mistake'}, 3 => {'token' => ',', 'type' => 'punctuation_mistake'}, 4 => {'token' => 'puncttuation', 'type' => 'spelling_mistake'}, 5 => {'token' => 'punctuation', 'type' => 'spelling_correction'}, 6 => {'token' => 'are', 'type' => 'unnecessary_word_mistake'}, 7 => {'token' => 'wrong', 'type' => 'no_mistake'}, 8 => {'token' => '.', 'type' => 'punctuation_mistake'}, 9 => {'token' => '?', 'type' => 'punctuation_correction'}})
38
+ #expect(@cc.correct).to eq("{\"0\":{\"is\":\"capitalization_mistake\"},\"1\":{\"Is\":\"capitalization_mistake_correction\"},\"2\":{\"the\":\"no_mistake\"},\"3\":{\",\":\"punctuation_mistake\"},\"4\":{\"puncttuation\":\"spelling_mistake\"},\"5\":{\"punctuation\":\"spelling_mistake_correction\"},\"6\":{\"are\":\"unnecessary_word_mistake\"},\"7\":{\"wrong\":\"no_mistake\"},\"8\":{\".\":\"punctuation_mistake\"},\"9\":{\"?\":\"punctuation_mistake_correction\"}}")
39
+ end
40
+
41
+ it 'Reports the mistakes' do
42
+ expect(@cc.mistakes).to eq({0 => {'position' => 0, 'error_type' => 'capitalization', 'mistake' => 'is', 'correction' => 'Is'}, 1 => {'position' => 3, 'error_type' => 'punctuation', 'mistake' => ',', 'correction' => ''}, 2 => {'position' => 4, 'error_type' => 'spelling', 'mistake' => 'puncttuation', 'correction' => 'punctuation'}, 3 => {'position' => 6, 'error_type' => 'unnecessary_word', 'mistake' => 'are', 'correction' => ''}, 4 => {'position' => 8, 'error_type' => 'punctuation', 'mistake' => '.', 'correction' => '?'}})
43
+ end
44
+
45
+ it 'Counts the number of mistakes' do
46
+ expect(@cc.number_of_mistakes).to eq(5)
47
+ end
48
+
49
+ it 'Reports the mistakes by mistake type' do
50
+ expect(@cc.mistake_report).to eq({'missing_word' => 0, 'unnecessary_word' => 1, 'spelling' => 1, 'verb' => 0, 'punctuation' => 2, 'word_order' => 0, 'capitalization' => 1, 'duplicate_word' => 0, 'word_choice' => 0, 'pluralization' => 0, 'possessive' => 0, 'stylistic_choice' => 0 })
51
+ end
52
+ end
53
+
54
+ context "example correction #003" do
55
+ before do
56
+ original_sentence = 'I need go shopping at this weekend.'
57
+ corrected_sentence = 'I need to go shopping this weekend.'
58
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
59
+ end
60
+
61
+ it 'Annotates the corrections' do
62
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"need", "type"=>"no_mistake"}, 2=>{"token"=>"to", "type"=>"missing_word_mistake"}, 3=>{"token"=>"go", "type"=>"no_mistake"}, 4=>{"token"=>"shopping", "type"=>"no_mistake"}, 5=>{"token"=>"at", "type"=>"unnecessary_word_mistake"}, 6=>{"token"=>"this", "type"=>"no_mistake"}, 7=>{"token"=>"weekend", "type"=>"no_mistake"}, 8=>{"token"=>".", "type"=>"no_mistake"}})
63
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"need\":\"no_mistake\"},\"2\":{\"to\":\"missing_word_mistake\"},\"3\":{\"go\":\"no_mistake\"},\"4\":{\"shopping\":\"no_mistake\"},\"5\":{\"at\":\"unnecessary_word_mistake\"},\"6\":{\"this\":\"no_mistake\"},\"7\":{\"weekend\":\"no_mistake\"},\"8\":{\".\":\"no_mistake\"}}")
64
+ end
65
+
66
+ it 'Counts the number of mistakes' do
67
+ expect(@cc.number_of_mistakes).to eq(2)
68
+ end
69
+
70
+ it 'Reports the mistakes by mistake type' do
71
+ expect(@cc.mistake_report).to eq({"missing_word"=>1, "unnecessary_word"=>1, "spelling"=>0, "verb"=>0, "punctuation"=>0, "word_order"=>0, "capitalization"=>0, "duplicate_word"=>0, "word_choice"=>0, "pluralization"=>0, "possessive"=>0, "stylistic_choice"=>0})
72
+ end
73
+ end
74
+
75
+ context "example correction #004" do
76
+ before do
77
+ original_sentence = 'I go trip last month.'
78
+ corrected_sentence = 'I went on a trip last month.'
79
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
80
+ end
81
+
82
+ it 'Annotates the corrections' do
83
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"go", "type"=>"verb_mistake"}, 2=>{"token"=>"went", "type"=>"verb_correction"}, 3=>{"token"=>"on", "type"=>"missing_word_mistake"}, 4=>{"token"=>"a", "type"=>"missing_word_mistake"}, 5=>{"token"=>"trip", "type"=>"no_mistake"}, 6=>{"token"=>"last", "type"=>"no_mistake"}, 7=>{"token"=>"month", "type"=>"no_mistake"}, 8=>{"token"=>".", "type"=>"no_mistake"}})
84
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"go\":\"verb_mistake\"},\"2\":{\"went\":\"verb_mistake_correction\"},\"3\":{\"on\":\"missing_word_mistake\"},\"4\":{\"a\":\"missing_word_mistake\"},\"5\":{\"trip\":\"no_mistake\"},\"6\":{\"last\":\"no_mistake\"},\"7\":{\"month\":\"no_mistake\"},\"8\":{\".\":\"no_mistake\"}}")
85
+ end
86
+
87
+ it 'Counts the number of mistakes' do
88
+ expect(@cc.number_of_mistakes).to eq(3)
89
+ end
90
+
91
+ it 'Reports the mistakes by mistake type' do
92
+ expect(@cc.mistake_report).to eq({"missing_word"=>2, "unnecessary_word"=>0, "spelling"=>0, "verb"=>1, "punctuation"=>0, "word_order"=>0, "capitalization"=>0, "duplicate_word"=>0, "word_choice"=>0, "pluralization"=>0, "possessive"=>0, "stylistic_choice"=>0})
93
+ end
94
+ end
95
+
96
+ context "example correction #005" do
97
+ before do
98
+ original_sentence = 'This is an exclamation.'
99
+ corrected_sentence = 'This is an exclamation!'
100
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
101
+ end
102
+
103
+ it 'Annotates the corrections' do
104
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"an", "type"=>"no_mistake"}, 3=>{"token"=>"exclamation", "type"=>"no_mistake"}, 4=>{"token"=>".", "type"=>"punctuation_mistake"}, 5=>{"token"=>"!", "type"=>"punctuation_correction"}})
105
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"an\":\"no_mistake\"},\"3\":{\"exclamation\":\"no_mistake\"},\"4\":{\".\":\"punctuation_mistake\"},\"5\":{\"!\":\"punctuation_mistake_correction\"}}")
106
+ end
107
+
108
+ it 'Counts the number of mistakes' do
109
+ expect(@cc.number_of_mistakes).to eq(1)
110
+ end
111
+
112
+ it 'Reports the mistakes by mistake type' do
113
+ expect(@cc.mistake_report).to eq({"missing_word"=>0, "unnecessary_word"=>0, "spelling"=>0, "verb"=>0, "punctuation"=>1, "word_order"=>0, "capitalization"=>0, "duplicate_word"=>0, "word_choice"=>0, "pluralization"=>0, "possessive"=>0, "stylistic_choice"=>0})
114
+ end
115
+ end
116
+
117
+ context "example correction #006" do
118
+ before do
119
+ original_sentence = 'what am i thinking!'
120
+ corrected_sentence = 'What was I thinking?'
121
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
122
+ end
123
+
124
+ it 'Annotates the corrections' do
125
+ expect(@cc.correct).to eq({0=>{"token"=>"what", "type"=>"capitalization_mistake"}, 1=>{"token"=>"What", "type"=>"capitalization_correction"}, 2=>{"token"=>"am", "type"=>"verb_mistake"}, 3=>{"token"=>"was", "type"=>"verb_correction"}, 4=>{"token"=>"i", "type"=>"capitalization_mistake"}, 5=>{"token"=>"I", "type"=>"capitalization_correction"}, 6=>{"token"=>"thinking", "type"=>"no_mistake"}, 7=>{"token"=>"!", "type"=>"punctuation_mistake"}, 8=>{"token"=>"?", "type"=>"punctuation_correction"}})
126
+ #expect(@cc.correct).to eq("{\"0\":{\"what\":\"capitalization_mistake\"},\"1\":{\"What\":\"capitalization_mistake_correction\"},\"2\":{\"am\":\"verb_mistake\"},\"3\":{\"was\":\"verb_mistake_correction\"},\"4\":{\"i\":\"capitalization_mistake\"},\"5\":{\"I\":\"capitalization_mistake_correction\"},\"6\":{\"thinking\":\"no_mistake\"},\"7\":{\"!\":\"punctuation_mistake\"},\"8\":{\"?\":\"punctuation_mistake_correction\"}}")
127
+ end
128
+
129
+ it 'Counts the number of mistakes' do
130
+ expect(@cc.number_of_mistakes).to eq(4)
131
+ end
132
+
133
+ it 'Reports the mistakes by mistake type' do
134
+ expect(@cc.mistake_report).to eq({"missing_word"=>0, "unnecessary_word"=>0, "spelling"=>0, "verb"=>1, "punctuation"=>1, "word_order"=>0, "capitalization"=>2, "duplicate_word"=>0, "word_choice"=>0, "pluralization"=>0, "possessive"=>0, "stylistic_choice"=>0})
135
+ end
136
+ end
137
+
138
+ context "example correction #007" do
139
+ before do
140
+ original_sentence = 'There arre lotts of misspeellings.'
141
+ corrected_sentence = 'There are a lot of misspellings.'
142
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
143
+ end
144
+
145
+ it 'Annotates the corrections' do
146
+ expect(@cc.correct).to eq({0=>{"token"=>"There", "type"=>"no_mistake"}, 1=>{"token"=>"arre", "type"=>"spelling_mistake"}, 2=>{"token"=>"are", "type"=>"spelling_correction"}, 3=>{"token"=>"a", "type"=>"missing_word_mistake"}, 4=>{"token"=>"lotts", "type"=>"spelling_mistake"}, 5=>{"token"=>"lot", "type"=>"spelling_correction"}, 6=>{"token"=>"of", "type"=>"no_mistake"}, 7=>{"token"=>"misspeellings", "type"=>"spelling_mistake"}, 8=>{"token"=>"misspellings", "type"=>"spelling_correction"}, 9=>{"token"=>".", "type"=>"no_mistake"}})
147
+ #expect(@cc.correct).to eq("{\"0\":{\"There\":\"no_mistake\"},\"1\":{\"arre\":\"spelling_mistake\"},\"2\":{\"are\":\"spelling_mistake_correction\"},\"3\":{\"a\":\"missing_word_mistake\"},\"4\":{\"lotts\":\"spelling_mistake\"},\"5\":{\"lot\":\"spelling_mistake_correction\"},\"6\":{\"of\":\"no_mistake\"},\"7\":{\"misspeellings\":\"spelling_mistake\"},\"8\":{\"misspellings\":\"spelling_mistake_correction\"},\"9\":{\".\":\"no_mistake\"}}")
148
+ end
149
+
150
+ # it 'Counts the number of mistakes' do
151
+ # expect(@cc.number_of_mistakes).to eq([])
152
+ # end
153
+
154
+ # it 'Reports the mistakes by mistake type' do
155
+ # expect(@cc.mistake_report).to eq([])
156
+ # end
157
+ end
158
+
159
+ context "example correction #008" do
160
+ before do
161
+ original_sentence = 'There arre lotts, off consecutiveee misspeellings!'
162
+ corrected_sentence = 'There are a lot of consecutive misspellings.'
163
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
164
+ end
165
+
166
+ it 'Annotates the corrections' do
167
+ expect(@cc.correct).to eq({0=>{"token"=>"There", "type"=>"no_mistake"}, 1=>{"token"=>"arre", "type"=>"spelling_mistake"}, 2=>{"token"=>"are", "type"=>"spelling_correction"}, 3=>{"token"=>"a", "type"=>"missing_word_mistake"}, 4=>{"token"=>"lotts", "type"=>"spelling_mistake"}, 5=>{"token"=>"lot", "type"=>"spelling_correction"}, 6=>{"token"=>",", "type"=>"punctuation_mistake"}, 7=>{"token"=>"off", "type"=>"spelling_mistake"}, 8=>{"token"=>"of", "type"=>"spelling_correction"}, 9=>{"token"=>"consecutiveee", "type"=>"spelling_mistake"}, 10=>{"token"=>"consecutive", "type"=>"spelling_correction"}, 11=>{"token"=>"misspeellings", "type"=>"spelling_mistake"}, 12=>{"token"=>"misspellings", "type"=>"spelling_correction"}, 13=>{"token"=>"!", "type"=>"punctuation_mistake"}, 14=>{"token"=>".", "type"=>"punctuation_correction"}})
168
+ #expect(@cc.correct).to eq("{\"0\":{\"There\":\"no_mistake\"},\"1\":{\"arre\":\"spelling_mistake\"},\"2\":{\"are\":\"spelling_mistake_correction\"},\"3\":{\"a\":\"missing_word_mistake\"},\"4\":{\"lotts\":\"spelling_mistake\"},\"5\":{\"lot\":\"spelling_mistake_correction\"},\"6\":{\",\":\"punctuation_mistake\"},\"7\":{\"off\":\"spelling_mistake\"},\"8\":{\"of\":\"spelling_mistake_correction\"},\"9\":{\"consecutiveee\":\"spelling_mistake\"},\"10\":{\"consecutive\":\"spelling_mistake_correction\"},\"11\":{\"misspeellings\":\"spelling_mistake\"},\"12\":{\"misspellings\":\"spelling_mistake_correction\"},\"13\":{\"!\":\"punctuation_mistake\"},\"14\":{\".\":\"punctuation_mistake_correction\"}}")
169
+ end
170
+
171
+ # it 'Counts the number of mistakes' do
172
+ # expect(@cc.number_of_mistakes).to eq([])
173
+ # end
174
+
175
+ # it 'Reports the mistakes by mistake type' do
176
+ # expect(@cc.mistake_report).to eq([])
177
+ # end
178
+ end
179
+
180
+ context "example correction #009" do
181
+ before do
182
+ original_sentence = 'This is a double double double word check.'
183
+ corrected_sentence = 'This is a double word check.'
184
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
185
+ end
186
+
187
+ it 'Annotates the corrections' do
188
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"a", "type"=>"no_mistake"}, 3=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 4=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 5=>{"token"=>"double", "type"=>"no_mistake"}, 6=>{"token"=>"word", "type"=>"no_mistake"}, 7=>{"token"=>"check", "type"=>"no_mistake"}, 8=>{"token"=>".", "type"=>"no_mistake"}})
189
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"a\":\"no_mistake\"},\"3\":{\"double\":\"duplicate_word_mistake\"},\"4\":{\"double\":\"duplicate_word_mistake\"},\"5\":{\"double\":\"no_mistake\"},\"6\":{\"word\":\"no_mistake\"},\"7\":{\"check\":\"no_mistake\"},\"8\":{\".\":\"no_mistake\"}}")
190
+ end
191
+
192
+ it 'Counts the number of mistakes' do
193
+ expect(@cc.number_of_mistakes).to eq(2)
194
+ end
195
+
196
+ it 'Reports the mistakes by mistake type' do
197
+ expect(@cc.mistake_report).to eq({"missing_word"=>0, "unnecessary_word"=>0, "spelling"=>0, "verb"=>0, "punctuation"=>0, "word_order"=>0, "capitalization"=>0, "duplicate_word"=>2, "word_choice"=>0, "pluralization"=>0, "possessive"=>0, "stylistic_choice"=>0})
198
+ end
199
+ end
200
+
201
+ context "example correction #010" do
202
+ before do
203
+ original_sentence = 'This is and this and this is a correct double word check!'
204
+ corrected_sentence = 'This is and this and this is a correct double word check.'
205
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
206
+ end
207
+
208
+ it 'Annotates the corrections' do
209
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"and", "type"=>"no_mistake"}, 3=>{"token"=>"this", "type"=>"no_mistake"}, 4=>{"token"=>"and", "type"=>"no_mistake"}, 5=>{"token"=>"this", "type"=>"no_mistake"}, 6=>{"token"=>"is", "type"=>"no_mistake"}, 7=>{"token"=>"a", "type"=>"no_mistake"}, 8=>{"token"=>"correct", "type"=>"no_mistake"}, 9=>{"token"=>"double", "type"=>"no_mistake"}, 10=>{"token"=>"word", "type"=>"no_mistake"}, 11=>{"token"=>"check", "type"=>"no_mistake"}, 12=>{"token"=>"!", "type"=>"punctuation_mistake"}, 13=>{"token"=>".", "type"=>"punctuation_correction"}})
210
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"and\":\"no_mistake\"},\"3\":{\"this\":\"no_mistake\"},\"4\":{\"and\":\"no_mistake\"},\"5\":{\"this\":\"no_mistake\"},\"6\":{\"is\":\"no_mistake\"},\"7\":{\"a\":\"no_mistake\"},\"8\":{\"correct\":\"no_mistake\"},\"9\":{\"double\":\"no_mistake\"},\"10\":{\"word\":\"no_mistake\"},\"11\":{\"check\":\"no_mistake\"},\"12\":{\"!\":\"punctuation_mistake\"},\"13\":{\".\":\"punctuation_mistake_correction\"}}")
211
+ end
212
+
213
+ # it 'Counts the number of mistakes' do
214
+ # expect(@cc.number_of_mistakes).to eq([])
215
+ # end
216
+
217
+ # it 'Reports the mistakes by mistake type' do
218
+ # expect(@cc.mistake_report).to eq([])
219
+ # end
220
+ end
221
+
222
+ context "example correction #011" do
223
+ before do
224
+ original_sentence = 'He said, "Shhe is a crazy girl".'
225
+ corrected_sentence = 'He said, "She is a crazy girl."'
226
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
227
+ end
228
+
229
+ it 'Annotates the corrections' do
230
+ expect(@cc.correct).to eq({0=>{"token"=>"He", "type"=>"no_mistake"}, 1=>{"token"=>"said", "type"=>"no_mistake"}, 2=>{"token"=>",", "type"=>"no_mistake"}, 3=>{"token"=>"\"", "type"=>"no_mistake"}, 4=>{"token"=>"Shhe", "type"=>"spelling_mistake"}, 5=>{"token"=>"She", "type"=>"spelling_correction"}, 6=>{"token"=>"is", "type"=>"no_mistake"}, 7=>{"token"=>"a", "type"=>"no_mistake"}, 8=>{"token"=>"crazy", "type"=>"no_mistake"}, 9=>{"token"=>"girl", "type"=>"no_mistake"}, 10=>{"token"=>".", "type"=>"word_order_mistake"}, 11=>{"token"=>"\"", "type"=>"word_order_mistake"}})
231
+ #expect(@cc.correct).to eq("{\"0\":{\"He\":\"no_mistake\"},\"1\":{\"said\":\"no_mistake\"},\"2\":{\",\":\"no_mistake\"},\"3\":{\"\"\":\"no_mistake\"},\"4\":{\"Shhe\":\"spelling_mistake\"},\"5\":{\"She\":\"spelling_mistake_correction\"},\"6\":{\"is\":\"no_mistake\"},\"7\":{\"a\":\"no_mistake\"},\"8\":{\"crazy\":\"no_mistake\"},\"9\":{\"girl\":\"no_mistake\"},\"10\":{\".\":\"word_order_mistake\"},\"11\":{\"\"\":\"word_order_mistake\"}}")
232
+ end
233
+
234
+ # it 'Counts the number of mistakes' do
235
+ # expect(@cc.number_of_mistakes).to eq([])
236
+ # end
237
+
238
+ # it 'Reports the mistakes by mistake type' do
239
+ # expect(@cc.mistake_report).to eq([])
240
+ # end
241
+ end
242
+
243
+ context "example correction #012" do
244
+ before do
245
+ original_sentence = 'Test the order word.'
246
+ corrected_sentence = 'Test the word order.'
247
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
248
+ end
249
+
250
+ it 'Annotates the corrections' do
251
+ expect(@cc.correct).to eq({0=>{"token"=>"Test", "type"=>"no_mistake"}, 1=>{"token"=>"the", "type"=>"no_mistake"}, 2=>{"token"=>"word", "type"=>"word_order_mistake"}, 3=>{"token"=>"order", "type"=>"word_order_mistake"}, 4=>{"token"=>".", "type"=>"no_mistake"}})
252
+ #expect(@cc.correct).to eq("{\"0\":{\"Test\":\"no_mistake\"},\"1\":{\"the\":\"no_mistake\"},\"2\":{\"word\":\"word_order_mistake\"},\"3\":{\"order\":\"word_order_mistake\"},\"4\":{\".\":\"no_mistake\"}}")
253
+ end
254
+
255
+ # it 'Counts the number of mistakes' do
256
+ # expect(@cc.number_of_mistakes).to eq([])
257
+ # end
258
+
259
+ # it 'Reports the mistakes by mistake type' do
260
+ # expect(@cc.mistake_report).to eq([])
261
+ # end
262
+ end
263
+
264
+ context "example correction #013" do
265
+ before do
266
+ original_sentence = 'This is a double double double double word check.'
267
+ corrected_sentence = 'This is a double word check.'
268
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
269
+ end
270
+
271
+ it 'Annotates the corrections' do
272
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"a", "type"=>"no_mistake"}, 3=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 4=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 5=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 6=>{"token"=>"double", "type"=>"no_mistake"}, 7=>{"token"=>"word", "type"=>"no_mistake"}, 8=>{"token"=>"check", "type"=>"no_mistake"}, 9=>{"token"=>".", "type"=>"no_mistake"}})
273
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"a\":\"no_mistake\"},\"3\":{\"double\":\"duplicate_word_mistake\"},\"4\":{\"double\":\"duplicate_word_mistake\"},\"5\":{\"double\":\"duplicate_word_mistake\"},\"6\":{\"double\":\"no_mistake\"},\"7\":{\"word\":\"no_mistake\"},\"8\":{\"check\":\"no_mistake\"},\"9\":{\".\":\"no_mistake\"}}")
274
+ end
275
+
276
+ # it 'Counts the number of mistakes' do
277
+ # expect(@cc.number_of_mistakes).to eq([])
278
+ # end
279
+
280
+ # it 'Reports the mistakes by mistake type' do
281
+ # expect(@cc.mistake_report).to eq([])
282
+ # end
283
+ end
284
+
285
+ context "example correction #014" do
286
+ before do
287
+ original_sentence = 'I call my mom tomorrow.'
288
+ corrected_sentence = 'I will call my mom tomorrow.'
289
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
290
+ end
291
+
292
+ it 'Annotates the corrections' do
293
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"call", "type"=>"verb_mistake"}, 2=>{"token"=>"will call", "type"=>"verb_correction"}, 3=>{"token"=>"my", "type"=>"no_mistake"}, 4=>{"token"=>"mom", "type"=>"no_mistake"}, 5=>{"token"=>"tomorrow", "type"=>"no_mistake"}, 6=>{"token"=>".", "type"=>"no_mistake"}})
294
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"call\":\"verb_mistake\"},\"2\":{\"will call\":\"verb_mistake_correction\"},\"3\":{\"my\":\"no_mistake\"},\"4\":{\"mom\":\"no_mistake\"},\"5\":{\"tomorrow\":\"no_mistake\"},\"6\":{\".\":\"no_mistake\"}}")
295
+ end
296
+
297
+ # it 'Counts the number of mistakes' do
298
+ # expect(@cc.number_of_mistakes).to eq([])
299
+ # end
300
+
301
+ # it 'Reports the mistakes by mistake type' do
302
+ # expect(@cc.mistake_report).to eq([])
303
+ # end
304
+ end
305
+
306
+ context "example correction #015" do
307
+ before do
308
+ original_sentence = 'I flied home yesterday.'
309
+ corrected_sentence = 'I flew home yesterday.'
310
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
311
+ end
312
+
313
+ it 'Annotates the corrections' do
314
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"flied", "type"=>"verb_mistake"}, 2=>{"token"=>"flew", "type"=>"verb_correction"}, 3=>{"token"=>"home", "type"=>"no_mistake"}, 4=>{"token"=>"yesterday", "type"=>"no_mistake"}, 5=>{"token"=>".", "type"=>"no_mistake"}})
315
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"flied\":\"verb_mistake\"},\"2\":{\"flew\":\"verb_mistake_correction\"},\"3\":{\"home\":\"no_mistake\"},\"4\":{\"yesterday\":\"no_mistake\"},\"5\":{\".\":\"no_mistake\"}}")
316
+ end
317
+
318
+ # it 'Counts the number of mistakes' do
319
+ # expect(@cc.number_of_mistakes).to eq([])
320
+ # end
321
+
322
+ # it 'Reports the mistakes by mistake type' do
323
+ # expect(@cc.mistake_report).to eq([])
324
+ # end
325
+ end
326
+
327
+ context "example correction #016" do
328
+ before do
329
+ original_sentence = "This shouldn't be use to test contractions, but couln't it?"
330
+ corrected_sentence = "This shouldn't be used to test contractions, but couldn't it?"
331
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
332
+ end
333
+
334
+ it 'Annotates the corrections' do
335
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"shouldn't", "type"=>"no_mistake"}, 2=>{"token"=>"be", "type"=>"no_mistake"}, 3=>{"token"=>"use", "type"=>"verb_mistake"}, 4=>{"token"=>"used", "type"=>"verb_correction"}, 5=>{"token"=>"to", "type"=>"no_mistake"}, 6=>{"token"=>"test", "type"=>"no_mistake"}, 7=>{"token"=>"contractions", "type"=>"no_mistake"}, 8=>{"token"=>",", "type"=>"no_mistake"}, 9=>{"token"=>"but", "type"=>"no_mistake"}, 10=>{"token"=>"couln't", "type"=>"spelling_mistake"}, 11=>{"token"=>"couldn't", "type"=>"spelling_correction"}, 12=>{"token"=>"it", "type"=>"no_mistake"}, 13=>{"token"=>"?", "type"=>"no_mistake"}})
336
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"shouldn't\":\"no_mistake\"},\"2\":{\"be\":\"no_mistake\"},\"3\":{\"use\":\"verb_mistake\"},\"4\":{\"used\":\"verb_mistake_correction\"},\"5\":{\"to\":\"no_mistake\"},\"6\":{\"test\":\"no_mistake\"},\"7\":{\"contractions\":\"no_mistake\"},\"8\":{\",\":\"no_mistake\"},\"9\":{\"but\":\"no_mistake\"},\"10\":{\"couln't\":\"spelling_mistake\"},\"11\":{\"couldn't\":\"spelling_mistake_correction\"},\"12\":{\"it\":\"no_mistake\"},\"13\":{\"?\":\"no_mistake\"}}")
337
+ end
338
+
339
+ # it 'Counts the number of mistakes' do
340
+ # expect(@cc.number_of_mistakes).to eq([])
341
+ # end
342
+
343
+ # it 'Reports the mistakes by mistake type' do
344
+ # expect(@cc.mistake_report).to eq([])
345
+ # end
346
+ end
347
+
348
+ context "example correction #017" do
349
+ before do
350
+ original_sentence = "This is to test, 'single quotes'."
351
+ corrected_sentence = "This is to test, 'Single quotes.'"
352
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
353
+ end
354
+
355
+ it 'Annotates the corrections' do
356
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"to", "type"=>"no_mistake"}, 3=>{"token"=>"test", "type"=>"no_mistake"}, 4=>{"token"=>",", "type"=>"no_mistake"}, 5=>{"token"=>"'", "type"=>"no_mistake"}, 6=>{"token"=>"single", "type"=>"capitalization_mistake"}, 7=>{"token"=>"Single", "type"=>"capitalization_correction"}, 8=>{"token"=>"quotes", "type"=>"no_mistake"}, 9=>{"token"=>".", "type"=>"word_order_mistake"}, 10=>{"token"=>"'", "type"=>"word_order_mistake"}})
357
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"to\":\"no_mistake\"},\"3\":{\"test\":\"no_mistake\"},\"4\":{\",\":\"no_mistake\"},\"5\":{\"'\":\"no_mistake\"},\"6\":{\"single\":\"capitalization_mistake\"},\"7\":{\"Single\":\"capitalization_mistake_correction\"},\"8\":{\"quotes\":\"no_mistake\"},\"9\":{\".\":\"word_order_mistake\"},\"10\":{\"'\":\"word_order_mistake\"}}")
358
+ end
359
+
360
+ # it 'Counts the number of mistakes' do
361
+ # expect(@cc.number_of_mistakes).to eq([])
362
+ # end
363
+
364
+ # it 'Reports the mistakes by mistake type' do
365
+ # expect(@cc.mistake_report).to eq([])
366
+ # end
367
+ end
368
+
369
+ context "example correction #018" do
370
+ before do
371
+ original_sentence = 'This is to test quotations "again"'
372
+ corrected_sentence = 'This is to test quotations again'
373
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
374
+ end
375
+
376
+ it 'Annotates the corrections' do
377
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"to", "type"=>"no_mistake"}, 3=>{"token"=>"test", "type"=>"no_mistake"}, 4=>{"token"=>"quotations", "type"=>"no_mistake"}, 5=>{"token"=>"\"", "type"=>"punctuation_mistake"}, 6=>{"token"=>"again", "type"=>"no_mistake"}, 7=>{"token"=>"\"", "type"=>"punctuation_mistake"}})
378
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"to\":\"no_mistake\"},\"3\":{\"test\":\"no_mistake\"},\"4\":{\"quotations\":\"no_mistake\"},\"5\":{\"\"\":\"punctuation_mistake\"},\"6\":{\"again\":\"no_mistake\"},\"7\":{\"\"\":\"punctuation_mistake\"}}")
379
+ end
380
+
381
+ # it 'Counts the number of mistakes' do
382
+ # expect(@cc.number_of_mistakes).to eq([])
383
+ # end
384
+
385
+ # it 'Reports the mistakes by mistake type' do
386
+ # expect(@cc.mistake_report).to eq([])
387
+ # end
388
+ end
389
+
390
+ context "example correction #019" do
391
+ before do
392
+ original_sentence = 'I will call my mom yesterday.'
393
+ corrected_sentence = 'I called my mom yesterday.'
394
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
395
+ end
396
+
397
+ it 'Annotates the corrections' do
398
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"will call", "type"=>"verb_mistake"}, 2=>{"token"=>"called", "type"=>"verb_correction"}, 3=>{"token"=>"my", "type"=>"no_mistake"}, 4=>{"token"=>"mom", "type"=>"no_mistake"}, 5=>{"token"=>"yesterday", "type"=>"no_mistake"}, 6=>{"token"=>".", "type"=>"no_mistake"}})
399
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"will call\":\"verb_mistake\"},\"2\":{\"called\":\"verb_mistake_correction\"},\"3\":{\"my\":\"no_mistake\"},\"4\":{\"mom\":\"no_mistake\"},\"5\":{\"yesterday\":\"no_mistake\"},\"6\":{\".\":\"no_mistake\"}}")
400
+ end
401
+
402
+ # it 'Counts the number of mistakes' do
403
+ # expect(@cc.number_of_mistakes).to eq([])
404
+ # end
405
+
406
+ # it 'Reports the mistakes by mistake type' do
407
+ # expect(@cc.mistake_report).to eq([])
408
+ # end
409
+ end
410
+
411
+ context "example correction #020" do
412
+ before do
413
+ original_sentence = 'Test run the order word with anotther mistake.'
414
+ corrected_sentence = 'Test the word order with another simple mistake.'
415
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
416
+ end
417
+
418
+ it 'Annotates the corrections' do
419
+ expect(@cc.correct).to eq({0=>{"token"=>"Test", "type"=>"no_mistake"}, 1=>{"token"=>"run", "type"=>"unnecessary_word_mistake"}, 2=>{"token"=>"the", "type"=>"no_mistake"}, 3=>{"token"=>"word", "type"=>"word_order_mistake"}, 4=>{"token"=>"order", "type"=>"word_order_mistake"}, 5=>{"token"=>"with", "type"=>"no_mistake"}, 6=>{"token"=>"anotther", "type"=>"spelling_mistake"}, 7=>{"token"=>"another", "type"=>"spelling_correction"}, 8=>{"token"=>"simple", "type"=>"missing_word_mistake"}, 9=>{"token"=>"mistake", "type"=>"no_mistake"}, 10=>{"token"=>".", "type"=>"no_mistake"}})
420
+ #expect(@cc.correct).to eq("{\"0\":{\"Test\":\"no_mistake\"},\"1\":{\"run\":\"unnecessary_word_mistake\"},\"2\":{\"the\":\"no_mistake\"},\"3\":{\"word\":\"word_order_mistake\"},\"4\":{\"order\":\"word_order_mistake\"},\"5\":{\"with\":\"no_mistake\"},\"6\":{\"anotther\":\"spelling_mistake\"},\"7\":{\"another\":\"spelling_mistake_correction\"},\"8\":{\"simple\":\"missing_word_mistake\"},\"9\":{\"mistake\":\"no_mistake\"},\"10\":{\".\":\"no_mistake\"}}")
421
+ end
422
+
423
+ # it 'Counts the number of mistakes' do
424
+ # expect(@cc.number_of_mistakes).to eq([])
425
+ # end
426
+
427
+ # it 'Reports the mistakes by mistake type' do
428
+ # expect(@cc.mistake_report).to eq([])
429
+ # end
430
+ end
431
+
432
+ context "example correction #021" do
433
+ before do
434
+ original_sentence = 'This is to test quotations "again".'
435
+ corrected_sentence = 'This is to test quotations again.'
436
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
437
+ end
438
+
439
+ it 'Annotates the corrections' do
440
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"to", "type"=>"no_mistake"}, 3=>{"token"=>"test", "type"=>"no_mistake"}, 4=>{"token"=>"quotations", "type"=>"no_mistake"}, 5=>{"token"=>"\"", "type"=>"punctuation_mistake"}, 6=>{"token"=>"again", "type"=>"no_mistake"}, 7=>{"token"=>"\"", "type"=>"punctuation_mistake"}, 8=>{"token"=>".", "type"=>"no_mistake"}})
441
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"to\":\"no_mistake\"},\"3\":{\"test\":\"no_mistake\"},\"4\":{\"quotations\":\"no_mistake\"},\"5\":{\"\"\":\"punctuation_mistake\"},\"6\":{\"again\":\"no_mistake\"},\"7\":{\"\"\":\"punctuation_mistake\"},\"8\":{\".\":\"no_mistake\"}}")
442
+ end
443
+
444
+ # it 'Counts the number of mistakes' do
445
+ # expect(@cc.number_of_mistakes).to eq([])
446
+ # end
447
+
448
+ # it 'Reports the mistakes by mistake type' do
449
+ # expect(@cc.mistake_report).to eq([])
450
+ # end
451
+ end
452
+
453
+ context "example correction #022" do
454
+ before do
455
+ original_sentence = 'This is to test quotations "again"'
456
+ corrected_sentence = 'This is to test quotations again.'
457
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
458
+ end
459
+
460
+ it 'Annotates the corrections' do
461
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"to", "type"=>"no_mistake"}, 3=>{"token"=>"test", "type"=>"no_mistake"}, 4=>{"token"=>"quotations", "type"=>"no_mistake"}, 5=>{"token"=>"\"", "type"=>"punctuation_mistake"}, 6=>{"token"=>"again", "type"=>"no_mistake"}, 7=>{"token"=>"\"", "type"=>"punctuation_mistake"}, 8=>{"token"=>".", "type"=>"punctuation_correction"}})
462
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"to\":\"no_mistake\"},\"3\":{\"test\":\"no_mistake\"},\"4\":{\"quotations\":\"no_mistake\"},\"5\":{\"\"\":\"punctuation_mistake\"},\"6\":{\"again\":\"no_mistake\"},\"7\":{\"\"\":\"punctuation_mistake\"},\"8\":{\".\":\"punctuation_mistake_correction\"}}")
463
+ end
464
+
465
+ # it 'Counts the number of mistakes' do
466
+ # expect(@cc.number_of_mistakes).to eq([])
467
+ # end
468
+
469
+ # it 'Reports the mistakes by mistake type' do
470
+ # expect(@cc.mistake_report).to eq([])
471
+ # end
472
+ end
473
+
474
+ context "example correction #023" do
475
+ before do
476
+ original_sentence = "He didn't realize that he should had changed the locks."
477
+ corrected_sentence = "He hadn't realized that he should have changed the locks."
478
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
479
+ end
480
+
481
+ it 'Annotates the corrections' do
482
+ expect(@cc.correct).to eq({0=>{"token"=>"He", "type"=>"no_mistake"}, 1=>{"token"=>"didn't realize", "type"=>"verb_mistake"}, 2=>{"token"=>"hadn't realized", "type"=>"verb_correction"}, 3=>{"token"=>"that", "type"=>"no_mistake"}, 4=>{"token"=>"he", "type"=>"no_mistake"}, 5=>{"token"=>"should", "type"=>"no_mistake"}, 6=>{"token"=>"had changed", "type"=>"verb_mistake"}, 7=>{"token"=>"have changed", "type"=>"verb_correction"}, 8=>{"token"=>"the", "type"=>"no_mistake"}, 9=>{"token"=>"locks", "type"=>"no_mistake"}, 10=>{"token"=>".", "type"=>"no_mistake"}})
483
+ #expect(@cc.correct).to eq("{\"0\":{\"He\":\"no_mistake\"},\"1\":{\"didn't realize\":\"verb_mistake\"},\"2\":{\"hadn't realized\":\"verb_mistake_correction\"},\"3\":{\"that\":\"no_mistake\"},\"4\":{\"he\":\"no_mistake\"},\"5\":{\"should\":\"no_mistake\"},\"6\":{\"had changed\":\"verb_mistake\"},\"7\":{\"have changed\":\"verb_mistake_correction\"},\"8\":{\"the\":\"no_mistake\"},\"9\":{\"locks\":\"no_mistake\"},\"10\":{\".\":\"no_mistake\"}}")
484
+ end
485
+
486
+ # it 'Counts the number of mistakes' do
487
+ # expect(@cc.number_of_mistakes).to eq([])
488
+ # end
489
+
490
+ # it 'Reports the mistakes by mistake type' do
491
+ # expect(@cc.mistake_report).to eq([])
492
+ # end
493
+ end
494
+
495
+ context "example correction #024" do
496
+ before do
497
+ original_sentence = 'I will call my mom yesterday if I had time.'
498
+ corrected_sentence = 'I would have called my mom yesterday if I had had time.'
499
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
500
+ end
501
+
502
+ it 'Annotates the corrections' do
503
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"will call", "type"=>"verb_mistake"}, 2=>{"token"=>"would have called", "type"=>"verb_correction"}, 3=>{"token"=>"my", "type"=>"no_mistake"}, 4=>{"token"=>"mom", "type"=>"no_mistake"}, 5=>{"token"=>"yesterday", "type"=>"no_mistake"}, 6=>{"token"=>"if", "type"=>"no_mistake"}, 7=>{"token"=>"I", "type"=>"no_mistake"}, 8=>{"token"=>"had", "type"=>"no_mistake"}, 9=>{"token"=>"had", "type"=>"missing_word_mistake"}, 10=>{"token"=>"time", "type"=>"no_mistake"}, 11=>{"token"=>".", "type"=>"no_mistake"}})
504
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"will call\":\"verb_mistake\"},\"2\":{\"would have called\":\"verb_mistake_correction\"},\"3\":{\"my\":\"no_mistake\"},\"4\":{\"mom\":\"no_mistake\"},\"5\":{\"yesterday\":\"no_mistake\"},\"6\":{\"if\":\"no_mistake\"},\"7\":{\"I\":\"no_mistake\"},\"8\":{\"had\":\"no_mistake\"},\"9\":{\"had\":\"missing_word_mistake\"},\"10\":{\"time\":\"no_mistake\"},\"11\":{\".\":\"no_mistake\"}}")
505
+ end
506
+
507
+ # it 'Counts the number of mistakes' do
508
+ # expect(@cc.number_of_mistakes).to eq([])
509
+ # end
510
+
511
+ # it 'Reports the mistakes by mistake type' do
512
+ # expect(@cc.mistake_report).to eq([])
513
+ # end
514
+ end
515
+
516
+ context "example correction #025" do
517
+ before do
518
+ original_sentence = 'I call my mom yesterday.'
519
+ corrected_sentence = 'I would have called my mom yesterday.'
520
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
521
+ end
522
+
523
+ it 'Annotates the corrections' do
524
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"call", "type"=>"verb_mistake"}, 2=>{"token"=>"would have called", "type"=>"verb_correction"}, 3=>{"token"=>"my", "type"=>"no_mistake"}, 4=>{"token"=>"mom", "type"=>"no_mistake"}, 5=>{"token"=>"yesterday", "type"=>"no_mistake"}, 6=>{"token"=>".", "type"=>"no_mistake"}})
525
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"call\":\"verb_mistake\"},\"2\":{\"would have called\":\"verb_mistake_correction\"},\"3\":{\"my\":\"no_mistake\"},\"4\":{\"mom\":\"no_mistake\"},\"5\":{\"yesterday\":\"no_mistake\"},\"6\":{\".\":\"no_mistake\"}}")
526
+ end
527
+
528
+ # it 'Counts the number of mistakes' do
529
+ # expect(@cc.number_of_mistakes).to eq([])
530
+ # end
531
+
532
+ # it 'Reports the mistakes by mistake type' do
533
+ # expect(@cc.mistake_report).to eq([])
534
+ # end
535
+ end
536
+
537
+ context "example correction #026" do
538
+ before do
539
+ original_sentence = 'I singed at the karaoke bar.'
540
+ corrected_sentence = 'I sang at the karaoke bar.'
541
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
542
+ end
543
+
544
+ it 'Annotates the corrections' do
545
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"singed", "type"=>"verb_mistake"}, 2=>{"token"=>"sang", "type"=>"verb_correction"}, 3=>{"token"=>"at", "type"=>"no_mistake"}, 4=>{"token"=>"the", "type"=>"no_mistake"}, 5=>{"token"=>"karaoke", "type"=>"no_mistake"}, 6=>{"token"=>"bar", "type"=>"no_mistake"}, 7=>{"token"=>".", "type"=>"no_mistake"}})
546
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"singed\":\"verb_mistake\"},\"2\":{\"sang\":\"verb_mistake_correction\"},\"3\":{\"at\":\"no_mistake\"},\"4\":{\"the\":\"no_mistake\"},\"5\":{\"karaoke\":\"no_mistake\"},\"6\":{\"bar\":\"no_mistake\"},\"7\":{\".\":\"no_mistake\"}}")
547
+ end
548
+
549
+ # it 'Counts the number of mistakes' do
550
+ # expect(@cc.number_of_mistakes).to eq([])
551
+ # end
552
+
553
+ # it 'Reports the mistakes by mistake type' do
554
+ # expect(@cc.mistake_report).to eq([])
555
+ # end
556
+ end
557
+
558
+ context "example correction #027" do
559
+ before do
560
+ original_sentence = 'I flied to California and go to zoo.'
561
+ corrected_sentence = 'I flew to California and went to the zoo.'
562
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
563
+ end
564
+
565
+ it 'Annotates the corrections' do
566
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"flied", "type"=>"verb_mistake"}, 2=>{"token"=>"flew", "type"=>"verb_correction"}, 3=>{"token"=>"to", "type"=>"no_mistake"}, 4=>{"token"=>"California", "type"=>"no_mistake"}, 5=>{"token"=>"and", "type"=>"no_mistake"}, 6=>{"token"=>"go", "type"=>"verb_mistake"}, 7=>{"token"=>"went", "type"=>"verb_correction"}, 8=>{"token"=>"to", "type"=>"no_mistake"}, 9=>{"token"=>"the", "type"=>"missing_word_mistake"}, 10=>{"token"=>"zoo", "type"=>"no_mistake"}, 11=>{"token"=>".", "type"=>"no_mistake"}})
567
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"flied\":\"verb_mistake\"},\"2\":{\"flew\":\"verb_mistake_correction\"},\"3\":{\"to\":\"no_mistake\"},\"4\":{\"California\":\"no_mistake\"},\"5\":{\"and\":\"no_mistake\"},\"6\":{\"go\":\"verb_mistake\"},\"7\":{\"went\":\"verb_mistake_correction\"},\"8\":{\"to\":\"no_mistake\"},\"9\":{\"the\":\"missing_word_mistake\"},\"10\":{\"zoo\":\"no_mistake\"},\"11\":{\".\":\"no_mistake\"}}")
568
+ end
569
+
570
+ # it 'Counts the number of mistakes' do
571
+ # expect(@cc.number_of_mistakes).to eq([])
572
+ # end
573
+
574
+ # it 'Reports the mistakes by mistake type' do
575
+ # expect(@cc.mistake_report).to eq([])
576
+ # end
577
+ end
578
+
579
+ context "example correction #028" do
580
+ before do
581
+ original_sentence = 'This is a double double double double double word check.'
582
+ corrected_sentence = 'This is a double word check.'
583
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
584
+ end
585
+
586
+ it 'Annotates the corrections' do
587
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"a", "type"=>"no_mistake"}, 3=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 4=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 5=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 6=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 7=>{"token"=>"double", "type"=>"no_mistake"}, 8=>{"token"=>"word", "type"=>"no_mistake"}, 9=>{"token"=>"check", "type"=>"no_mistake"}, 10=>{"token"=>".", "type"=>"no_mistake"}})
588
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"a\":\"no_mistake\"},\"3\":{\"double\":\"duplicate_word_mistake\"},\"4\":{\"double\":\"duplicate_word_mistake\"},\"5\":{\"double\":\"duplicate_word_mistake\"},\"6\":{\"double\":\"duplicate_word_mistake\"},\"7\":{\"double\":\"no_mistake\"},\"8\":{\"word\":\"no_mistake\"},\"9\":{\"check\":\"no_mistake\"},\"10\":{\".\":\"no_mistake\"}}")
589
+ end
590
+
591
+ # it 'Counts the number of mistakes' do
592
+ # expect(@cc.number_of_mistakes).to eq([])
593
+ # end
594
+
595
+ # it 'Reports the mistakes by mistake type' do
596
+ # expect(@cc.mistake_report).to eq([])
597
+ # end
598
+ end
599
+
600
+ context "example correction #029" do
601
+ before do
602
+ original_sentence = 'This is a double double double double double double word check.'
603
+ corrected_sentence = 'This is a double word check.'
604
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
605
+ end
606
+
607
+ it 'Annotates the corrections' do
608
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"a", "type"=>"no_mistake"}, 3=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 4=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 5=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 6=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 7=>{"token"=>"double", "type"=>"duplicate_word_mistake"}, 8=>{"token"=>"double", "type"=>"no_mistake"}, 9=>{"token"=>"word", "type"=>"no_mistake"}, 10=>{"token"=>"check", "type"=>"no_mistake"}, 11=>{"token"=>".", "type"=>"no_mistake"}})
609
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"a\":\"no_mistake\"},\"3\":{\"double\":\"duplicate_word_mistake\"},\"4\":{\"double\":\"duplicate_word_mistake\"},\"5\":{\"double\":\"duplicate_word_mistake\"},\"6\":{\"double\":\"duplicate_word_mistake\"},\"7\":{\"double\":\"duplicate_word_mistake\"},\"8\":{\"double\":\"no_mistake\"},\"9\":{\"word\":\"no_mistake\"},\"10\":{\"check\":\"no_mistake\"},\"11\":{\".\":\"no_mistake\"}}")
610
+ end
611
+
612
+ # it 'Counts the number of mistakes' do
613
+ # expect(@cc.number_of_mistakes).to eq([])
614
+ # end
615
+
616
+ # it 'Reports the mistakes by mistake type' do
617
+ # expect(@cc.mistake_report).to eq([])
618
+ # end
619
+ end
620
+
621
+ context "example correction #030" do
622
+ before do
623
+ original_sentence = 'If my school were located in Tokyo, situation would have quite changed.'
624
+ corrected_sentence = 'If my school were located in Tokyo, the situation would have been quite different.'
625
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
626
+ end
627
+
628
+ it 'Annotates the corrections' do
629
+ expect(@cc.correct).to eq({0=>{"token"=>"If", "type"=>"no_mistake"}, 1=>{"token"=>"my", "type"=>"no_mistake"}, 2=>{"token"=>"school", "type"=>"no_mistake"}, 3=>{"token"=>"were located", "type"=>"no_mistake"}, 4=>{"token"=>"in", "type"=>"no_mistake"}, 5=>{"token"=>"Tokyo", "type"=>"no_mistake"}, 6=>{"token"=>",", "type"=>"no_mistake"}, 7=>{"token"=>"the", "type"=>"missing_word_mistake"}, 8=>{"token"=>"situation", "type"=>"no_mistake"}, 9=>{"token"=>"would have", "type"=>"verb_mistake"}, 10=>{"token"=>"would have been", "type"=>"verb_correction"}, 11=>{"token"=>"quite", "type"=>"no_mistake"}, 12=>{"token"=>"changed", "type"=>"word_choice_mistake"}, 13=>{"token"=>"different", "type"=>"word_choice_correction"}, 14=>{"token"=>".", "type"=>"no_mistake"}})
630
+ #expect(@cc.correct).to eq("{\"0\":{\"If\":\"no_mistake\"},\"1\":{\"my\":\"no_mistake\"},\"2\":{\"school\":\"no_mistake\"},\"3\":{\"were located\":\"no_mistake\"},\"4\":{\"in\":\"no_mistake\"},\"5\":{\"Tokyo\":\"no_mistake\"},\"6\":{\",\":\"no_mistake\"},\"7\":{\"the\":\"missing_word_mistake\"},\"8\":{\"situation\":\"no_mistake\"},\"9\":{\"would have\":\"verb_mistake\"},\"10\":{\"would have been\":\"verb_mistake_correction\"},\"11\":{\"quite\":\"no_mistake\"},\"12\":{\"changed\":\"word_choice_mistake\"},\"13\":{\"different\":\"word_choice_mistake_correction\"},\"14\":{\".\":\"no_mistake\"}}")
631
+ end
632
+
633
+ # it 'Counts the number of mistakes' do
634
+ # expect(@cc.number_of_mistakes).to eq([])
635
+ # end
636
+
637
+ # it 'Reports the mistakes by mistake type' do
638
+ # expect(@cc.mistake_report).to eq([])
639
+ # end
640
+ end
641
+
642
+ context "example correction #031" do
643
+ before do
644
+ original_sentence = 'However, I think a success in life comes from careful planning when it is a usual situation.'
645
+ corrected_sentence = 'However, under normal circumstances, I think success in life comes from careful planning.'
646
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
647
+ end
648
+
649
+ it 'Annotates the corrections' do
650
+ expect(@cc.correct).to eq({0=>{"token"=>"However", "type"=>"no_mistake"}, 1=>{"token"=>",", "type"=>"no_mistake"}, 2=>{"token"=>"under", "type"=>"missing_word_mistake"}, 3=>{"token"=>"normal", "type"=>"missing_word_mistake"}, 4=>{"token"=>"circumstances", "type"=>"missing_word_mistake"}, 5=>{"token"=>",", "type"=>"punctuation_mistake"}, 6=>{"token"=>"I", "type"=>"no_mistake"}, 7=>{"token"=>"think", "type"=>"no_mistake"}, 8=>{"token"=>"a", "type"=>"unnecessary_word_mistake"}, 9=>{"token"=>"success", "type"=>"no_mistake"}, 10=>{"token"=>"in", "type"=>"no_mistake"}, 11=>{"token"=>"life", "type"=>"no_mistake"}, 12=>{"token"=>"comes", "type"=>"no_mistake"}, 13=>{"token"=>"from", "type"=>"no_mistake"}, 14=>{"token"=>"careful", "type"=>"no_mistake"}, 15=>{"token"=>"planning", "type"=>"no_mistake"}, 16=>{"token"=>"when", "type"=>"unnecessary_word_mistake"}, 17=>{"token"=>"it", "type"=>"unnecessary_word_mistake"}, 18=>{"token"=>"is", "type"=>"unnecessary_word_mistake"}, 19=>{"token"=>"a", "type"=>"unnecessary_word_mistake"}, 20=>{"token"=>"usual", "type"=>"unnecessary_word_mistake"}, 21=>{"token"=>"situation", "type"=>"unnecessary_word_mistake"}, 22=>{"token"=>".", "type"=>"no_mistake"}})
651
+ #expect(@cc.correct).to eq("{\"0\":{\"However\":\"no_mistake\"},\"1\":{\",\":\"no_mistake\"},\"2\":{\"under\":\"missing_word_mistake\"},\"3\":{\"normal\":\"missing_word_mistake\"},\"4\":{\"circumstances\":\"missing_word_mistake\"},\"5\":{\",\":\"punctuation_mistake\"},\"6\":{\"I\":\"no_mistake\"},\"7\":{\"think\":\"no_mistake\"},\"8\":{\"a\":\"unnecessary_word_mistake\"},\"9\":{\"success\":\"no_mistake\"},\"10\":{\"in\":\"no_mistake\"},\"11\":{\"life\":\"no_mistake\"},\"12\":{\"comes\":\"no_mistake\"},\"13\":{\"from\":\"no_mistake\"},\"14\":{\"careful\":\"no_mistake\"},\"15\":{\"planning\":\"no_mistake\"},\"16\":{\"when\":\"unnecessary_word_mistake\"},\"17\":{\"it\":\"unnecessary_word_mistake\"},\"18\":{\"is\":\"unnecessary_word_mistake\"},\"19\":{\"a\":\"unnecessary_word_mistake\"},\"20\":{\"usual\":\"unnecessary_word_mistake\"},\"21\":{\"situation\":\"unnecessary_word_mistake\"},\"22\":{\".\":\"no_mistake\"}}")
652
+ end
653
+
654
+ # it 'Counts the number of mistakes' do
655
+ # expect(@cc.number_of_mistakes).to eq([])
656
+ # end
657
+
658
+ # it 'Reports the mistakes by mistake type' do
659
+ # expect(@cc.mistake_report).to eq([])
660
+ # end
661
+ end
662
+
663
+ context "example correction #032" do
664
+ before do
665
+ original_sentence = 'He is super rad.'
666
+ corrected_sentence = 'He is super cool!'
667
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
668
+ end
669
+
670
+ it 'Annotates the corrections' do
671
+ expect(@cc.correct).to eq({0=>{"token"=>"He", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"super", "type"=>"no_mistake"}, 3=>{"token"=>"rad", "type"=>"word_choice_mistake"}, 4=>{"token"=>"cool", "type"=>"word_choice_correction"}, 5=>{"token"=>".", "type"=>"punctuation_mistake"}, 6=>{"token"=>"!", "type"=>"punctuation_correction"}})
672
+ #expect(@cc.correct).to eq("{\"0\":{\"He\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"super\":\"no_mistake\"},\"3\":{\"rad\":\"word_choice_mistake\"},\"4\":{\"cool\":\"word_choice_mistake_correction\"},\"5\":{\".\":\"punctuation_mistake\"},\"6\":{\"!\":\"punctuation_mistake_correction\"}}")
673
+ end
674
+
675
+ # it 'Counts the number of mistakes' do
676
+ # expect(@cc.number_of_mistakes).to eq([])
677
+ # end
678
+
679
+ # it 'Reports the mistakes by mistake type' do
680
+ # expect(@cc.mistake_report).to eq([])
681
+ # end
682
+ end
683
+
684
+ context "example correction #033" do
685
+ before do
686
+ original_sentence = 'I was not going to the party.'
687
+ corrected_sentence = 'I did not go to the party.'
688
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
689
+ end
690
+
691
+ it 'Annotates the corrections' do
692
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"was not going", "type"=>"verb_mistake"}, 2=>{"token"=>"did not go", "type"=>"verb_correction"}, 3=>{"token"=>"to", "type"=>"no_mistake"}, 4=>{"token"=>"the", "type"=>"no_mistake"}, 5=>{"token"=>"party", "type"=>"no_mistake"}, 6=>{"token"=>".", "type"=>"no_mistake"}})
693
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"was not going\":\"verb_mistake\"},\"2\":{\"did not go\":\"verb_mistake_correction\"},\"3\":{\"to\":\"no_mistake\"},\"4\":{\"the\":\"no_mistake\"},\"5\":{\"party\":\"no_mistake\"},\"6\":{\".\":\"no_mistake\"}}")
694
+ end
695
+
696
+ # it 'Counts the number of mistakes' do
697
+ # expect(@cc.number_of_mistakes).to eq([])
698
+ # end
699
+
700
+ # it 'Reports the mistakes by mistake type' do
701
+ # expect(@cc.mistake_report).to eq([])
702
+ # end
703
+ end
704
+
705
+ context "example correction #034" do
706
+ before do
707
+ original_sentence = 'I had experiences to support my opinion which a success in life comes from careful planning.'
708
+ corrected_sentence = 'I had experiences which support my opinion that success in life comes from careful planning.'
709
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
710
+ end
711
+
712
+ it 'Annotates the corrections' do
713
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"had", "type"=>"no_mistake"}, 2=>{"token"=>"experiences", "type"=>"no_mistake"}, 3=>{"token"=>"to", "type"=>"word_choice_mistake"}, 4=>{"token"=>"which", "type"=>"word_choice_correction"}, 5=>{"token"=>"support", "type"=>"no_mistake"}, 6=>{"token"=>"my", "type"=>"no_mistake"}, 7=>{"token"=>"opinion", "type"=>"no_mistake"}, 8=>{"token"=>"which", "type"=>"unnecessary_word_mistake"}, 9=>{"token"=>"a", "type"=>"unnecessary_word_mistake"}, 10=>{"token"=>"that", "type"=>"missing_word_mistake"}, 11=>{"token"=>"success", "type"=>"no_mistake"}, 12=>{"token"=>"in", "type"=>"no_mistake"}, 13=>{"token"=>"life", "type"=>"no_mistake"}, 14=>{"token"=>"comes", "type"=>"no_mistake"}, 15=>{"token"=>"from", "type"=>"no_mistake"}, 16=>{"token"=>"careful", "type"=>"no_mistake"}, 17=>{"token"=>"planning", "type"=>"no_mistake"}, 18=>{"token"=>".", "type"=>"no_mistake"}})
714
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"had\":\"no_mistake\"},\"2\":{\"experiences\":\"no_mistake\"},\"3\":{\"to\":\"word_choice_mistake\"},\"4\":{\"which\":\"word_choice_mistake_correction\"},\"5\":{\"support\":\"no_mistake\"},\"6\":{\"my\":\"no_mistake\"},\"7\":{\"opinion\":\"no_mistake\"},\"8\":{\"which\":\"unnecessary_word_mistake\"},\"9\":{\"a\":\"unnecessary_word_mistake\"},\"10\":{\"that\":\"missing_word_mistake\"},\"11\":{\"success\":\"no_mistake\"},\"12\":{\"in\":\"no_mistake\"},\"13\":{\"life\":\"no_mistake\"},\"14\":{\"comes\":\"no_mistake\"},\"15\":{\"from\":\"no_mistake\"},\"16\":{\"careful\":\"no_mistake\"},\"17\":{\"planning\":\"no_mistake\"},\"18\":{\".\":\"no_mistake\"}}")
715
+ end
716
+
717
+ # it 'Counts the number of mistakes' do
718
+ # expect(@cc.number_of_mistakes).to eq([])
719
+ # end
720
+
721
+ # it 'Reports the mistakes by mistake type' do
722
+ # expect(@cc.mistake_report).to eq([])
723
+ # end
724
+ end
725
+
726
+ context "example correction #035" do
727
+ before do
728
+ original_sentence = 'She have a good day yesterday.'
729
+ corrected_sentence = 'hello world'
730
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
731
+ end
732
+
733
+ it 'Annotates the corrections' do
734
+ expect(@cc.correct).to eq({0=>{"token"=>"She", "type"=>"unnecessary_word_mistake"}, 1=>{"token"=>"have", "type"=>"unnecessary_word_mistake"}, 2=>{"token"=>"a", "type"=>"unnecessary_word_mistake"}, 3=>{"token"=>"good", "type"=>"unnecessary_word_mistake"}, 4=>{"token"=>"day", "type"=>"unnecessary_word_mistake"}, 5=>{"token"=>"yesterday", "type"=>"unnecessary_word_mistake"}, 6=>{"token"=>".", "type"=>"punctuation_mistake"}, 7=>{"token"=>"hello", "type"=>"missing_word_mistake"}, 8=>{"token"=>"world", "type"=>"missing_word_mistake"}})
735
+ #expect(@cc.correct).to eq("{\"0\":{\"She\":\"unnecessary_word_mistake\"},\"1\":{\"have\":\"unnecessary_word_mistake\"},\"2\":{\"a\":\"unnecessary_word_mistake\"},\"3\":{\"good\":\"unnecessary_word_mistake\"},\"4\":{\"day\":\"unnecessary_word_mistake\"},\"5\":{\"yesterday\":\"unnecessary_word_mistake\"},\"6\":{\".\":\"punctuation_mistake\"},\"7\":{\"hello\":\"missing_word_mistake\"},\"8\":{\"world\":\"missing_word_mistake\"}}")
736
+ end
737
+
738
+ # it 'Counts the number of mistakes' do
739
+ # expect(@cc.number_of_mistakes).to eq([])
740
+ # end
741
+
742
+ # it 'Reports the mistakes by mistake type' do
743
+ # expect(@cc.mistake_report).to eq([])
744
+ # end
745
+ end
746
+
747
+ context "example correction #036" do
748
+ before do
749
+ original_sentence = 'If my school were located in Tokyo, situation would have quite changed.'
750
+ corrected_sentence = 'If my school had been located in Tokyo, the situation would have been quite different.'
751
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
752
+ end
753
+
754
+ it 'Annotates the corrections' do
755
+ expect(@cc.correct).to eq({0=>{"token"=>"If", "type"=>"no_mistake"}, 1=>{"token"=>"my", "type"=>"no_mistake"}, 2=>{"token"=>"school", "type"=>"no_mistake"}, 3=>{"token"=>"were located", "type"=>"verb_mistake"}, 4=>{"token"=>"had been located", "type"=>"verb_correction"}, 5=>{"token"=>"in", "type"=>"no_mistake"}, 6=>{"token"=>"Tokyo", "type"=>"no_mistake"}, 7=>{"token"=>",", "type"=>"no_mistake"}, 8=>{"token"=>"the", "type"=>"missing_word_mistake"}, 9=>{"token"=>"situation", "type"=>"no_mistake"}, 10=>{"token"=>"would have", "type"=>"verb_mistake"}, 11=>{"token"=>"would have been", "type"=>"verb_correction"}, 12=>{"token"=>"quite", "type"=>"no_mistake"}, 13=>{"token"=>"changed", "type"=>"word_choice_mistake"}, 14=>{"token"=>"different", "type"=>"word_choice_correction"}, 15=>{"token"=>".", "type"=>"no_mistake"}})
756
+ #expect(@cc.correct).to eq("{\"0\":{\"If\":\"no_mistake\"},\"1\":{\"my\":\"no_mistake\"},\"2\":{\"school\":\"no_mistake\"},\"3\":{\"were located\":\"verb_mistake\"},\"4\":{\"had been located\":\"verb_mistake_correction\"},\"5\":{\"in\":\"no_mistake\"},\"6\":{\"Tokyo\":\"no_mistake\"},\"7\":{\",\":\"no_mistake\"},\"8\":{\"the\":\"missing_word_mistake\"},\"9\":{\"situation\":\"no_mistake\"},\"10\":{\"would have\":\"verb_mistake\"},\"11\":{\"would have been\":\"verb_mistake_correction\"},\"12\":{\"quite\":\"no_mistake\"},\"13\":{\"changed\":\"word_choice_mistake\"},\"14\":{\"different\":\"word_choice_mistake_correction\"},\"15\":{\".\":\"no_mistake\"}}")
757
+ end
758
+
759
+ # it 'Counts the number of mistakes' do
760
+ # expect(@cc.number_of_mistakes).to eq([])
761
+ # end
762
+
763
+ # it 'Reports the mistakes by mistake type' do
764
+ # expect(@cc.mistake_report).to eq([])
765
+ # end
766
+ end
767
+
768
+ context "example correction #037" do
769
+ before do
770
+ original_sentence = 'I have three child'
771
+ corrected_sentence = 'I have three children.'
772
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
773
+ end
774
+
775
+ it 'Annotates the corrections' do
776
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"have", "type"=>"no_mistake"}, 2=>{"token"=>"three", "type"=>"no_mistake"}, 3=>{"token"=>"child", "type"=>"pluralization_mistake"}, 4=>{"token"=>"children", "type"=>"pluralization_correction"}, 5=>{"token"=>".", "type"=>"missing_punctuation_mistake"}})
777
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"have\":\"no_mistake\"},\"2\":{\"three\":\"no_mistake\"},\"3\":{\"child\":\"pluralization_mistake\"},\"4\":{\"children\":\"pluralization_mistake_correction\"},\"5\":{\".\":\"missing_punctuation_mistake\"}}")
778
+ end
779
+
780
+ # it 'Counts the number of mistakes' do
781
+ # expect(@cc.number_of_mistakes).to eq([])
782
+ # end
783
+
784
+ # it 'Reports the mistakes by mistake type' do
785
+ # expect(@cc.mistake_report).to eq([])
786
+ # end
787
+ end
788
+
789
+ context "example correction #038" do
790
+ before do
791
+ original_sentence = 'is the bag your'
792
+ corrected_sentence = 'Is the bag yours?'
793
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
794
+ end
795
+
796
+ it 'Annotates the corrections' do
797
+ expect(@cc.correct).to eq({0=>{"token"=>"is", "type"=>"capitalization_mistake"}, 1=>{"token"=>"Is", "type"=>"capitalization_correction"}, 2=>{"token"=>"the", "type"=>"no_mistake"}, 3=>{"token"=>"bag", "type"=>"no_mistake"}, 4=>{"token"=>"your", "type"=>"pluralization_mistake"}, 5=>{"token"=>"yours", "type"=>"pluralization_correction"}, 6=>{"token"=>"?", "type"=>"missing_punctuation_mistake"}})
798
+ #expect(@cc.correct).to eq("{\"0\":{\"is\":\"capitalization_mistake\"},\"1\":{\"Is\":\"capitalization_mistake_correction\"},\"2\":{\"the\":\"no_mistake\"},\"3\":{\"bag\":\"no_mistake\"},\"4\":{\"your\":\"pluralization_mistake\"},\"5\":{\"yours\":\"pluralization_mistake_correction\"},\"6\":{\"?\":\"missing_punctuation_mistake\"}}")
799
+ end
800
+
801
+ # it 'Counts the number of mistakes' do
802
+ # expect(@cc.number_of_mistakes).to eq([])
803
+ # end
804
+
805
+ # it 'Reports the mistakes by mistake type' do
806
+ # expect(@cc.mistake_report).to eq([])
807
+ # end
808
+ end
809
+
810
+ context "example correction #039" do
811
+ before do
812
+ original_sentence = 'Is the bag your'
813
+ corrected_sentence = 'Is this your bag?'
814
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
815
+ end
816
+
817
+ it 'Annotates the corrections' do
818
+ expect(@cc.correct).to eq({0=>{"token"=>"Is", "type"=>"no_mistake"}, 1=>{"token"=>"the", "type"=>"word_choice_mistake"}, 2=>{"token"=>"this", "type"=>"word_choice_correction"}, 3=>{"token"=>"your", "type"=>"word_order_mistake"}, 4=>{"token"=>"bag", "type"=>"word_order_mistake"}, 5=>{"token"=>"?", "type"=>"missing_punctuation_mistake"}})
819
+ #expect(@cc.correct).to eq("{\"0\":{\"Is\":\"no_mistake\"},\"1\":{\"the\":\"word_choice_mistake\"},\"2\":{\"this\":\"word_choice_mistake_correction\"},\"3\":{\"your\":\"word_order_mistake\"},\"4\":{\"bag\":\"word_order_mistake\"},\"5\":{\"?\":\"missing_punctuation_mistake\"}}")
820
+ end
821
+
822
+ # it 'Counts the number of mistakes' do
823
+ # expect(@cc.number_of_mistakes).to eq([])
824
+ # end
825
+
826
+ # it 'Reports the mistakes by mistake type' do
827
+ # expect(@cc.mistake_report).to eq([])
828
+ # end
829
+ end
830
+
831
+ context "example correction #040" do
832
+ before do
833
+ original_sentence = 'He doesnt wear a tie.'
834
+ corrected_sentence = "He doesn't wear a tie."
835
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
836
+ end
837
+
838
+ it 'Annotates the corrections' do
839
+ expect(@cc.correct).to eq({0=>{"token"=>"He", "type"=>"no_mistake"}, 1=>{"token"=>"doesnt", "type"=>"punctuation_mistake"}, 2=>{"token"=>"doesn't", "type"=>"punctuation_correction"}, 3=>{"token"=>"wear", "type"=>"no_mistake"}, 4=>{"token"=>"a", "type"=>"no_mistake"}, 5=>{"token"=>"tie", "type"=>"no_mistake"}, 6=>{"token"=>".", "type"=>"no_mistake"}})
840
+ #expect(@cc.correct).to eq("{\"0\":{\"He\":\"no_mistake\"},\"1\":{\"doesnt\":\"punctuation_mistake\"},\"2\":{\"doesn't\":\"punctuation_mistake_correction\"},\"3\":{\"wear\":\"no_mistake\"},\"4\":{\"a\":\"no_mistake\"},\"5\":{\"tie\":\"no_mistake\"},\"6\":{\".\":\"no_mistake\"}}")
841
+ end
842
+
843
+ # it 'Counts the number of mistakes' do
844
+ # expect(@cc.number_of_mistakes).to eq([])
845
+ # end
846
+
847
+ # it 'Reports the mistakes by mistake type' do
848
+ # expect(@cc.mistake_report).to eq([])
849
+ # end
850
+ end
851
+
852
+ context "example correction #041" do
853
+ before do
854
+ original_sentence = 'Rather than the TV, I feel the appearance of internet to be more interrupt our communication.'
855
+ corrected_sentence = 'More than TV, I feel the appearance of internet to be more likely to interrupt our communication.'
856
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
857
+ end
858
+
859
+ it 'Annotates the corrections' do
860
+ expect(@cc.correct).to eq({0=>{"token"=>"Rather", "type"=>"word_choice_mistake"}, 1=>{"token"=>"More", "type"=>"word_choice_correction"}, 2=>{"token"=>"than", "type"=>"no_mistake"}, 3=>{"token"=>"the", "type"=>"unnecessary_word_mistake"}, 4=>{"token"=>"TV", "type"=>"no_mistake"}, 5=>{"token"=>",", "type"=>"no_mistake"}, 6=>{"token"=>"I", "type"=>"no_mistake"}, 7=>{"token"=>"feel", "type"=>"no_mistake"}, 8=>{"token"=>"the", "type"=>"no_mistake"}, 9=>{"token"=>"appearance", "type"=>"no_mistake"}, 10=>{"token"=>"of", "type"=>"no_mistake"}, 11=>{"token"=>"internet", "type"=>"no_mistake"}, 12=>{"token"=>"to", "type"=>"no_mistake"}, 13=>{"token"=>"be", "type"=>"no_mistake"}, 14=>{"token"=>"more", "type"=>"no_mistake"}, 15=>{"token"=>"likely", "type"=>"missing_word_mistake"}, 16=>{"token"=>"to", "type"=>"missing_word_mistake"}, 17=>{"token"=>"interrupt", "type"=>"no_mistake"}, 18=>{"token"=>"our", "type"=>"no_mistake"}, 19=>{"token"=>"communication", "type"=>"no_mistake"}, 20=>{"token"=>".", "type"=>"no_mistake"}})
861
+ #expect(@cc.correct).to eq("{\"0\":{\"Rather\":\"word_choice_mistake\"},\"1\":{\"More\":\"word_choice_mistake_correction\"},\"2\":{\"than\":\"no_mistake\"},\"3\":{\"the\":\"unnecessary_word_mistake\"},\"4\":{\"TV\":\"no_mistake\"},\"5\":{\",\":\"no_mistake\"},\"6\":{\"I\":\"no_mistake\"},\"7\":{\"feel\":\"no_mistake\"},\"8\":{\"the\":\"no_mistake\"},\"9\":{\"appearance\":\"no_mistake\"},\"10\":{\"of\":\"no_mistake\"},\"11\":{\"internet\":\"no_mistake\"},\"12\":{\"to\":\"no_mistake\"},\"13\":{\"be\":\"no_mistake\"},\"14\":{\"more\":\"no_mistake\"},\"15\":{\"likely\":\"missing_word_mistake\"},\"16\":{\"to\":\"missing_word_mistake\"},\"17\":{\"interrupt\":\"no_mistake\"},\"18\":{\"our\":\"no_mistake\"},\"19\":{\"communication\":\"no_mistake\"},\"20\":{\".\":\"no_mistake\"}}")
862
+ end
863
+
864
+ # it 'Counts the number of mistakes' do
865
+ # expect(@cc.number_of_mistakes).to eq([])
866
+ # end
867
+
868
+ # it 'Reports the mistakes by mistake type' do
869
+ # expect(@cc.mistake_report).to eq([])
870
+ # end
871
+ end
872
+
873
+ # context "example correction #042" do
874
+ # before do
875
+ # original_sentence = 'On the other point, we have seldom watched a TV recently than in the past.'
876
+ # corrected_sentence = 'On the other hand, we seldom watch TV compared to the past.'
877
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
878
+ # end
879
+
880
+ # it 'Annotates the corrections' do
881
+ # #expect(@cc.correct).to eq('')
882
+ # Might want to look into fixing the algo to handle the case of split have + SOME_WORD + verb in the future
883
+ # expect(@cc.correct).to eq("{\"0\":{\"On\":\"no_mistake\"},\"1\":{\"the\":\"no_mistake\"},\"2\":{\"other\":\"no_mistake\"},\"3\":{\"point\":\"word_choice_mistake\"},\"4\":{\"hand\":\"word_choice_mistake_correction\"},\"5\":{\",\":\"no_mistake\"},\"6\":{\"we\":\"no_mistake\"},\"7\":{\"have\":\"unnecessary_word_mistake\"},\"8\":{\"seldom\":\"no_mistake\"},\"9\":{\"watched\":\"verb_mistake\"},\"10\":{\"watch\":\"verb_mistake_correction\"},\"11\":{\"a\":\"unnecessary_word_mistake\"},\"12\":{\"TV\":\"no_mistake\"},\"13\":{\"recently\":\"unnecessary_word_mistake\"},\"14\":{\"than\":\"unnecessary_word_mistake\"},\"15\":{\"in\":\"unnecessary_word_mistake\"},\"16\":{\"compared\":\"missing_word_mistake\"},\"17\":{\"to\":\"missing_word_mistake\"},\"18\":{\"the\":\"no_mistake\"},\"19\":{\"past\":\"no_mistake\"},\"20\":{\".\":\"no_mistake\"}}")
884
+ # end
885
+
886
+ # it 'Counts the number of mistakes' do
887
+ # expect(@cc.number_of_mistakes).to eq([])
888
+ # end
889
+
890
+ # it 'Reports the mistakes by mistake type' do
891
+ # expect(@cc.mistake_report).to eq([])
892
+ # end
893
+ # end
894
+
895
+ context "example correction #043" do
896
+ before do
897
+ original_sentence = 'That is the why not only we can get information from TV, but also we can get information from the internet nowadays.'
898
+ corrected_sentence = 'That is the reason why not only we can get information from TV, but also we can get information from the internet nowadays.'
899
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
900
+ end
901
+
902
+ it 'Annotates the corrections' do
903
+ expect(@cc.correct).to eq({0=>{"token"=>"That", "type"=>"no_mistake"}, 1=>{"token"=>"is", "type"=>"no_mistake"}, 2=>{"token"=>"the", "type"=>"no_mistake"}, 3=>{"token"=>"reason", "type"=>"missing_word_mistake"}, 4=>{"token"=>"why", "type"=>"no_mistake"}, 5=>{"token"=>"not", "type"=>"no_mistake"}, 6=>{"token"=>"only", "type"=>"no_mistake"}, 7=>{"token"=>"we", "type"=>"no_mistake"}, 8=>{"token"=>"can", "type"=>"no_mistake"}, 9=>{"token"=>"get", "type"=>"no_mistake"}, 10=>{"token"=>"information", "type"=>"no_mistake"}, 11=>{"token"=>"from", "type"=>"no_mistake"}, 12=>{"token"=>"TV", "type"=>"no_mistake"}, 13=>{"token"=>",", "type"=>"no_mistake"}, 14=>{"token"=>"but", "type"=>"no_mistake"}, 15=>{"token"=>"also", "type"=>"no_mistake"}, 16=>{"token"=>"we", "type"=>"no_mistake"}, 17=>{"token"=>"can", "type"=>"no_mistake"}, 18=>{"token"=>"get", "type"=>"no_mistake"}, 19=>{"token"=>"information", "type"=>"no_mistake"}, 20=>{"token"=>"from", "type"=>"no_mistake"}, 21=>{"token"=>"the", "type"=>"no_mistake"}, 22=>{"token"=>"internet", "type"=>"no_mistake"}, 23=>{"token"=>"nowadays", "type"=>"no_mistake"}, 24=>{"token"=>".", "type"=>"no_mistake"}})
904
+ #expect(@cc.correct).to eq("{\"0\":{\"That\":\"no_mistake\"},\"1\":{\"is\":\"no_mistake\"},\"2\":{\"the\":\"no_mistake\"},\"3\":{\"reason\":\"missing_word_mistake\"},\"4\":{\"why\":\"no_mistake\"},\"5\":{\"not\":\"no_mistake\"},\"6\":{\"only\":\"no_mistake\"},\"7\":{\"we\":\"no_mistake\"},\"8\":{\"can\":\"no_mistake\"},\"9\":{\"get\":\"no_mistake\"},\"10\":{\"information\":\"no_mistake\"},\"11\":{\"from\":\"no_mistake\"},\"12\":{\"TV\":\"no_mistake\"},\"13\":{\",\":\"no_mistake\"},\"14\":{\"but\":\"no_mistake\"},\"15\":{\"also\":\"no_mistake\"},\"16\":{\"we\":\"no_mistake\"},\"17\":{\"can\":\"no_mistake\"},\"18\":{\"get\":\"no_mistake\"},\"19\":{\"information\":\"no_mistake\"},\"20\":{\"from\":\"no_mistake\"},\"21\":{\"the\":\"no_mistake\"},\"22\":{\"internet\":\"no_mistake\"},\"23\":{\"nowadays\":\"no_mistake\"},\"24\":{\".\":\"no_mistake\"}}")
905
+ end
906
+
907
+ # it 'Counts the number of mistakes' do
908
+ # expect(@cc.number_of_mistakes).to eq([])
909
+ # end
910
+
911
+ # it 'Reports the mistakes by mistake type' do
912
+ # expect(@cc.mistake_report).to eq([])
913
+ # end
914
+ end
915
+
916
+ context "example correction #044" do
917
+ before do
918
+ original_sentence = 'In the other hand, TV topic develop our relationship to provide some topics such as a news, drama, comedy, animation, and so on.'
919
+ corrected_sentence = 'On the other hand, TV topics develop our relationship to provide some topics such as a news, drama, comedy, animation, and so on.'
920
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
921
+ end
922
+
923
+ it 'Annotates the corrections' do
924
+ expect(@cc.correct).to eq({0=>{"token"=>"In", "type"=>"word_choice_mistake"}, 1=>{"token"=>"On", "type"=>"word_choice_correction"}, 2=>{"token"=>"the", "type"=>"no_mistake"}, 3=>{"token"=>"other", "type"=>"no_mistake"}, 4=>{"token"=>"hand", "type"=>"no_mistake"}, 5=>{"token"=>",", "type"=>"no_mistake"}, 6=>{"token"=>"TV", "type"=>"no_mistake"}, 7=>{"token"=>"topic", "type"=>"pluralization_mistake"}, 8=>{"token"=>"topics", "type"=>"pluralization_correction"}, 9=>{"token"=>"develop", "type"=>"no_mistake"}, 10=>{"token"=>"our", "type"=>"no_mistake"}, 11=>{"token"=>"relationship", "type"=>"no_mistake"}, 12=>{"token"=>"to", "type"=>"no_mistake"}, 13=>{"token"=>"provide", "type"=>"no_mistake"}, 14=>{"token"=>"some", "type"=>"no_mistake"}, 15=>{"token"=>"topics", "type"=>"no_mistake"}, 16=>{"token"=>"such", "type"=>"no_mistake"}, 17=>{"token"=>"as", "type"=>"no_mistake"}, 18=>{"token"=>"a", "type"=>"no_mistake"}, 19=>{"token"=>"news", "type"=>"no_mistake"}, 20=>{"token"=>",", "type"=>"no_mistake"}, 21=>{"token"=>"drama", "type"=>"no_mistake"}, 22=>{"token"=>",", "type"=>"no_mistake"}, 23=>{"token"=>"comedy", "type"=>"no_mistake"}, 24=>{"token"=>",", "type"=>"no_mistake"}, 25=>{"token"=>"animation", "type"=>"no_mistake"}, 26=>{"token"=>",", "type"=>"no_mistake"}, 27=>{"token"=>"and", "type"=>"no_mistake"}, 28=>{"token"=>"so", "type"=>"no_mistake"}, 29=>{"token"=>"on", "type"=>"no_mistake"}, 30=>{"token"=>".", "type"=>"no_mistake"}})
925
+ #expect(@cc.correct).to eq("{\"0\":{\"In\":\"word_choice_mistake\"},\"1\":{\"On\":\"word_choice_mistake_correction\"},\"2\":{\"the\":\"no_mistake\"},\"3\":{\"other\":\"no_mistake\"},\"4\":{\"hand\":\"no_mistake\"},\"5\":{\",\":\"no_mistake\"},\"6\":{\"TV\":\"no_mistake\"},\"7\":{\"topic\":\"pluralization_mistake\"},\"8\":{\"topics\":\"pluralization_mistake_correction\"},\"9\":{\"develop\":\"no_mistake\"},\"10\":{\"our\":\"no_mistake\"},\"11\":{\"relationship\":\"no_mistake\"},\"12\":{\"to\":\"no_mistake\"},\"13\":{\"provide\":\"no_mistake\"},\"14\":{\"some\":\"no_mistake\"},\"15\":{\"topics\":\"no_mistake\"},\"16\":{\"such\":\"no_mistake\"},\"17\":{\"as\":\"no_mistake\"},\"18\":{\"a\":\"no_mistake\"},\"19\":{\"news\":\"no_mistake\"},\"20\":{\",\":\"no_mistake\"},\"21\":{\"drama\":\"no_mistake\"},\"22\":{\",\":\"no_mistake\"},\"23\":{\"comedy\":\"no_mistake\"},\"24\":{\",\":\"no_mistake\"},\"25\":{\"animation\":\"no_mistake\"},\"26\":{\",\":\"no_mistake\"},\"27\":{\"and\":\"no_mistake\"},\"28\":{\"so\":\"no_mistake\"},\"29\":{\"on\":\"no_mistake\"},\"30\":{\".\":\"no_mistake\"}}")
926
+ end
927
+
928
+ # it 'Counts the number of mistakes' do
929
+ # expect(@cc.number_of_mistakes).to eq([])
930
+ # end
931
+
932
+ # it 'Reports the mistakes by mistake type' do
933
+ # expect(@cc.mistake_report).to eq([])
934
+ # end
935
+ end
936
+
937
+ context "example correction #045" do
938
+ before do
939
+ original_sentence = 'I carried.'
940
+ corrected_sentence = 'I carry'
941
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
942
+ end
943
+
944
+ it 'Annotates the corrections' do
945
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"carried", "type"=>"verb_mistake"}, 2=>{"token"=>"carry", "type"=>"verb_correction"}, 3=>{"token"=>".", "type"=>"punctuation_mistake"}})
946
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"carried\":\"verb_mistake\"},\"2\":{\"carry\":\"verb_mistake_correction\"},\"3\":{\".\":\"punctuation_mistake\"}}")
947
+ end
948
+
949
+ # it 'Counts the number of mistakes' do
950
+ # expect(@cc.number_of_mistakes).to eq([])
951
+ # end
952
+
953
+ # it 'Reports the mistakes by mistake type' do
954
+ # expect(@cc.mistake_report).to eq([])
955
+ # end
956
+ end
957
+
958
+ context "example correction #046" do
959
+ before do
960
+ original_sentence = 'I went to the store. I bought some eggs.'
961
+ corrected_sentence = 'I went to the store.'
962
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
963
+ end
964
+
965
+ it 'Annotates the corrections' do
966
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"went", "type"=>"no_mistake"}, 2=>{"token"=>"to", "type"=>"no_mistake"}, 3=>{"token"=>"the", "type"=>"no_mistake"}, 4=>{"token"=>"store", "type"=>"no_mistake"}, 5=>{"token"=>".", "type"=>"no_mistake"}, 6=>{"token"=>"I", "type"=>"unnecessary_word_mistake"}, 7=>{"token"=>"bought", "type"=>"unnecessary_word_mistake"}, 8=>{"token"=>"some", "type"=>"unnecessary_word_mistake"}, 9=>{"token"=>"eggs", "type"=>"unnecessary_word_mistake"}, 10=>{"token"=>".", "type"=>"punctuation_mistake"}})
967
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"went\":\"no_mistake\"},\"2\":{\"to\":\"no_mistake\"},\"3\":{\"the\":\"no_mistake\"},\"4\":{\"store\":\"no_mistake\"},\"5\":{\".\":\"no_mistake\"},\"6\":{\"I\":\"unnecessary_word_mistake\"},\"7\":{\"bought\":\"unnecessary_word_mistake\"},\"8\":{\"some\":\"unnecessary_word_mistake\"},\"9\":{\"eggs\":\"unnecessary_word_mistake\"},\"10\":{\".\":\"punctuation_mistake\"}}")
968
+ end
969
+
970
+ # it 'Counts the number of mistakes' do
971
+ # expect(@cc.number_of_mistakes).to eq([])
972
+ # end
973
+
974
+ # it 'Reports the mistakes by mistake type' do
975
+ # expect(@cc.mistake_report).to eq([])
976
+ # end
977
+ end
978
+
979
+ context "example correction #047" do
980
+ before do
981
+ original_sentence = 'The laptop can make a lot of things such as a searching knowledge, writing down some memo, watching a movie and so on.'
982
+ corrected_sentence = 'I can do a lot of things with the laptop such as searching knowledge, writing down some memos, watching a movie and so on.'
983
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
984
+ end
985
+
986
+ it 'Annotates the corrections' do
987
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"missing_word_mistake"}, 1=>{"token"=>"can", "type"=>"word_order_mistake"}, 2=>{"token"=>"do", "type"=>"missing_word_mistake"}, 3=>{"token"=>"make", "type"=>"unnecessary_word_mistake"}, 4=>{"token"=>"a", "type"=>"word_order_mistake"}, 5=>{"token"=>"lot", "type"=>"word_order_mistake"}, 6=>{"token"=>"of", "type"=>"word_order_mistake"}, 7=>{"token"=>"things", "type"=>"word_order_mistake"}, 8=>{"token"=>"with", "type"=>"missing_word_mistake"}, 9=>{"token"=>"the", "type"=>"word_order_mistake"}, 10=>{"token"=>"laptop", "type"=>"word_order_mistake"}, 11=>{"token"=>"such", "type"=>"no_mistake"}, 12=>{"token"=>"as", "type"=>"no_mistake"}, 13=>{"token"=>"a", "type"=>"unnecessary_word_mistake"}, 14=>{"token"=>"searching", "type"=>"no_mistake"}, 15=>{"token"=>"knowledge", "type"=>"no_mistake"}, 16=>{"token"=>",", "type"=>"no_mistake"}, 17=>{"token"=>"writing", "type"=>"no_mistake"}, 18=>{"token"=>"down", "type"=>"no_mistake"}, 19=>{"token"=>"some", "type"=>"no_mistake"}, 20=>{"token"=>"memo", "type"=>"pluralization_mistake"}, 21=>{"token"=>"memos", "type"=>"pluralization_correction"}, 22=>{"token"=>",", "type"=>"no_mistake"}, 23=>{"token"=>"watching", "type"=>"no_mistake"}, 24=>{"token"=>"a", "type"=>"no_mistake"}, 25=>{"token"=>"movie", "type"=>"no_mistake"}, 26=>{"token"=>"and", "type"=>"no_mistake"}, 27=>{"token"=>"so", "type"=>"no_mistake"}, 28=>{"token"=>"on", "type"=>"no_mistake"}, 29=>{"token"=>".", "type"=>"no_mistake"}})
988
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"missing_word_mistake\"},\"1\":{\"can\":\"word_order_mistake\"},\"2\":{\"do\":\"missing_word_mistake\"},\"3\":{\"make\":\"unnecessary_word_mistake\"},\"4\":{\"a\":\"word_order_mistake\"},\"5\":{\"lot\":\"word_order_mistake\"},\"6\":{\"of\":\"word_order_mistake\"},\"7\":{\"things\":\"word_order_mistake\"},\"8\":{\"with\":\"missing_word_mistake\"},\"9\":{\"the\":\"word_order_mistake\"},\"10\":{\"laptop\":\"word_order_mistake\"},\"11\":{\"such\":\"no_mistake\"},\"12\":{\"as\":\"no_mistake\"},\"13\":{\"a\":\"unnecessary_word_mistake\"},\"14\":{\"searching\":\"no_mistake\"},\"15\":{\"knowledge\":\"no_mistake\"},\"16\":{\",\":\"no_mistake\"},\"17\":{\"writing\":\"no_mistake\"},\"18\":{\"down\":\"no_mistake\"},\"19\":{\"some\":\"no_mistake\"},\"20\":{\"memo\":\"pluralization_mistake\"},\"21\":{\"memos\":\"pluralization_mistake_correction\"},\"22\":{\",\":\"no_mistake\"},\"23\":{\"watching\":\"no_mistake\"},\"24\":{\"a\":\"no_mistake\"},\"25\":{\"movie\":\"no_mistake\"},\"26\":{\"and\":\"no_mistake\"},\"27\":{\"so\":\"no_mistake\"},\"28\":{\"on\":\"no_mistake\"},\"29\":{\".\":\"no_mistake\"}}")
989
+ end
990
+
991
+ # it 'Counts the number of mistakes' do
992
+ # expect(@cc.number_of_mistakes).to eq([])
993
+ # end
994
+
995
+ # it 'Reports the mistakes by mistake type' do
996
+ # expect(@cc.mistake_report).to eq([])
997
+ # end
998
+ end
999
+
1000
+ context "example correction #048" do
1001
+ before do
1002
+ original_sentence = 'Actually when I attended the international meeting, or American society for surgery of hand, at the trip.'
1003
+ corrected_sentence = 'Actually, I attended the international meeting for the American Society for surgery of hand while I was on the trip.'
1004
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1005
+ end
1006
+
1007
+ it 'Annotates the corrections' do
1008
+ expect(@cc.correct).to eq({0=>{"token"=>"Actually", "type"=>"no_mistake"}, 1=>{"token"=>"when", "type"=>"unnecessary_word_mistake"}, 2=>{"token"=>",", "type"=>"missing_punctuation_mistake"}, 3=>{"token"=>"I", "type"=>"no_mistake"}, 4=>{"token"=>"attended", "type"=>"no_mistake"}, 5=>{"token"=>"the", "type"=>"no_mistake"}, 6=>{"token"=>"international", "type"=>"no_mistake"}, 7=>{"token"=>"meeting", "type"=>"no_mistake"}, 8=>{"token"=>",", "type"=>"punctuation_mistake"}, 9=>{"token"=>"or", "type"=>"unnecessary_word_mistake"}, 10=>{"token"=>"for", "type"=>"missing_word_mistake"}, 11=>{"token"=>"the", "type"=>"missing_word_mistake"}, 12=>{"token"=>"American", "type"=>"no_mistake"}, 13=>{"token"=>"society", "type"=>"capitalization_mistake"}, 14=>{"token"=>"Society", "type"=>"capitalization_correction"}, 15=>{"token"=>"for", "type"=>"no_mistake"}, 16=>{"token"=>"surgery", "type"=>"no_mistake"}, 17=>{"token"=>"of", "type"=>"no_mistake"}, 18=>{"token"=>"hand", "type"=>"no_mistake"}, 19=>{"token"=>",", "type"=>"punctuation_mistake"}, 20=>{"token"=>"at", "type"=>"unnecessary_word_mistake"}, 21=>{"token"=>"while", "type"=>"missing_word_mistake"}, 22=>{"token"=>"I", "type"=>"missing_word_mistake"}, 23=>{"token"=>"was", "type"=>"missing_word_mistake"}, 24=>{"token"=>"on", "type"=>"missing_word_mistake"}, 25=>{"token"=>"the", "type"=>"no_mistake"}, 26=>{"token"=>"trip", "type"=>"no_mistake"}, 27=>{"token"=>".", "type"=>"no_mistake"}})
1009
+ #expect(@cc.correct).to eq("{\"0\":{\"Actually\":\"no_mistake\"},\"1\":{\"when\":\"unnecessary_word_mistake\"},\"2\":{\",\":\"missing_punctuation_mistake\"},\"3\":{\"I\":\"no_mistake\"},\"4\":{\"attended\":\"no_mistake\"},\"5\":{\"the\":\"no_mistake\"},\"6\":{\"international\":\"no_mistake\"},\"7\":{\"meeting\":\"no_mistake\"},\"8\":{\",\":\"punctuation_mistake\"},\"9\":{\"or\":\"unnecessary_word_mistake\"},\"10\":{\"for\":\"missing_word_mistake\"},\"11\":{\"the\":\"missing_word_mistake\"},\"12\":{\"American\":\"no_mistake\"},\"13\":{\"society\":\"capitalization_mistake\"},\"14\":{\"Society\":\"capitalization_mistake_correction\"},\"15\":{\"for\":\"no_mistake\"},\"16\":{\"surgery\":\"no_mistake\"},\"17\":{\"of\":\"no_mistake\"},\"18\":{\"hand\":\"no_mistake\"},\"19\":{\",\":\"punctuation_mistake\"},\"20\":{\"at\":\"unnecessary_word_mistake\"},\"21\":{\"while\":\"missing_word_mistake\"},\"22\":{\"I\":\"missing_word_mistake\"},\"23\":{\"was\":\"missing_word_mistake\"},\"24\":{\"on\":\"missing_word_mistake\"},\"25\":{\"the\":\"no_mistake\"},\"26\":{\"trip\":\"no_mistake\"},\"27\":{\".\":\"no_mistake\"}}")
1010
+ end
1011
+
1012
+ # it 'Counts the number of mistakes' do
1013
+ # expect(@cc.number_of_mistakes).to eq([])
1014
+ # end
1015
+
1016
+ # it 'Reports the mistakes by mistake type' do
1017
+ # expect(@cc.mistake_report).to eq([])
1018
+ # end
1019
+ end
1020
+
1021
+ # context "example correction #049" do
1022
+ # before do
1023
+ # original_sentence = 'By the way, already got a demo of it working with video. maybe'
1024
+ # corrected_sentence = 'By the way, already got a demo of it working with video, maybe we can try it sometime this week.'
1025
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1026
+ # end
1027
+
1028
+ # it 'Annotates the corrections' do
1029
+ # #expect(@cc.correct).to eq('')
1030
+ # expect(@cc.correct).to eq([])
1031
+ # end
1032
+
1033
+ # it 'Counts the number of mistakes' do
1034
+ # expect(@cc.number_of_mistakes).to eq([])
1035
+ # end
1036
+
1037
+ # it 'Reports the mistakes by mistake type' do
1038
+ # expect(@cc.mistake_report).to eq([])
1039
+ # end
1040
+ # end
1041
+
1042
+ context "example correction #050" do
1043
+ before do
1044
+ original_sentence = 'This year, going back to my work at my university, I have less time to spend my private time, for example, morning conference at 7:10 on Tuesday, at 7:30 on Thursday, preparation for operation, meeting, work for outpatients and so on.'
1045
+ corrected_sentence = 'This year, going back to work at my university, I have less private time, for example, morning conference at 7:10 on Tuesday, at 7:30 on Thursday, preparation for operations, meetings, work for outpatients and so on.'
1046
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1047
+ end
1048
+
1049
+ it 'Annotates the corrections' do
1050
+ expect(@cc.correct).to eq({0=>{"token"=>"This", "type"=>"no_mistake"}, 1=>{"token"=>"year", "type"=>"no_mistake"}, 2=>{"token"=>",", "type"=>"no_mistake"}, 3=>{"token"=>"going", "type"=>"no_mistake"}, 4=>{"token"=>"back", "type"=>"no_mistake"}, 5=>{"token"=>"to", "type"=>"no_mistake"}, 6=>{"token"=>"my", "type"=>"unnecessary_word_mistake"}, 7=>{"token"=>"work", "type"=>"no_mistake"}, 8=>{"token"=>"at", "type"=>"no_mistake"}, 9=>{"token"=>"my", "type"=>"no_mistake"}, 10=>{"token"=>"university", "type"=>"no_mistake"}, 11=>{"token"=>",", "type"=>"no_mistake"}, 12=>{"token"=>"I", "type"=>"no_mistake"}, 13=>{"token"=>"have", "type"=>"no_mistake"}, 14=>{"token"=>"less", "type"=>"no_mistake"}, 15=>{"token"=>"time", "type"=>"unnecessary_word_mistake"}, 16=>{"token"=>"to", "type"=>"unnecessary_word_mistake"}, 17=>{"token"=>"spend", "type"=>"unnecessary_word_mistake"}, 18=>{"token"=>"my", "type"=>"unnecessary_word_mistake"}, 19=>{"token"=>"private", "type"=>"no_mistake"}, 20=>{"token"=>"time", "type"=>"no_mistake"}, 21=>{"token"=>",", "type"=>"no_mistake"}, 22=>{"token"=>"for", "type"=>"no_mistake"}, 23=>{"token"=>"example", "type"=>"no_mistake"}, 24=>{"token"=>",", "type"=>"no_mistake"}, 25=>{"token"=>"morning", "type"=>"no_mistake"}, 26=>{"token"=>"conference", "type"=>"no_mistake"}, 27=>{"token"=>"at", "type"=>"no_mistake"}, 28=>{"token"=>"7:10", "type"=>"no_mistake"}, 29=>{"token"=>"on", "type"=>"no_mistake"}, 30=>{"token"=>"Tuesday", "type"=>"no_mistake"}, 31=>{"token"=>",", "type"=>"no_mistake"}, 32=>{"token"=>"at", "type"=>"no_mistake"}, 33=>{"token"=>"7:30", "type"=>"no_mistake"}, 34=>{"token"=>"on", "type"=>"no_mistake"}, 35=>{"token"=>"Thursday", "type"=>"no_mistake"}, 36=>{"token"=>",", "type"=>"no_mistake"}, 37=>{"token"=>"preparation", "type"=>"no_mistake"}, 38=>{"token"=>"for", "type"=>"no_mistake"}, 39=>{"token"=>"operation", "type"=>"pluralization_mistake"}, 40=>{"token"=>"operations", "type"=>"pluralization_correction"}, 41=>{"token"=>",", "type"=>"no_mistake"}, 42=>{"token"=>"meeting", "type"=>"pluralization_mistake"}, 43=>{"token"=>"meetings", "type"=>"pluralization_correction"}, 44=>{"token"=>",", "type"=>"no_mistake"}, 45=>{"token"=>"work", "type"=>"no_mistake"}, 46=>{"token"=>"for", "type"=>"no_mistake"}, 47=>{"token"=>"outpatients", "type"=>"no_mistake"}, 48=>{"token"=>"and", "type"=>"no_mistake"}, 49=>{"token"=>"so", "type"=>"no_mistake"}, 50=>{"token"=>"on", "type"=>"no_mistake"}, 51=>{"token"=>".", "type"=>"no_mistake"}})
1051
+ #expect(@cc.correct).to eq("{\"0\":{\"This\":\"no_mistake\"},\"1\":{\"year\":\"no_mistake\"},\"2\":{\",\":\"no_mistake\"},\"3\":{\"going\":\"no_mistake\"},\"4\":{\"back\":\"no_mistake\"},\"5\":{\"to\":\"no_mistake\"},\"6\":{\"my\":\"unnecessary_word_mistake\"},\"7\":{\"work\":\"no_mistake\"},\"8\":{\"at\":\"no_mistake\"},\"9\":{\"my\":\"no_mistake\"},\"10\":{\"university\":\"no_mistake\"},\"11\":{\",\":\"no_mistake\"},\"12\":{\"I\":\"no_mistake\"},\"13\":{\"have\":\"no_mistake\"},\"14\":{\"less\":\"no_mistake\"},\"15\":{\"time\":\"unnecessary_word_mistake\"},\"16\":{\"to\":\"unnecessary_word_mistake\"},\"17\":{\"spend\":\"unnecessary_word_mistake\"},\"18\":{\"my\":\"unnecessary_word_mistake\"},\"19\":{\"private\":\"no_mistake\"},\"20\":{\"time\":\"no_mistake\"},\"21\":{\",\":\"no_mistake\"},\"22\":{\"for\":\"no_mistake\"},\"23\":{\"example\":\"no_mistake\"},\"24\":{\",\":\"no_mistake\"},\"25\":{\"morning\":\"no_mistake\"},\"26\":{\"conference\":\"no_mistake\"},\"27\":{\"at\":\"no_mistake\"},\"28\":{\"7:10\":\"no_mistake\"},\"29\":{\"on\":\"no_mistake\"},\"30\":{\"Tuesday\":\"no_mistake\"},\"31\":{\",\":\"no_mistake\"},\"32\":{\"at\":\"no_mistake\"},\"33\":{\"7:30\":\"no_mistake\"},\"34\":{\"on\":\"no_mistake\"},\"35\":{\"Thursday\":\"no_mistake\"},\"36\":{\",\":\"no_mistake\"},\"37\":{\"preparation\":\"no_mistake\"},\"38\":{\"for\":\"no_mistake\"},\"39\":{\"operation\":\"pluralization_mistake\"},\"40\":{\"operations\":\"pluralization_mistake_correction\"},\"41\":{\",\":\"no_mistake\"},\"42\":{\"meeting\":\"pluralization_mistake\"},\"43\":{\"meetings\":\"pluralization_mistake_correction\"},\"44\":{\",\":\"no_mistake\"},\"45\":{\"work\":\"no_mistake\"},\"46\":{\"for\":\"no_mistake\"},\"47\":{\"outpatients\":\"no_mistake\"},\"48\":{\"and\":\"no_mistake\"},\"49\":{\"so\":\"no_mistake\"},\"50\":{\"on\":\"no_mistake\"},\"51\":{\".\":\"no_mistake\"}}")
1052
+ end
1053
+
1054
+ # it 'Counts the number of mistakes' do
1055
+ # expect(@cc.number_of_mistakes).to eq([])
1056
+ # end
1057
+
1058
+ # it 'Reports the mistakes by mistake type' do
1059
+ # expect(@cc.mistake_report).to eq([])
1060
+ # end
1061
+ end
1062
+
1063
+ # context "example correction #051" do
1064
+ # before do
1065
+ # original_sentence = 'These are my things to keep healthy now.'
1066
+ # corrected_sentence = 'These are the ways that I keep healthy now.'
1067
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1068
+ # end
1069
+
1070
+ # it 'Annotates the corrections' do
1071
+ # #expect(@cc.correct).to eq('')
1072
+ # expect(@cc.correct).to eq("{\"0\":{\"These\":\"no_mistake\"},\"1\":{\"are\":\"no_mistake\"},\"2\":{\"my\":\"word_choice_mistake\"},\"3\":{\"things\":\"word_choice_mistake\"},\"4\":{\"to\":\"word_choice_mistake\"},\"5\":{\"the\":\"word_choice_mistake_correction\"},\"6\":{\"ways\":\"word_choice_mistake_correction\"},\"7\":{\"that\":\"word_choice_mistake_correction\"},\"8\":{\"I\":\"word_choice_mistake_correction\"},\"9\":{\"keep\":\"no_mistake\"},\"10\":{\"healthy\":\"no_mistake\"},\"11\":{\"now\":\"no_mistake\"},\"12\":{\".\":\"no_mistake\"}}")
1073
+ # end
1074
+
1075
+ # it 'Counts the number of mistakes' do
1076
+ # expect(@cc.number_of_mistakes).to eq([])
1077
+ # end
1078
+
1079
+ # it 'Reports the mistakes by mistake type' do
1080
+ # expect(@cc.mistake_report).to eq([])
1081
+ # end
1082
+ # end
1083
+
1084
+ context "example correction #052" do
1085
+ before do
1086
+ original_sentence = 'Her name was Dr. Cole.'
1087
+ corrected_sentence = 'Her name is Dr. Cole.'
1088
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1089
+ end
1090
+
1091
+ it 'Annotates the corrections' do
1092
+ expect(@cc.correct).to eq({0=>{"token"=>"Her", "type"=>"no_mistake"}, 1=>{"token"=>"name", "type"=>"no_mistake"}, 2=>{"token"=>"was", "type"=>"verb_mistake"}, 3=>{"token"=>"is", "type"=>"verb_correction"}, 4=>{"token"=>"Dr.", "type"=>"no_mistake"}, 5=>{"token"=>"Cole", "type"=>"no_mistake"}, 6=>{"token"=>".", "type"=>"no_mistake"}})
1093
+ #expect(@cc.correct).to eq("{\"0\":{\"Her\":\"no_mistake\"},\"1\":{\"name\":\"no_mistake\"},\"2\":{\"was\":\"verb_mistake\"},\"3\":{\"is\":\"verb_mistake_correction\"},\"4\":{\"Dr.\":\"no_mistake\"},\"5\":{\"Cole\":\"no_mistake\"},\"6\":{\".\":\"no_mistake\"}}")
1094
+ end
1095
+
1096
+ # it 'Counts the number of mistakes' do
1097
+ # expect(@cc.number_of_mistakes).to eq([])
1098
+ # end
1099
+
1100
+ # it 'Reports the mistakes by mistake type' do
1101
+ # expect(@cc.mistake_report).to eq([])
1102
+ # end
1103
+ end
1104
+
1105
+ context "example correction #053" do
1106
+ before do
1107
+ original_sentence = 'Because gravity.'
1108
+ corrected_sentence = 'Because of gravity'
1109
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1110
+ end
1111
+
1112
+ it 'Annotates the corrections' do
1113
+ expect(@cc.correct).to eq({0=>{"token"=>"Because", "type"=>"no_mistake"}, 1=>{"token"=>"of", "type"=>"missing_word_mistake"}, 2=>{"token"=>"gravity", "type"=>"no_mistake"}, 3=>{"token"=>".", "type"=>"punctuation_mistake"}})
1114
+ #expect(@cc.correct).to eq("{\"0\":{\"Because\":\"no_mistake\"},\"1\":{\"of\":\"missing_word_mistake\"},\"2\":{\"gravity\":\"no_mistake\"},\"3\":{\".\":\"punctuation_mistake\"}}")
1115
+ end
1116
+
1117
+ # it 'Counts the number of mistakes' do
1118
+ # expect(@cc.number_of_mistakes).to eq([])
1119
+ # end
1120
+
1121
+ # it 'Reports the mistakes by mistake type' do
1122
+ # expect(@cc.mistake_report).to eq([])
1123
+ # end
1124
+ end
1125
+
1126
+ context "example correction #054" do
1127
+ before do
1128
+ original_sentence = 'I gots a dog.'
1129
+ corrected_sentence = 'I have a dog.'
1130
+ @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1131
+ end
1132
+
1133
+ it 'Annotates the corrections' do
1134
+ expect(@cc.correct).to eq({0=>{"token"=>"I", "type"=>"no_mistake"}, 1=>{"token"=>"gots", "type"=>"verb_mistake"}, 2=>{"token"=>"have", "type"=>"verb_correction"}, 3=>{"token"=>"a", "type"=>"no_mistake"}, 4=>{"token"=>"dog", "type"=>"no_mistake"}, 5=>{"token"=>".", "type"=>"no_mistake"}})
1135
+ #expect(@cc.correct).to eq("{\"0\":{\"I\":\"no_mistake\"},\"1\":{\"gots\":\"verb_mistake\"},\"2\":{\"have\":\"verb_mistake_correction\"},\"3\":{\"a\":\"no_mistake\"},\"4\":{\"dog\":\"no_mistake\"},\"5\":{\".\":\"no_mistake\"}}")
1136
+ end
1137
+
1138
+ # it 'Counts the number of mistakes' do
1139
+ # expect(@cc.number_of_mistakes).to eq([])
1140
+ # end
1141
+
1142
+ # it 'Reports the mistakes by mistake type' do
1143
+ # expect(@cc.mistake_report).to eq([])
1144
+ # end
1145
+ end
1146
+
1147
+ # context "example correction #055" do
1148
+ # before do
1149
+ # original_sentence = "what's hapen"
1150
+ # corrected_sentence = 'what is happen'
1151
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1152
+ # end
1153
+
1154
+ # it 'Annotates the corrections' do
1155
+ # #expect(@cc.correct).to eq('')
1156
+ # expect(@cc.correct).to eq("{\"0\":{\"whatƪs\":\"stylistic_choice\"},\"1\":{\"what\":\"stylistic_choice_correction\"},\"2\":{\"is\":\"stylistic_choice_correction\"},\"3\":{\"hapen\":\"spelling_mistake\"},\"4\":{\"happen\":\"spelling_mistake_correction\"}}")
1157
+ # end
1158
+
1159
+ # it 'Counts the number of mistakes' do
1160
+ # expect(@cc.number_of_mistakes).to eq([])
1161
+ # end
1162
+
1163
+ # it 'Reports the mistakes by mistake type' do
1164
+ # expect(@cc.mistake_report).to eq([])
1165
+ # end
1166
+ # end
1167
+
1168
+ # context "example correction #056" do
1169
+ # before do
1170
+ # original_sentence = 'what is happen'
1171
+ # corrected_sentence = "what's happen"
1172
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1173
+ # end
1174
+
1175
+ # it 'Annotates the corrections' do
1176
+ # #expect(@cc.correct).to eq('')
1177
+ # expect(@cc.correct).to eq("{\"0\":{\"what\":\"stylistic_choice\"},\"1\":{\"is\":\"stylistic_choice\"},\"2\":{\"whatƪs\":\"stylistic_choice_correction\"},\"3\":{\"happen\":\"no_mistake\"}}")
1178
+ # end
1179
+
1180
+ # it 'Counts the number of mistakes' do
1181
+ # expect(@cc.number_of_mistakes).to eq([])
1182
+ # end
1183
+
1184
+ # it 'Reports the mistakes by mistake type' do
1185
+ # expect(@cc.mistake_report).to eq([])
1186
+ # end
1187
+ # end
1188
+
1189
+ # context "example correction #057" do
1190
+ # before do
1191
+ # original_sentence = "That couldn't happen."
1192
+ # corrected_sentence = 'That could not happen.'
1193
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1194
+ # end
1195
+
1196
+ # it 'Annotates the corrections' do
1197
+ # #expect(@cc.correct).to eq('')
1198
+ # expect(@cc.correct).to eq("{\"0\":{\"That\":\"no_mistake\"},\"1\":{\"couldnƪt happen\":\"stylistic_choice\"},\"2\":{\"could not happen\":\"stylistic_choice_correction\"},\"3\":{\".\":\"no_mistake\"}}")
1199
+ # end
1200
+
1201
+ # it 'Counts the number of mistakes' do
1202
+ # expect(@cc.number_of_mistakes).to eq([])
1203
+ # end
1204
+
1205
+ # it 'Reports the mistakes by mistake type' do
1206
+ # expect(@cc.mistake_report).to eq([])
1207
+ # end
1208
+ # end
1209
+
1210
+ # context "example correction #058" do
1211
+ # before do
1212
+ # original_sentence = 'That could not happen.'
1213
+ # corrected_sentence = "That couldn't happen."
1214
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1215
+ # end
1216
+
1217
+ # it 'Annotates the corrections' do
1218
+ # #expect(@cc.correct).to eq('')
1219
+ # expect(@cc.correct).to eq("{\"0\":{\"That\":\"no_mistake\"},\"1\":{\"could not happen\":\"stylistic_choice\"},\"2\":{\"couldnƪt happen\":\"stylistic_choice_correction\"},\"3\":{\".\":\"no_mistake\"}}")
1220
+ # end
1221
+
1222
+ # it 'Counts the number of mistakes' do
1223
+ # expect(@cc.number_of_mistakes).to eq([])
1224
+ # end
1225
+
1226
+ # it 'Reports the mistakes by mistake type' do
1227
+ # expect(@cc.mistake_report).to eq([])
1228
+ # end
1229
+ # end
1230
+
1231
+ # context "example correction #059" do
1232
+ # before do
1233
+ # original_sentence = 'It was the night before Christmas.'
1234
+ # corrected_sentence = "'Twas the night before Christmas."
1235
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1236
+ # end
1237
+
1238
+ # it 'Annotates the corrections' do
1239
+ # #expect(@cc.correct).to eq('')
1240
+ # expect(@cc.correct).to eq("{\"0\":{\"It\":\"stylistic_choice\"},\"1\":{\"was\":\"stylistic_choice\"},\"2\":{\"ƪTwas\":\"stylistic_choice_correction\"},\"3\":{\"the\":\"no_mistake\"},\"4\":{\"night\":\"no_mistake\"},\"5\":{\"before\":\"no_mistake\"},\"6\":{\"Christmas\":\"no_mistake\"},\"7\":{\".\":\"no_mistake\"}}")
1241
+ # end
1242
+
1243
+ # it 'Counts the number of mistakes' do
1244
+ # expect(@cc.number_of_mistakes).to eq([])
1245
+ # end
1246
+
1247
+ # it 'Reports the mistakes by mistake type' do
1248
+ # expect(@cc.mistake_report).to eq([])
1249
+ # end
1250
+ # end
1251
+
1252
+ # context "example correction #060" do
1253
+ # before do
1254
+ # original_sentence = 'Yesterday, it was the night before Christmas.'
1255
+ # corrected_sentence = "Yesterday, 'twas the night before Christmas."
1256
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1257
+ # end
1258
+
1259
+ # it 'Annotates the corrections' do
1260
+ # #expect(@cc.correct).to eq('')
1261
+ # expect(@cc.correct).to eq("{\"0\":{\"Yesterday\":\"no_mistake\"},\"1\":{\",\":\"no_mistake\"},\"2\":{\"it\":\"stylistic_choice\"},\"3\":{\"was\":\"stylistic_choice\"},\"4\":{\"ƪtwas\":\"stylistic_choice_correction\"},\"5\":{\"the\":\"no_mistake\"},\"6\":{\"night\":\"no_mistake\"},\"7\":{\"before\":\"no_mistake\"},\"8\":{\"Christmas\":\"no_mistake\"},\"9\":{\".\":\"no_mistake\"}}")
1262
+ # end
1263
+
1264
+ # it 'Counts the number of mistakes' do
1265
+ # expect(@cc.number_of_mistakes).to eq([])
1266
+ # end
1267
+
1268
+ # it 'Reports the mistakes by mistake type' do
1269
+ # expect(@cc.mistake_report).to eq([])
1270
+ # end
1271
+ # end
1272
+
1273
+ # context "example correction #061" do
1274
+ # before do
1275
+ # original_sentence = 'Usually we orthopedic surgeon suggest to take a operation which broken fermur neck replace to prosthesis.'
1276
+ # corrected_sentence = 'Usually we orthopedic surgeons will suggest the patient to have an operation which replaces the broken fermur neck with prosthesis.'
1277
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1278
+ # end
1279
+
1280
+ # it 'Annotates the corrections' do
1281
+ # #expect(@cc.correct).to eq('')
1282
+ # expect(@cc.correct).to eq("{\"0\":{\"Usually\":\"no_mistake\"},\"1\":{\"we\":\"no_mistake\"},\"2\":{\"orthopedic\":\"no_mistake\"},\"3\":{\"surgeon\":\"pluralization_mistake\"},\"4\":{\"surgeons\":\"pluralization_mistake_correction\"},\"5\":{\"suggest\":\"verb_mistake\"},\"6\":{\"will suggest\":\"verb_mistake_correction\"},\"7\":{\"to\":\"word_choice_mistake\"},\"8\":{\"the\":\"word_choice_mistake_correction\"},\"9\":{\"patient\":\"missing_word_mistake\"},\"10\":{\"to\":\"missing_word_mistake\"},\"11\":{\"take\":\"verb_mistake\"},\"12\":{\"have\":\"verb_mistake_correction\"},\"13\":{\"a\":\"word_choice_mistake\"},\"14\":{\"an\":\"word_choice_mistake_correction\"},\"15\":{\"operation\":\"no_mistake\"},\"16\":{\"which\":\"no_mistake\"},\"17\":{\"replaces\":\"verb_mistake_correction\"},\"18\":{\"replace\":\"verb_mistake\"},\"19\":{\"the\":\"missing_word_mistake\"},\"20\":{\"to\":\"unnecessary_word_mistake\"},\"21\":{\"broken\":\"word_order_mistake\"},\"22\":{\"fermur\":\"word_order_mistake\"},\"23\":{\"neck\":\"word_order_mistake\"},\"24\":{\"with\":\"missing_word_mistake\"},\"25\":{\"prosthesis\":\"no_mistake\"},\"26\":{\".\":\"no_mistake\"}}")
1283
+ # end
1284
+
1285
+ # it 'Counts the number of mistakes' do
1286
+ # expect(@cc.number_of_mistakes).to eq([])
1287
+ # end
1288
+
1289
+ # it 'Reports the mistakes by mistake type' do
1290
+ # expect(@cc.mistake_report).to eq([])
1291
+ # end
1292
+ # end
1293
+
1294
+ # context "example correction #062" do
1295
+ # before do
1296
+ # original_sentence = 'and I explained the x-ray result and I let her to hospitalize my hospital.'
1297
+ # corrected_sentence = 'I explained the x-ray result and I hospitalized her at my hospital.'
1298
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1299
+ # end
1300
+
1301
+ # it 'Annotates the corrections' do
1302
+ # #expect(@cc.correct).to eq('')
1303
+ # expect(@cc.correct).to eq("{\"0\":{\"But\":\"no_mistake\"},\"1\":{\"she\":\"no_mistake\"},\"2\":{\"had\":\"no_mistake\"},\"3\":{\"some\":\"no_mistake\"},\"4\":{\"difficulty\":\"no_mistake\"},\"5\":{\"in\":\"no_mistake\"},\"6\":{\"her\":\"no_mistake\"},\"7\":{\"condition\":\"no_mistake\"},\"8\":{\":\":\"no_mistake\"},\"9\":{\"heart\":\"no_mistake\"},\"10\":{\"ischemia\":\"no_mistake\"},\"11\":{\"which\":\"no_mistake\"},\"12\":{\"had\":\"no_mistake\"},\"13\":{\"recently\":\"no_mistake\"},\"14\":{\"operation\":\"no_mistake\"},\"15\":{\"of\":\"no_mistake\"},\"16\":{\"PCI\":\"no_mistake\"},\"17\":{\",\":\"no_mistake\"},\"18\":{\"COPD\":\"no_mistake\"},\"19\":{\":\":\"no_mistake\"},\"20\":{\"chornic\":\"spelling_mistake\"},\"21\":{\"chronic\":\"spelling_mistake_correction\"},\"22\":{\"objective\":\"no_mistake\"},\"23\":{\"pulmpnary\":\"spelling_mistake\"},\"24\":{\"pulmonary\":\"spelling_mistake_correction\"},\"25\":{\"disease\":\"no_mistake\"},\"26\":{\",\":\"no_mistake\"},\"27\":{\"chornic\":\"spelling_mistake\"},\"28\":{\"chronic\":\"spelling_mistake_correction\"},\"29\":{\"kidney\":\"no_mistake\"},\"30\":{\"failure\":\"no_mistake\"},\"31\":{\"which\":\"no_mistake\"},\"32\":{\"had\":\"unnecessary_word_mistake\"},\"33\":{\"had treated\":\"verb_mistake\"},\"34\":{\"had been treated\":\"verb_mistake_correction\"},\"35\":{\"on\":\"word_choice_mistake\"},\"36\":{\"with\":\"word_choice_mistake_correction\"},\"37\":{\"regular\":\"no_mistake\"},\"38\":{\"hemodyalisis\":\"no_mistake\"},\"39\":{\"for\":\"no_mistake\"},\"40\":{\"some\":\"no_mistake\"},\"41\":{\"decade\":\"pluralization_mistake\"},\"42\":{\"decades\":\"pluralization_mistake_correction\"},\"43\":{\".\":\"no_mistake\"}}")
1304
+ # end
1305
+
1306
+ # it 'Counts the number of mistakes' do
1307
+ # expect(@cc.number_of_mistakes).to eq([])
1308
+ # end
1309
+
1310
+ # it 'Reports the mistakes by mistake type' do
1311
+ # expect(@cc.mistake_report).to eq([])
1312
+ # end
1313
+ # end
1314
+
1315
+ # context "example correction #063" do
1316
+ # before do
1317
+ # original_sentence = 'But she had some difficulty in her condition: heart ischemia which had recently operation of PCI, COPD: chornic objective pulmpnary disease, chornic kidney failure which had had treated on regular hemodyalisis for some decade.'
1318
+ # corrected_sentence = 'But she had some difficulty in her condition: heart ischemia which had recently operation of PCI, COPD: chronic objective pulmonary disease, chronic kidney failure which had been treated with regular hemodyalisis for some decades.'
1319
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1320
+ # end
1321
+
1322
+ # it 'Annotates the corrections' do
1323
+ # #expect(@cc.correct).to eq('')
1324
+ # expect(@cc.correct).to eq("{\"0\":{\"If\":\"no_mistake\"},\"1\":{\"she\":\"no_mistake\"},\"2\":{\"cannot\":\"no_mistake\"},\"3\":{\"be\":\"unnecessary_word_mistake\"},\"4\":{\"take\":\"verb_mistake\"},\"5\":{\"have\":\"verb_mistake_correction\"},\"6\":{\"the\":\"no_mistake\"},\"7\":{\"operation\":\"no_mistake\"},\"8\":{\",\":\"no_mistake\"},\"9\":{\"she\":\"no_mistake\"},\"10\":{\"usually\":\"unnecessary_word_mistake\"},\"11\":{\"cannot\":\"unnecessary_word_mistake\"},\"12\":{\"probably\":\"missing_word_mistake\"},\"13\":{\"will not be\":\"missing_word_mistake\"},\"14\":{\"able\":\"missing_word_mistake\"},\"15\":{\"to\":\"missing_word_mistake\"},\"16\":{\"walk\":\"no_mistake\"},\"17\":{\"at\":\"no_mistake\"},\"18\":{\"all\":\"no_mistake\"},\"19\":{\"and\":\"no_mistake\"},\"20\":{\"needs\":\"unnecessary_word_mistake\"},\"21\":{\"any\":\"unnecessary_word_mistake\"},\"22\":{\"other’s\":\"unnecessary_word_mistake\"},\"23\":{\"will need\":\"missing_word_mistake\"},\"24\":{\"another\":\"missing_word_mistake\"},\"25\":{\"personƪs\":\"missing_word_mistake\"},\"26\":{\"help\":\"no_mistake\"},\"27\":{\"forever\":\"no_mistake\"},\"28\":{\".\":\"no_mistake\"}}")
1325
+ # end
1326
+
1327
+ # it 'Counts the number of mistakes' do
1328
+ # expect(@cc.number_of_mistakes).to eq([])
1329
+ # end
1330
+
1331
+ # it 'Reports the mistakes by mistake type' do
1332
+ # expect(@cc.mistake_report).to eq([])
1333
+ # end
1334
+ # end
1335
+
1336
+ # context "example correction #064" do
1337
+ # before do
1338
+ # original_sentence = 'If she cannot be take the operation, she usually cannot walk at all and needs any other’s help forever.'
1339
+ # corrected_sentence = "If she cannot have the operation, she probably will not be able to walk at all and will need another person's help forever."
1340
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1341
+ # end
1342
+
1343
+ # it 'Annotates the corrections' do
1344
+ # #expect(@cc.correct).to eq('')
1345
+ # expect(@cc.correct).to eq([])
1346
+ # end
1347
+
1348
+ # it 'Counts the number of mistakes' do
1349
+ # expect(@cc.number_of_mistakes).to eq([])
1350
+ # end
1351
+
1352
+ # it 'Reports the mistakes by mistake type' do
1353
+ # expect(@cc.mistake_report).to eq([])
1354
+ # end
1355
+ # end
1356
+
1357
+ # context "example correction #065" do
1358
+ # before do
1359
+ # original_sentence = 'That is why I recommend her and her family to take the operation even if she has a lot of disease.'
1360
+ # corrected_sentence = 'That is why I recommend her and her family to have the operation even if she has a lot of diseases.'
1361
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1362
+ # end
1363
+
1364
+ # it 'Annotates the corrections' do
1365
+ # #expect(@cc.correct).to eq('')
1366
+ # expect(@cc.correct).to eq([])
1367
+ # end
1368
+
1369
+ # it 'Counts the number of mistakes' do
1370
+ # expect(@cc.number_of_mistakes).to eq([])
1371
+ # end
1372
+
1373
+ # it 'Reports the mistakes by mistake type' do
1374
+ # expect(@cc.mistake_report).to eq([])
1375
+ # end
1376
+ # end
1377
+
1378
+ # context "example correction #066" do
1379
+ # before do
1380
+ # original_sentence = 'But my superior boss should not to take the operation careless.'
1381
+ # corrected_sentence = 'But my superior boss said not to take the operation carelessly.'
1382
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1383
+ # end
1384
+
1385
+ # it 'Annotates the corrections' do
1386
+ # #expect(@cc.correct).to eq('')
1387
+ # expect(@cc.correct).to eq([])
1388
+ # end
1389
+
1390
+ # it 'Counts the number of mistakes' do
1391
+ # expect(@cc.number_of_mistakes).to eq([])
1392
+ # end
1393
+
1394
+ # it 'Reports the mistakes by mistake type' do
1395
+ # expect(@cc.mistake_report).to eq([])
1396
+ # end
1397
+ # end
1398
+
1399
+ # context "example correction #067" do
1400
+ # before do
1401
+ # original_sentence = 'The boss and group had the experience the death of a patient after the operation in 3 week.'
1402
+ # corrected_sentence = 'The boss and group had the experience of the death of a patient 3 weeks after the operation.'
1403
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1404
+ # end
1405
+
1406
+ # it 'Annotates the corrections' do
1407
+ #expect(@cc.correct).to eq('')
1408
+ # expect(@cc.correct).to eq([])
1409
+ # end
1410
+
1411
+ # it 'Counts the number of mistakes' do
1412
+ # expect(@cc.number_of_mistakes).to eq([])
1413
+ # end
1414
+
1415
+ # it 'Reports the mistakes by mistake type' do
1416
+ # expect(@cc.mistake_report).to eq([])
1417
+ # end
1418
+ # end
1419
+
1420
+ # context "example correction #068" do
1421
+ # before do
1422
+ # original_sentence = 'At the time, the boss and our group was accused by sudden death.'
1423
+ # corrected_sentence = 'At the time, the boss and our group were accused of sudden death.'
1424
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1425
+ # end
1426
+
1427
+ # it 'Annotates the corrections' do
1428
+ #expect(@cc.correct).to eq('')
1429
+ # expect(@cc.correct).to eq([])
1430
+ # end
1431
+
1432
+ # it 'Counts the number of mistakes' do
1433
+ # expect(@cc.number_of_mistakes).to eq([])
1434
+ # end
1435
+
1436
+ # it 'Reports the mistakes by mistake type' do
1437
+ # expect(@cc.mistake_report).to eq([])
1438
+ # end
1439
+ # end
1440
+
1441
+ # context "example correction #069" do
1442
+ # before do
1443
+ # original_sentence = 'Even if the family and the patients understood the explain, the result was bad, the family complained the result.'
1444
+ # corrected_sentence = 'Even if the family and the patients understood the explanation, the result was bad, and the family complained about the result.'
1445
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1446
+ # end
1447
+
1448
+ # it 'Annotates the corrections' do
1449
+ #expect(@cc.correct).to eq('')
1450
+ # expect(@cc.correct).to eq([])
1451
+ # end
1452
+
1453
+ # it 'Counts the number of mistakes' do
1454
+ # expect(@cc.number_of_mistakes).to eq([])
1455
+ # end
1456
+
1457
+ # it 'Reports the mistakes by mistake type' do
1458
+ # expect(@cc.mistake_report).to eq([])
1459
+ # end
1460
+ # end
1461
+
1462
+ # context "example correction #070" do
1463
+ # before do
1464
+ # original_sentence = 'Me and Bill went to the store.'
1465
+ # corrected_sentence = 'Bill and I went to the store.'
1466
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1467
+ # end
1468
+
1469
+ # it 'Annotates the corrections' do
1470
+ #expect(@cc.correct).to eq('')
1471
+ # expect(@cc.correct).to eq([])
1472
+ # end
1473
+
1474
+ # it 'Counts the number of mistakes' do
1475
+ # expect(@cc.number_of_mistakes).to eq([])
1476
+ # end
1477
+
1478
+ # it 'Reports the mistakes by mistake type' do
1479
+ # expect(@cc.mistake_report).to eq([])
1480
+ # end
1481
+ # end
1482
+
1483
+ # context "example correction #071" do
1484
+ # before do
1485
+ # original_sentence = 'In my situation, I feel a little anger, when my child will not ignore about our suggestion, or favors, however, I do not want to ignore about my child or beat him.'
1486
+ # corrected_sentence = 'In my situation, I feel a little anger, when my child ignores our suggestion, or favors, however, I do not want to ignore my child or beat him.'
1487
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1488
+ # end
1489
+
1490
+ # it 'Annotates the corrections' do
1491
+ #expect(@cc.correct).to eq('')
1492
+ # expect(@cc.correct).to eq([])
1493
+ # end
1494
+
1495
+ # it 'Counts the number of mistakes' do
1496
+ # expect(@cc.number_of_mistakes).to eq([])
1497
+ # end
1498
+
1499
+ # it 'Reports the mistakes by mistake type' do
1500
+ # expect(@cc.mistake_report).to eq([])
1501
+ # end
1502
+ # end
1503
+
1504
+ # context "example correction #072" do
1505
+ # before do
1506
+ # original_sentence = 'in my experience, it is one of the good parents skill to endure our children trickery behavior or fretting attitude.'
1507
+ # corrected_sentence = "In my experience, it is one of the good parents skill to endure our children's trickery or fretting attitude."
1508
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1509
+ # end
1510
+
1511
+ # it 'Annotates the corrections' do
1512
+ #expect(@cc.correct).to eq('')
1513
+ # expect(@cc.correct).to eq([])
1514
+ # end
1515
+
1516
+ # it 'Counts the number of mistakes' do
1517
+ # expect(@cc.number_of_mistakes).to eq([])
1518
+ # end
1519
+
1520
+ # it 'Reports the mistakes by mistake type' do
1521
+ # expect(@cc.mistake_report).to eq([])
1522
+ # end
1523
+ # end
1524
+
1525
+ # context "example correction #073" do
1526
+ # before do
1527
+ # original_sentence = 'When he gets tired or has a unwillingness to do, he gets anger, or not to obey my suggestion.'
1528
+ # corrected_sentence = 'When he gets tired or has an unwillingness to do something, he gets angry, or does not obey my suggestion.'
1529
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1530
+ # end
1531
+
1532
+ # it 'Annotates the corrections' do
1533
+ #expect(@cc.correct).to eq('')
1534
+ # expect(@cc.correct).to eq([])
1535
+ # end
1536
+
1537
+ # it 'Counts the number of mistakes' do
1538
+ # expect(@cc.number_of_mistakes).to eq([])
1539
+ # end
1540
+
1541
+ # it 'Reports the mistakes by mistake type' do
1542
+ # expect(@cc.mistake_report).to eq([])
1543
+ # end
1544
+ # end
1545
+
1546
+ # context "example correction #074" do
1547
+ # before do
1548
+ # original_sentence = 'And I feel always to anger, I always hold his body tightly.'
1549
+ # corrected_sentence = 'And I always feel anger, and I always hold his body tightly.'
1550
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1551
+ # end
1552
+
1553
+ # it 'Annotates the corrections' do
1554
+ #expect(@cc.correct).to eq('')
1555
+ # expect(@cc.correct).to eq([])
1556
+ # end
1557
+
1558
+ # it 'Counts the number of mistakes' do
1559
+ # expect(@cc.number_of_mistakes).to eq([])
1560
+ # end
1561
+
1562
+ # it 'Reports the mistakes by mistake type' do
1563
+ # expect(@cc.mistake_report).to eq([])
1564
+ # end
1565
+ # end
1566
+
1567
+ # context "example correction #075" do
1568
+ # before do
1569
+ # original_sentence = 'I think that it is difficult to be endure children rude behavior, therefore the skill to endure is one of the skill to be a good parents.'
1570
+ # corrected_sentence = "I think that it is difficult to endure children's rude behavior, therefore the skill to endure is one of the skills to be a good parent."
1571
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1572
+ # end
1573
+
1574
+ # it 'Annotates the corrections' do
1575
+ #expect(@cc.correct).to eq('')
1576
+ # expect(@cc.correct).to eq([])
1577
+ # end
1578
+
1579
+ # it 'Counts the number of mistakes' do
1580
+ # expect(@cc.number_of_mistakes).to eq([])
1581
+ # end
1582
+
1583
+ # it 'Reports the mistakes by mistake type' do
1584
+ # expect(@cc.mistake_report).to eq([])
1585
+ # end
1586
+ # end
1587
+
1588
+ # context "example correction #076" do
1589
+ # before do
1590
+ # original_sentence = 'That is the Smiths car.'
1591
+ # corrected_sentence = "That is the Smiths' car."
1592
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1593
+ # end
1594
+
1595
+ # it 'Annotates the corrections' do
1596
+ #expect(@cc.correct).to eq('')
1597
+ # expect(@cc.correct).to eq([])
1598
+ # end
1599
+
1600
+ # it 'Counts the number of mistakes' do
1601
+ # expect(@cc.number_of_mistakes).to eq([])
1602
+ # end
1603
+
1604
+ # it 'Reports the mistakes by mistake type' do
1605
+ # expect(@cc.mistake_report).to eq([])
1606
+ # end
1607
+ # end
1608
+
1609
+ # context "example correction #077" do
1610
+ # before do
1611
+ # original_sentence = 'That is Bens car.'
1612
+ # corrected_sentence = "That is Ben's car."
1613
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1614
+ # end
1615
+
1616
+ # it 'Annotates the corrections' do
1617
+ #expect(@cc.correct).to eq('')
1618
+ # expect(@cc.correct).to eq([])
1619
+ # end
1620
+
1621
+ # it 'Counts the number of mistakes' do
1622
+ # expect(@cc.number_of_mistakes).to eq([])
1623
+ # end
1624
+
1625
+ # it 'Reports the mistakes by mistake type' do
1626
+ # expect(@cc.mistake_report).to eq([])
1627
+ # end
1628
+ # end
1629
+
1630
+ # context "example correction #078" do
1631
+ # before do
1632
+ # original_sentence = "Quieting is is so peaceful when you don't have to be quieted students so they sit quiets."
1633
+ # corrected_sentence = "The quiet is so peaceful when you don't have to be quieting students so they sit quietly."
1634
+ # @cc = ChatCorrect::Correct.new(original_sentence: original_sentence, corrected_sentence: corrected_sentence)
1635
+ # end
1636
+
1637
+ # it 'Annotates the corrections' do
1638
+ #expect(@cc.correct).to eq('')
1639
+ # expect(@cc.correct).to eq([])
1640
+ # end
1641
+
1642
+ # it 'Counts the number of mistakes' do
1643
+ # expect(@cc.number_of_mistakes).to eq([])
1644
+ # end
1645
+
1646
+ # it 'Reports the mistakes by mistake type' do
1647
+ # expect(@cc.mistake_report).to eq([])
1648
+ # end
1649
+ # end
1650
+ end