zenlish 0.2.06 → 0.2.07

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +48 -275
  3. data/CHANGELOG.md +8 -0
  4. data/LICENSE.txt +1 -1
  5. data/lib/zenlish/feature/feature_struct_def.rb +0 -2
  6. data/lib/zenlish/inflect/output_expression.rb +4 -0
  7. data/lib/zenlish/version.rb +1 -1
  8. data/lib/zenlish/wclasses/irregular_verb_extension.rb +0 -1
  9. data/lib/zenlish.rb +3 -3
  10. data/spec/zenlish/feature/boolean_domain_spec.rb +14 -14
  11. data/spec/zenlish/feature/boolean_value_spec.rb +6 -5
  12. data/spec/zenlish/feature/enumeration_domain_spec.rb +16 -16
  13. data/spec/zenlish/feature/feature_def_spec.rb +15 -14
  14. data/spec/zenlish/feature/feature_spec.rb +16 -16
  15. data/spec/zenlish/feature/feature_struct_def_bearer_spec.rb +16 -16
  16. data/spec/zenlish/feature/feature_struct_def_spec.rb +23 -23
  17. data/spec/zenlish/feature/identifier_domain_spec.rb +12 -12
  18. data/spec/zenlish/feature/identifier_value_spec.rb +6 -5
  19. data/spec/zenlish/feature/symbol_value_spec.rb +6 -5
  20. data/spec/zenlish/inflect/concatenation_spec.rb +8 -8
  21. data/spec/zenlish/inflect/equals_literal_spec.rb +17 -16
  22. data/spec/zenlish/inflect/feature_heading_spec.rb +14 -13
  23. data/spec/zenlish/inflect/formal_argument_spec.rb +5 -5
  24. data/spec/zenlish/inflect/function_call_spec.rb +8 -9
  25. data/spec/zenlish/inflect/inflection_rule_spec.rb +20 -20
  26. data/spec/zenlish/inflect/inflection_table_builder_spec.rb +37 -37
  27. data/spec/zenlish/inflect/inflection_table_spec.rb +33 -32
  28. data/spec/zenlish/inflect/input_asis_spec.rb +10 -9
  29. data/spec/zenlish/inflect/literal_asis_spec.rb +7 -7
  30. data/spec/zenlish/inflect/matches_pattern_spec.rb +15 -14
  31. data/spec/zenlish/inflect/membership_spec.rb +16 -15
  32. data/spec/zenlish/inflect/method_heading_spec.rb +12 -11
  33. data/spec/zenlish/inflect/not_equals_literal_spec.rb +17 -16
  34. data/spec/zenlish/inflect/substitution_spec.rb +9 -10
  35. data/spec/zenlish/inflect/unconditionally_true_spec.rb +7 -5
  36. data/spec/zenlish/lang/dictionary_spec.rb +17 -19
  37. data/spec/zenlish/lang/lemmatizer_spec.rb +23 -23
  38. data/spec/zenlish/lang/zenlish_grammar_spec.rb +3 -3
  39. data/spec/zenlish/lex/empty_lexicon_factory_spec.rb +8 -8
  40. data/spec/zenlish/lex/lexeme_spec.rb +18 -18
  41. data/spec/zenlish/lex/lexical_entry_spec.rb +14 -13
  42. data/spec/zenlish/lex/lexicon_spec.rb +44 -43
  43. data/spec/zenlish/lex/literal_spec.rb +6 -6
  44. data/spec/zenlish/lexer/lexer_spec.rb +10 -10
  45. data/spec/zenlish/parser/lesson1_spec.rb +79 -79
  46. data/spec/zenlish/parser/lesson2_spec.rb +102 -102
  47. data/spec/zenlish/parser/lesson3_spec.rb +89 -89
  48. data/spec/zenlish/parser/zparser_spec.rb +6 -6
  49. data/spec/zenlish/support/var2word.rb +0 -2
  50. data/spec/zenlish/trie/base_trie_node_spec.rb +11 -11
  51. data/spec/zenlish/trie/trie_spec.rb +46 -46
  52. data/spec/zenlish/wclasses/common_noun_spec.rb +9 -9
  53. data/spec/zenlish/wclasses/demonstrative_determiner_spec.rb +11 -11
  54. data/spec/zenlish/wclasses/irregular_verb_can_spec.rb +10 -10
  55. data/spec/zenlish/wclasses/irregular_verb_extension_spec.rb +10 -10
  56. data/spec/zenlish/wclasses/irregular_verb_spec.rb +19 -19
  57. data/spec/zenlish/wclasses/lexical_verb_spec.rb +7 -7
  58. data/spec/zenlish/wclasses/modal_verb_can_spec.rb +9 -9
  59. data/spec/zenlish/wclasses/noun_spec.rb +7 -7
  60. data/spec/zenlish/wclasses/personal_pronoun_spec.rb +15 -15
  61. data/spec/zenlish/wclasses/possessive_determiner_spec.rb +15 -15
  62. data/spec/zenlish/wclasses/preposition_spec.rb +5 -5
  63. data/spec/zenlish/wclasses/proper_noun_spec.rb +3 -3
  64. data/spec/zenlish/wclasses/regular_verb_spec.rb +12 -12
  65. data/spec/zenlish/wclasses/regular_verb_want_spec.rb +7 -7
  66. data/spec/zenlish/wclasses/verb_spec.rb +9 -9
  67. data/spec/zenlish_spec.rb +1 -1
  68. data/zenlish.gemspec +6 -5
  69. metadata +32 -16
@@ -9,321 +9,321 @@ module Zenlish
9
9
  describe ZParser do
10
10
  include Var2Word
11
11
 
12
- subject { ZParser.new }
12
+ subject(:parser) { described_class.new }
13
13
 
14
14
  context 'Parsing lesson 1:' do
15
- it 'should parse sample sentences from lesson 1-A' do
15
+ it 'parses sample sentences from lesson 1-A' do
16
16
  # Sentence 1-01: "Tony sees Lisa."
17
17
  # in absence of a tokenizer, we create a sequence of literals by hand...
18
18
  literals = [tony, sees, lisa, dot]
19
- expect { subject.to_pforest(literals) }.not_to raise_error
19
+ expect { parser.to_pforest(literals) }.not_to raise_error
20
20
 
21
21
  # Sentence 1-02a: "Tony sees something."
22
22
  sentence_literals = [tony, sees, something, dot]
23
- expect { subject.to_pforest(sentence_literals) }.not_to raise_error
23
+ expect { parser.to_pforest(sentence_literals) }.not_to raise_error
24
24
 
25
25
  # Sentence 1-02b: "Lisa sees something."
26
26
  sentence_literals = [lisa, sees, something, dot]
27
- expect { subject.to_pforest(sentence_literals) }.not_to raise_error
27
+ expect { parser.to_pforest(sentence_literals) }.not_to raise_error
28
28
 
29
29
  # Sentence 1-03: "Tony sees this thing."
30
30
  sentence_literals = [tony, sees, this, thing, dot]
31
- expect { subject.to_pforest(sentence_literals) }.not_to raise_error
31
+ expect { parser.to_pforest(sentence_literals) }.not_to raise_error
32
32
 
33
33
  # Sentence 1-04: "Lisa sees the other thing."
34
34
  sentence_literals = [lisa, sees, the, other, thing, dot]
35
- expect { subject.to_pforest(sentence_literals) }.not_to raise_error
35
+ expect { parser.to_pforest(sentence_literals) }.not_to raise_error
36
36
  end
37
37
 
38
- it 'should parse sample sentences from lesson 1-B' do
38
+ it 'parses sample sentences from lesson 1-B' do
39
39
  # Sentence 1-05a: "Lisa sees the same thing."
40
40
  literals = [lisa, sees, the, same, thing, dot]
41
- expect { subject.to_pforest(literals) }.not_to raise_error
41
+ expect { parser.to_pforest(literals) }.not_to raise_error
42
42
 
43
43
  # Sentence 1-05b: "Lisa sees the same thing as Tony sees."
44
44
  literals = [lisa, sees, the, same, thing, as, tony, sees, dot]
45
45
  # same is an adjective of equality comparison
46
46
  # as is part of same ... as combination
47
47
  # it introduces a comparative clause
48
- expect { subject.to_pforest(literals) }.not_to raise_error
48
+ expect { parser.to_pforest(literals) }.not_to raise_error
49
49
 
50
50
  # Sentence 1-06: "Tony sees one thing."
51
51
  literals = [tony, sees, one, thing, dot]
52
- expect { subject.to_pforest(literals) }.not_to raise_error
52
+ expect { parser.to_pforest(literals) }.not_to raise_error
53
53
 
54
54
  # Sentence 1-07: "Lisa sees two things."
55
55
  literals = [lisa, sees, two, things, dot]
56
- expect { subject.to_pforest(literals) }.not_to raise_error
56
+ expect { parser.to_pforest(literals) }.not_to raise_error
57
57
 
58
58
  # Sentence 1-08a: "Tony sees one person."
59
59
  literals = [tony, sees, one, person, dot]
60
- expect { subject.to_pforest(literals) }.not_to raise_error
60
+ expect { parser.to_pforest(literals) }.not_to raise_error
61
61
 
62
62
  # Sentence 1-08b: "Lisa sees two people."
63
63
  literals = [lisa, sees, two, people, dot]
64
- expect { subject.to_pforest(literals) }.not_to raise_error
64
+ expect { parser.to_pforest(literals) }.not_to raise_error
65
65
 
66
66
  # Sentence 1-05b: "Tony sees the same person as Lisa sees."
67
67
  literals = [tony, sees, the, same, person, as, lisa, sees, dot]
68
68
  # same is an adjective of equality comparison
69
69
  # as is part of same ... as combination
70
70
  # it introduces a comparative clause
71
- expect { subject.to_pforest(literals) }.not_to raise_error
71
+ expect { parser.to_pforest(literals) }.not_to raise_error
72
72
  end
73
73
 
74
- it 'should parse sample sentences from lesson 1-C' do
74
+ it 'parses sample sentences from lesson 1-C' do
75
75
  # Sentence 1-09a: "Tony sees many things."
76
76
  literals = [tony, sees, many, things, dot]
77
- expect { subject.to_pforest(literals) }.not_to raise_error
77
+ expect { parser.to_pforest(literals) }.not_to raise_error
78
78
 
79
79
  # Sentence 1-09b: "Lisa sees many people."
80
80
  literals = [lisa, sees, many, people, dot]
81
- expect { subject.to_pforest(literals) }.not_to raise_error
81
+ expect { parser.to_pforest(literals) }.not_to raise_error
82
82
 
83
83
  # Sentence 1-10: "Tony is inside this thing."
84
84
  literals = [tony, is, inside, this, thing, dot]
85
- expect { subject.to_pforest(literals) }.not_to raise_error
85
+ expect { parser.to_pforest(literals) }.not_to raise_error
86
86
 
87
87
  # Sentence 1-11: "Lisa is not inside this thing."
88
88
  literals = [lisa, is, not_, inside, this, thing, dot]
89
- expect { subject.to_pforest(literals) }.not_to raise_error
89
+ expect { parser.to_pforest(literals) }.not_to raise_error
90
90
 
91
91
  # Sentence: "Lisa does not see people inside the other thing."
92
92
  literals = [lisa, does_aux, not_, see, people, inside, the, other, thing, dot]
93
93
  # Ambiguous parse...
94
- expect { subject.to_pforest(literals) }.not_to raise_error
94
+ expect { parser.to_pforest(literals) }.not_to raise_error
95
95
  end
96
96
 
97
- it 'should parse sample sentences from lesson 1-D' do
97
+ it 'parses sample sentences from lesson 1-D' do
98
98
  # Sentence 1-12a: "Some of these people are inside this thing."
99
99
  literals = [some, of, these, people, are, inside, this, thing, dot]
100
- expect { subject.to_pforest(literals) }.not_to raise_error
100
+ expect { parser.to_pforest(literals) }.not_to raise_error
101
101
 
102
102
  # Sentence 1-12b: "Some of these people are not inside this thing."
103
103
  literals = [some, of, these, people, are, not_, inside, this, thing, dot]
104
- expect { subject.to_pforest(literals) }.not_to raise_error
104
+ expect { parser.to_pforest(literals) }.not_to raise_error
105
105
 
106
106
  # Sentence 1-13: "All of these people are inside this thing."
107
107
  literals = [all, of, these, people, are, not_, inside, this, thing, dot]
108
- expect { subject.to_pforest(literals) }.not_to raise_error
108
+ expect { parser.to_pforest(literals) }.not_to raise_error
109
109
 
110
110
  # Sentence 1-14a: "There are two people inside one of these things."
111
111
  literals = [there, are, two, people, inside, one, of, these, things, dot]
112
- expect { subject.to_pforest(literals) }.not_to raise_error
112
+ expect { parser.to_pforest(literals) }.not_to raise_error
113
113
 
114
114
  # Sentence 1-14b: "There are not people inside the other thing."
115
115
  literals = [there, are, not_, people, inside, the, other, thing, dot]
116
- expect { subject.to_pforest(literals) }.not_to raise_error
116
+ expect { parser.to_pforest(literals) }.not_to raise_error
117
117
 
118
118
  # Sentence 1-15a: "There are many people inside this thing."
119
119
  literals = [there, are, many, people, inside, this, thing, dot]
120
- expect { subject.to_pforest(literals) }.not_to raise_error
120
+ expect { parser.to_pforest(literals) }.not_to raise_error
121
121
 
122
122
  # Sentence 1-15b: "There are more people inside this thing."
123
123
  literals = [there, are, more, people, inside, this, thing, dot]
124
- expect { subject.to_pforest(literals) }.not_to raise_error
124
+ expect { parser.to_pforest(literals) }.not_to raise_error
125
125
 
126
126
  # Sentence 1-15c: "There are more people inside the other thing
127
127
  # than there are inside this thing."
128
128
  literals = [there, are, more, people, inside, the, other, thing,
129
129
  than, there, are, inside, this, thing, dot]
130
130
  # Ambiguous parse
131
- expect { subject.to_pforest(literals) }.not_to raise_error
131
+ expect { parser.to_pforest(literals) }.not_to raise_error
132
132
  end
133
133
 
134
- it 'should parse sample sentences from lesson 1-E' do
134
+ it 'parses sample sentences from lesson 1-E' do
135
135
  # Sentence 1-16a: "Two of these things are alive."
136
136
  literals = [two, of, these, things, are, alive, dot]
137
- expect { subject.to_pforest(literals) }.not_to raise_error
137
+ expect { parser.to_pforest(literals) }.not_to raise_error
138
138
 
139
139
  # Sentence 1-16b: "One of these things is not alive."
140
140
  literals = [one, of, these, things, is, not_, alive, dot]
141
- expect { subject.to_pforest(literals) }.not_to raise_error
141
+ expect { parser.to_pforest(literals) }.not_to raise_error
142
142
 
143
143
  # Sentence 1-17a: "Tony sees some living things."
144
144
  literals = [tony, sees, some, living, things, dot]
145
- expect { subject.to_pforest(literals) }.not_to raise_error
145
+ expect { parser.to_pforest(literals) }.not_to raise_error
146
146
 
147
147
  # Sentence 1-17b: "Two of these things are big."
148
148
  literals = [two, of, these, things, are, big, dot]
149
- expect { subject.to_pforest(literals) }.not_to raise_error
149
+ expect { parser.to_pforest(literals) }.not_to raise_error
150
150
 
151
151
  # Sentence 1-17c: "One of these things is not big."
152
152
  literals = [one, of, these, things, is, not_, big, dot]
153
- expect { subject.to_pforest(literals) }.not_to raise_error
153
+ expect { parser.to_pforest(literals) }.not_to raise_error
154
154
 
155
155
  # Sentence 1-18a: "Tony sees some living things."
156
156
  literals = [tony, sees, some, living, things, dot]
157
- expect { subject.to_pforest(literals) }.not_to raise_error
157
+ expect { parser.to_pforest(literals) }.not_to raise_error
158
158
 
159
159
  # Sentence 1-18b: "One of these is big."
160
160
  literals = [one, of, these_as_pronoun, is, big, dot]
161
- expect { subject.to_pforest(literals) }.not_to raise_error
161
+ expect { parser.to_pforest(literals) }.not_to raise_error
162
162
 
163
163
  # Sentence 1-18c: "Two of these are small."
164
164
  literals = [two, of, these_as_pronoun, are, small, dot]
165
- expect { subject.to_pforest(literals) }.not_to raise_error
165
+ expect { parser.to_pforest(literals) }.not_to raise_error
166
166
 
167
167
  # Sentence 1-19a: "Tony sees one living thing."
168
168
  literals = [tony, sees, one, living, thing, dot]
169
- expect { subject.to_pforest(literals) }.not_to raise_error
169
+ expect { parser.to_pforest(literals) }.not_to raise_error
170
170
 
171
171
  # Sentence 1-19b: "This one is very big."
172
172
  literals = [this_one, is, very, big, dot]
173
- expect { subject.to_pforest(literals) }.not_to raise_error
173
+ expect { parser.to_pforest(literals) }.not_to raise_error
174
174
 
175
175
  # Sentence: "This thing is bigger than the other thing."
176
176
  literals = [this, thing, is, bigger, than, the, other, thing, dot]
177
- expect { subject.to_pforest(literals) }.not_to raise_error
177
+ expect { parser.to_pforest(literals) }.not_to raise_error
178
178
 
179
179
  # Sentence: "This thing is smaller than the other thing."
180
180
  literals = [this, thing, is, smaller, than, the, other, thing, dot]
181
- expect { subject.to_pforest(literals) }.not_to raise_error
181
+ expect { parser.to_pforest(literals) }.not_to raise_error
182
182
  end
183
183
 
184
- it 'should parse sample sentences from lesson 1-F' do
184
+ it 'parses sample sentences from lesson 1-F' do
185
185
  # Sentence 1-20a: "Tony sees some living things."
186
186
  literals = [tony, sees, some, living, things, dot]
187
- expect { subject.to_pforest(literals) }.not_to raise_error
187
+ expect { parser.to_pforest(literals) }.not_to raise_error
188
188
 
189
189
  # Sentence 1-20b: "Two of these are the same kind of living thing."
190
190
  literals = [these_as_pronoun, are, the, same, kind, of, living, thing, dot]
191
- expect { subject.to_pforest(literals) }.not_to raise_error
191
+ expect { parser.to_pforest(literals) }.not_to raise_error
192
192
 
193
193
  # Sentence 1-20c: "One of these is not the same kind as the other two."
194
194
  literals = [one, of, these_as_pronoun, is, not_, the, same, kind,
195
195
  as, the, other, two_as_pronoun, dot]
196
- expect { subject.to_pforest(literals) }.not_to raise_error
196
+ expect { parser.to_pforest(literals) }.not_to raise_error
197
197
 
198
198
  # Sentence 1-21a: "There is one person inside this thing."
199
199
  literals = [there, is, one, person, inside, this, thing, dot]
200
- expect { subject.to_pforest(literals) }.not_to raise_error
200
+ expect { parser.to_pforest(literals) }.not_to raise_error
201
201
 
202
202
  # Sentence 1-21b: "If Tony is not inside this thing, then another person is inside."
203
203
  literals = [if_, tony, is, not_, inside, this, thing, comma, then_,
204
204
  another, person, is, inside, dot]
205
205
  # Ambiguous parse
206
- expect { subject.to_pforest(literals) }.not_to raise_error
206
+ expect { parser.to_pforest(literals) }.not_to raise_error
207
207
 
208
208
  # Sentence 1-22a: "Tony is touching something."
209
209
  literals = [tony, is_aux, touching, something, dot]
210
- expect { subject.to_pforest(literals) }.not_to raise_error
210
+ expect { parser.to_pforest(literals) }.not_to raise_error
211
211
 
212
212
  # Sentence 1-22b: "Lisa is touching Tony."
213
213
  literals = [lisa, is_aux, touching, tony, dot]
214
- expect { subject.to_pforest(literals) }.not_to raise_error
214
+ expect { parser.to_pforest(literals) }.not_to raise_error
215
215
 
216
216
  # Sentence 1-23a: "Tony is far from Lisa."
217
217
  literals = [tony, is, far, from, lisa, dot]
218
- expect { subject.to_pforest(literals) }.not_to raise_error
218
+ expect { parser.to_pforest(literals) }.not_to raise_error
219
219
 
220
220
  # Sentence 1-23b: "Lisa is far from Tony."
221
221
  literals = [lisa, is, far, from, tony, dot]
222
- expect { subject.to_pforest(literals) }.not_to raise_error
222
+ expect { parser.to_pforest(literals) }.not_to raise_error
223
223
 
224
224
  # Sentence 1-23c: "Tony is not far from Lisa."
225
225
  literals = [tony, is, far, from, lisa, dot]
226
- expect { subject.to_pforest(literals) }.not_to raise_error
226
+ expect { parser.to_pforest(literals) }.not_to raise_error
227
227
 
228
228
  # Sentence 1-24: "Tony is near to Lisa."
229
229
  literals = [tony, is, near_to, lisa, dot]
230
- expect { subject.to_pforest(literals) }.not_to raise_error
230
+ expect { parser.to_pforest(literals) }.not_to raise_error
231
231
  end
232
232
 
233
- it 'should parse sample sentences from lesson 1-G' do
233
+ it 'parses sample sentences from lesson 1-G' do
234
234
  # Sentence 1-25a: "Lisa is in this place."
235
235
  literals = [lisa, is, in_, this, place, dot]
236
- expect { subject.to_pforest(literals) }.not_to raise_error
236
+ expect { parser.to_pforest(literals) }.not_to raise_error
237
237
 
238
238
  # Sentence 1-25b: "There are two other things in this place."
239
239
  literals = [there, are, two, other, things, in_, this, place, dot]
240
- expect { subject.to_pforest(literals) }.not_to raise_error
240
+ expect { parser.to_pforest(literals) }.not_to raise_error
241
241
 
242
242
  # Sentence 1-25c: "Lisa is in the same place as these two other things."
243
243
  literals = [lisa, is, in_, the, same, place, as, these, two, other, things, dot]
244
- expect { subject.to_pforest(literals) }.not_to raise_error
244
+ expect { parser.to_pforest(literals) }.not_to raise_error
245
245
 
246
246
  # Sentence 1-25d: "Tony is not in this place."
247
247
  literals = [tony, is, not_, in_, this, place, dot]
248
- expect { subject.to_pforest(literals) }.not_to raise_error
248
+ expect { parser.to_pforest(literals) }.not_to raise_error
249
249
 
250
250
  # Sentence 1-25e: "Tony is in another place."
251
251
  literals = [tony, is, in_, another, place, dot]
252
- expect { subject.to_pforest(literals) }.not_to raise_error
252
+ expect { parser.to_pforest(literals) }.not_to raise_error
253
253
 
254
254
  # Sentence 1-26a: "Lisa is inside this thing."
255
255
  literals = [lisa, is, inside, this, thing, dot]
256
- expect { subject.to_pforest(literals) }.not_to raise_error
256
+ expect { parser.to_pforest(literals) }.not_to raise_error
257
257
 
258
258
  # Sentence 1-26b: "Tony is above this thing."
259
259
  literals = [tony, is, above, this, thing, dot]
260
- expect { subject.to_pforest(literals) }.not_to raise_error
260
+ expect { parser.to_pforest(literals) }.not_to raise_error
261
261
 
262
262
  # Sentence 1-26c: "Tony is above lisa."
263
263
  literals = [tony, is, above, lisa, dot]
264
- expect { subject.to_pforest(literals) }.not_to raise_error
264
+ expect { parser.to_pforest(literals) }.not_to raise_error
265
265
 
266
266
  # Sentence 1-27a: "Tony is on one side of this thing."
267
267
  literals = [tony, is, on, one, side, of, this, thing, dot]
268
- expect { subject.to_pforest(literals) }.not_to raise_error
268
+ expect { parser.to_pforest(literals) }.not_to raise_error
269
269
 
270
270
  # Sentence 1-27b: "Lisa is on the other side."
271
271
  literals = [lisa, is, on, the, other, side, dot]
272
- expect { subject.to_pforest(literals) }.not_to raise_error
272
+ expect { parser.to_pforest(literals) }.not_to raise_error
273
273
 
274
274
  # Sentence 1-27c: "Tony is touching one side of this thing."
275
275
  literals = [tony, is_aux, touching, one, side, of, this, thing, dot]
276
276
  # Ambiguous parse
277
- expect { subject.to_pforest(literals) }.not_to raise_error
277
+ expect { parser.to_pforest(literals) }.not_to raise_error
278
278
  end
279
279
 
280
- it 'should parse sample sentences from lesson 1-H' do
280
+ it 'parses sample sentences from lesson 1-H' do
281
281
  # Sentence 1-28: "Tony hears something."
282
282
  literals = [tony, hears, something, dot]
283
- expect { subject.to_pforest(literals) }.not_to raise_error
283
+ expect { parser.to_pforest(literals) }.not_to raise_error
284
284
 
285
285
  # Sentence 1-29a: "Tony says something."
286
286
  literals = [tony, says, something, dot]
287
- expect { subject.to_pforest(literals) }.not_to raise_error
287
+ expect { parser.to_pforest(literals) }.not_to raise_error
288
288
 
289
289
  # Sentence 1-29b: "Tony says something to Lisa."
290
290
  literals = [tony, says, something, to, lisa, dot]
291
291
  # Ambiguous parse
292
- expect { subject.to_pforest(literals) }.not_to raise_error
292
+ expect { parser.to_pforest(literals) }.not_to raise_error
293
293
 
294
294
  # Sentence 1-29c: "Tony says something about this living thing."
295
295
  literals = [tony, says, something, about, this, living, thing, dot]
296
- expect { subject.to_pforest(literals) }.not_to raise_error
296
+ expect { parser.to_pforest(literals) }.not_to raise_error
297
297
 
298
298
  # Sentence 1-29d: 'Tony says: "This living thing is small."'
299
299
  literals = [tony, says, colon, quote, this, living, thing, is, small, dot, quote, dot]
300
- expect { subject.to_pforest(literals) }.not_to raise_error
300
+ expect { parser.to_pforest(literals) }.not_to raise_error
301
301
 
302
302
  # Sentence 1-30a: "Tony says some words."
303
303
  literals = [tony, says, some, words, dot]
304
- expect { subject.to_pforest(literals) }.not_to raise_error
304
+ expect { parser.to_pforest(literals) }.not_to raise_error
305
305
 
306
306
  # Sentence 1-30b: "Lisa says more words."
307
307
  literals = [lisa, says, more, words, dot]
308
- expect { subject.to_pforest(literals) }.not_to raise_error
308
+ expect { parser.to_pforest(literals) }.not_to raise_error
309
309
 
310
310
  # Sentence 1-31a: 'Tony says: "There are two people inside this thing."'
311
311
  literals = [tony, says, colon, quote, there, are, two, people, inside,
312
312
  this, thing, dot, quote, dot]
313
- expect { subject.to_pforest(literals) }.not_to raise_error
313
+ expect { parser.to_pforest(literals) }.not_to raise_error
314
314
 
315
315
  # Sentence 1-31b: 'Lisa says: "There is one person inside this thing."'
316
316
  literals = [lisa, says, colon, quote, there, is, one, person, inside,
317
317
  this, thing, dot, quote, dot]
318
- expect { subject.to_pforest(literals) }.not_to raise_error
318
+ expect { parser.to_pforest(literals) }.not_to raise_error
319
319
 
320
320
  # Sentence 1-31c: "What Tony says is not true."
321
321
  literals = [what, tony, says, is, not_, true_, dot]
322
- expect { subject.to_pforest(literals) }.not_to raise_error
322
+ expect { parser.to_pforest(literals) }.not_to raise_error
323
323
 
324
324
  # Sentence 1-31d: "What Lisa says is true."
325
325
  literals = [what, lisa, says, is, true_, dot]
326
- expect { subject.to_pforest(literals) }.not_to raise_error
326
+ expect { parser.to_pforest(literals) }.not_to raise_error
327
327
  end
328
328
  end # context
329
329
  end # describe