zenlish 0.2.02 → 0.2.06
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +455 -0
- data/CHANGELOG.md +58 -1
- data/Gemfile +5 -3
- data/README.md +27 -0
- data/Rakefile +5 -3
- data/lib/zenlish/feature/boolean_domain.rb +9 -3
- data/lib/zenlish/feature/boolean_value.rb +3 -2
- data/lib/zenlish/feature/enumeration_domain.rb +8 -1
- data/lib/zenlish/feature/feature.rb +9 -7
- data/lib/zenlish/feature/feature_def.rb +10 -6
- data/lib/zenlish/feature/feature_domain.rb +9 -3
- data/lib/zenlish/feature/feature_struct.rb +3 -1
- data/lib/zenlish/feature/feature_struct_def.rb +5 -1
- data/lib/zenlish/feature/feature_struct_def_bearer.rb +6 -4
- data/lib/zenlish/feature/feature_value.rb +4 -2
- data/lib/zenlish/feature/identifier_domain.rb +5 -3
- data/lib/zenlish/feature/identifier_value.rb +3 -2
- data/lib/zenlish/feature/symbol_value.rb +3 -1
- data/lib/zenlish/inflect/atomic_o_expression.rb +2 -1
- data/lib/zenlish/inflect/composite_o_expression.rb +3 -1
- data/lib/zenlish/inflect/concatenation.rb +3 -2
- data/lib/zenlish/inflect/equals_literal.rb +7 -1
- data/lib/zenlish/inflect/feature_heading.rb +11 -5
- data/lib/zenlish/inflect/formal_argument.rb +3 -1
- data/lib/zenlish/inflect/function_call.rb +4 -1
- data/lib/zenlish/inflect/heading.rb +5 -0
- data/lib/zenlish/inflect/inflection_rule.rb +2 -0
- data/lib/zenlish/inflect/inflection_table.rb +29 -4
- data/lib/zenlish/inflect/inflection_table_builder.rb +27 -20
- data/lib/zenlish/inflect/input_asis.rb +3 -0
- data/lib/zenlish/inflect/input_expression.rb +4 -2
- data/lib/zenlish/inflect/literal_asis.rb +4 -1
- data/lib/zenlish/inflect/matches_pattern.rb +2 -0
- data/lib/zenlish/inflect/membership.rb +2 -0
- data/lib/zenlish/inflect/method_heading.rb +7 -6
- data/lib/zenlish/inflect/not_equals_literal.rb +2 -0
- data/lib/zenlish/inflect/nullary_input_expression.rb +3 -1
- data/lib/zenlish/inflect/output_expression.rb +2 -0
- data/lib/zenlish/inflect/substitution.rb +3 -1
- data/lib/zenlish/inflect/unary_input_expression.rb +4 -1
- data/lib/zenlish/inflect/unconditionally_true.rb +4 -2
- data/lib/zenlish/lang/dictionary.rb +35 -29
- data/lib/zenlish/lang/lemmatizer.rb +40 -0
- data/lib/zenlish/lang/zenlish_grammar.rb +9 -6
- data/lib/zenlish/lex/empty_lexicon_factory.rb +4 -3
- data/lib/zenlish/lex/lexeme.rb +9 -2
- data/lib/zenlish/lex/lexical_entry.rb +6 -4
- data/lib/zenlish/lex/lexicon.rb +10 -8
- data/lib/zenlish/lex/literal.rb +3 -1
- data/lib/zenlish/lexer/lexer.rb +144 -0
- data/lib/zenlish/trie/base_trie_node.rb +27 -0
- data/lib/zenlish/trie/trie.rb +132 -0
- data/lib/zenlish/trie/trie_node.rb +21 -0
- data/lib/zenlish/trie/trie_root.rb +10 -0
- data/lib/zenlish/version.rb +3 -1
- data/lib/zenlish/wclasses/adjective.rb +5 -2
- data/lib/zenlish/wclasses/adverb.rb +3 -1
- data/lib/zenlish/wclasses/adverb_maybe.rb +3 -1
- data/lib/zenlish/wclasses/adverb_not.rb +2 -0
- data/lib/zenlish/wclasses/all_word_classes.rb +4 -2
- data/lib/zenlish/wclasses/article.rb +2 -0
- data/lib/zenlish/wclasses/auxiliary.rb +5 -2
- data/lib/zenlish/wclasses/auxiliary_be.rb +34 -1
- data/lib/zenlish/wclasses/auxiliary_do.rb +31 -0
- data/lib/zenlish/wclasses/cardinal.rb +3 -1
- data/lib/zenlish/wclasses/common_noun.rb +2 -0
- data/lib/zenlish/wclasses/comparative_particle.rb +5 -3
- data/lib/zenlish/wclasses/conjunction.rb +2 -0
- data/lib/zenlish/wclasses/conjunctive_pronoun.rb +2 -0
- data/lib/zenlish/wclasses/coordinator.rb +4 -2
- data/lib/zenlish/wclasses/definite_article.rb +2 -0
- data/lib/zenlish/wclasses/degree_adverb.rb +2 -0
- data/lib/zenlish/wclasses/demonstrative_determiner.rb +40 -1
- data/lib/zenlish/wclasses/demonstrative_pronoun.rb +2 -0
- data/lib/zenlish/wclasses/determiner.rb +3 -1
- data/lib/zenlish/wclasses/distributive_determiner.rb +2 -0
- data/lib/zenlish/wclasses/existential_there.rb +2 -0
- data/lib/zenlish/wclasses/fronting_quantifier.rb +3 -1
- data/lib/zenlish/wclasses/indefinite_article.rb +2 -0
- data/lib/zenlish/wclasses/indefinite_pronoun.rb +3 -1
- data/lib/zenlish/wclasses/irregular_linking_verb.rb +3 -1
- data/lib/zenlish/wclasses/irregular_verb.rb +14 -22
- data/lib/zenlish/wclasses/irregular_verb_be.rb +41 -1
- data/lib/zenlish/wclasses/irregular_verb_can.rb +35 -0
- data/lib/zenlish/wclasses/irregular_verb_do.rb +38 -1
- data/lib/zenlish/wclasses/irregular_verb_extension.rb +8 -6
- data/lib/zenlish/wclasses/irregular_verb_have.rb +38 -1
- data/lib/zenlish/wclasses/irregular_verb_know.rb +3 -1
- data/lib/zenlish/wclasses/irregular_verb_say.rb +3 -1
- data/lib/zenlish/wclasses/irregular_verb_think.rb +3 -1
- data/lib/zenlish/wclasses/lexical_verb.rb +3 -4
- data/lib/zenlish/wclasses/linking_adverb.rb +2 -0
- data/lib/zenlish/wclasses/modal_verb_can.rb +27 -0
- data/lib/zenlish/wclasses/noun.rb +4 -2
- data/lib/zenlish/wclasses/numeral.rb +2 -0
- data/lib/zenlish/wclasses/personal_pronoun.rb +70 -1
- data/lib/zenlish/wclasses/possessive_determiner.rb +60 -0
- data/lib/zenlish/wclasses/preposition.rb +3 -1
- data/lib/zenlish/wclasses/preposition_of.rb +2 -0
- data/lib/zenlish/wclasses/preposition_than.rb +2 -0
- data/lib/zenlish/wclasses/pronoun.rb +3 -1
- data/lib/zenlish/wclasses/proper_noun.rb +10 -8
- data/lib/zenlish/wclasses/quantifier.rb +3 -1
- data/lib/zenlish/wclasses/regular_verb.rb +13 -18
- data/lib/zenlish/wclasses/regular_verb_want.rb +4 -2
- data/lib/zenlish/wclasses/relative_pronoun.rb +4 -2
- data/lib/zenlish/wclasses/subordinating_conjunction.rb +7 -5
- data/lib/zenlish/wclasses/verb.rb +16 -8
- data/lib/zenlish/wclasses/word_class.rb +11 -3
- data/spec/spec_helper.rb +3 -1
- data/spec/zenlish/feature/boolean_domain_spec.rb +6 -1
- data/spec/zenlish/feature/boolean_value_spec.rb +1 -1
- data/spec/zenlish/feature/enumeration_domain_spec.rb +9 -5
- data/spec/zenlish/feature/feature_spec.rb +3 -3
- data/spec/zenlish/feature/feature_struct_def_bearer_spec.rb +10 -8
- data/spec/zenlish/feature/feature_struct_def_spec.rb +3 -2
- data/spec/zenlish/feature/identifier_domain_spec.rb +3 -3
- data/spec/zenlish/feature/identifier_value_spec.rb +4 -4
- data/spec/zenlish/feature/symbol_value_spec.rb +3 -3
- data/spec/zenlish/inflect/concatenation_spec.rb +7 -7
- data/spec/zenlish/inflect/feature_heading_spec.rb +23 -3
- data/spec/zenlish/inflect/formal_argument_spec.rb +2 -2
- data/spec/zenlish/inflect/function_call_spec.rb +4 -4
- data/spec/zenlish/inflect/inflection_rule_spec.rb +9 -5
- data/spec/zenlish/inflect/inflection_table_builder_spec.rb +26 -21
- data/spec/zenlish/inflect/inflection_table_spec.rb +39 -22
- data/spec/zenlish/inflect/input_asis_spec.rb +2 -6
- data/spec/zenlish/inflect/literal_asis_spec.rb +3 -3
- data/spec/zenlish/inflect/matches_pattern_spec.rb +1 -1
- data/spec/zenlish/inflect/membership_spec.rb +2 -2
- data/spec/zenlish/inflect/method_heading_spec.rb +7 -1
- data/spec/zenlish/inflect/substitution_spec.rb +1 -1
- data/spec/zenlish/inflect/unconditionally_true_spec.rb +2 -2
- data/spec/zenlish/lang/dictionary_spec.rb +51 -16
- data/spec/zenlish/lang/lemmatizer_spec.rb +43 -0
- data/spec/zenlish/lang/zenlish_grammar_spec.rb +2 -2
- data/spec/zenlish/lex/lexeme_spec.rb +16 -11
- data/spec/zenlish/lex/lexical_entry_spec.rb +1 -2
- data/spec/zenlish/lex/lexicon_spec.rb +9 -8
- data/spec/zenlish/lex/literal_spec.rb +2 -2
- data/spec/zenlish/lexer/lexer_spec.rb +52 -0
- data/spec/zenlish/parser/lesson1_spec.rb +2 -2
- data/spec/zenlish/parser/lesson2_spec.rb +31 -36
- data/spec/zenlish/parser/lesson3_spec.rb +98 -138
- data/spec/zenlish/parser/zparser_spec.rb +2 -1
- data/spec/zenlish/support/minimal_lexicon.rb +2 -0
- data/spec/zenlish/support/var2word.rb +27 -18
- data/spec/zenlish/trie/base_trie_node_spec.rb +33 -0
- data/spec/zenlish/trie/trie_spec.rb +108 -0
- data/spec/zenlish/wclasses/common_noun_spec.rb +19 -7
- data/spec/zenlish/wclasses/demonstrative_determiner_spec.rb +47 -0
- data/spec/zenlish/wclasses/irregular_verb_can_spec.rb +60 -0
- data/spec/zenlish/wclasses/irregular_verb_spec.rb +14 -4
- data/spec/zenlish/wclasses/lexical_verb_spec.rb +9 -2
- data/spec/zenlish/wclasses/modal_verb_can_spec.rb +50 -0
- data/spec/zenlish/wclasses/personal_pronoun_spec.rb +66 -0
- data/spec/zenlish/wclasses/possessive_determiner_spec.rb +69 -0
- data/spec/zenlish/wclasses/regular_verb_spec.rb +35 -15
- data/spec/zenlish/wclasses/regular_verb_want_spec.rb +30 -0
- data/spec/zenlish/wclasses/verb_spec.rb +9 -2
- data/spec/zenlish_spec.rb +3 -1
- data/zenlish.gemspec +17 -14
- metadata +37 -10
- data/lib/zenlish/wclasses/modal_verb_could.rb +0 -9
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'output_expression'
|
2
4
|
|
3
5
|
module Zenlish
|
@@ -6,9 +8,9 @@ module Zenlish
|
|
6
8
|
attr_reader :children
|
7
9
|
|
8
10
|
def initialize(theChildren)
|
11
|
+
super()
|
9
12
|
@children = theChildren.dup
|
10
13
|
end
|
11
14
|
end # class
|
12
15
|
end # module
|
13
16
|
end # module
|
14
|
-
|
@@ -1,10 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'literal_asis'
|
2
4
|
require_relative 'composite_o_expression'
|
3
5
|
|
4
6
|
module Zenlish
|
5
7
|
module Inflect
|
6
8
|
class Concatenation < CompositeOExpression
|
7
|
-
|
8
9
|
def initialize(argument1, argument2)
|
9
10
|
super([validated_argument(argument1), validated_argument(argument2)])
|
10
11
|
end
|
@@ -33,4 +34,4 @@ module Zenlish
|
|
33
34
|
end
|
34
35
|
end # class
|
35
36
|
end # module
|
36
|
-
end # module
|
37
|
+
end # module
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'unary_input_expression'
|
2
4
|
|
3
5
|
module Zenlish
|
@@ -17,7 +19,11 @@ module Zenlish
|
|
17
19
|
feat_def.domain.include?(literal)
|
18
20
|
else
|
19
21
|
val = actuals[argument.index]
|
20
|
-
val
|
22
|
+
if val.kind_of?(Feature::FeatureDef)
|
23
|
+
val.domain.include?(literal)
|
24
|
+
else
|
25
|
+
val == literal
|
26
|
+
end
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end # class
|
@@ -1,16 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'heading'
|
2
4
|
|
3
5
|
module Zenlish
|
4
6
|
module Inflect
|
5
7
|
class FeatureHeading < Heading
|
6
|
-
|
7
|
-
def initialize(aLabel)
|
8
|
-
super(aLabel)
|
9
|
-
end
|
10
|
-
|
11
8
|
def evaluate_for(aFeatureBearer)
|
12
9
|
aFeatureBearer[label]
|
13
10
|
end
|
11
|
+
|
12
|
+
def all_matches(aFeatureBearer)
|
13
|
+
feat = aFeatureBearer[label]
|
14
|
+
if feat.kind_of?(Feature::FeatureDef)
|
15
|
+
feat.domain.to_a
|
16
|
+
else
|
17
|
+
[feat]
|
18
|
+
end
|
19
|
+
end
|
14
20
|
end # class
|
15
21
|
end # module
|
16
22
|
end # module
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'atomic_o_expression'
|
2
4
|
|
3
5
|
module Zenlish
|
@@ -6,6 +8,7 @@ module Zenlish
|
|
6
8
|
attr_reader :mth_name
|
7
9
|
|
8
10
|
def initialize(aMethodName)
|
11
|
+
super()
|
9
12
|
@mth_name = aMethodName
|
10
13
|
end
|
11
14
|
|
@@ -14,4 +17,4 @@ module Zenlish
|
|
14
17
|
end
|
15
18
|
end # class
|
16
19
|
end # module
|
17
|
-
end # module
|
20
|
+
end # module
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
3
|
module Zenlish
|
3
4
|
module Inflect
|
@@ -26,8 +27,9 @@ module Zenlish
|
|
26
27
|
else
|
27
28
|
theConstraints
|
28
29
|
end
|
29
|
-
err_msg = "Table has #{headings.size} headings."
|
30
|
+
err_msg = "Table has #{headings.size} headings, instead of #{constraints.size}"
|
30
31
|
raise StandardError, err_msg if constraints.size != headings.size
|
32
|
+
|
31
33
|
actuals = []
|
32
34
|
headings.each_with_index do |hd, idx|
|
33
35
|
if constraints[idx]
|
@@ -37,8 +39,8 @@ module Zenlish
|
|
37
39
|
end
|
38
40
|
end
|
39
41
|
# Hit policy: first
|
40
|
-
matching_rule = rules.find do |rule|
|
41
|
-
rule.success?(headings, aLexeme, actuals)
|
42
|
+
matching_rule = rules.find do |rule|
|
43
|
+
rule.success?(headings, aLexeme, actuals)
|
42
44
|
end
|
43
45
|
unless matching_rule
|
44
46
|
err_msg = "No rule in table covers case: lexeme #{aLexeme}, actuals: #{p actuals}."
|
@@ -46,6 +48,29 @@ module Zenlish
|
|
46
48
|
end
|
47
49
|
matching_rule.apply(headings, aLexeme, actuals)
|
48
50
|
end
|
51
|
+
|
52
|
+
def all_inflections(aLexeme)
|
53
|
+
constraints = Array.new(headings.size) { |_i| nil }
|
54
|
+
heading_matches = []
|
55
|
+
headings.each_with_index do |hd, _idx|
|
56
|
+
heading_matches << hd.all_matches(aLexeme)
|
57
|
+
end
|
58
|
+
w_forms = nil
|
59
|
+
if constraints.size == 1
|
60
|
+
all_combos = heading_matches
|
61
|
+
w_forms = all_combos.first.map do |item|
|
62
|
+
inflect(aLexeme, [item])
|
63
|
+
end
|
64
|
+
else
|
65
|
+
vector1 = heading_matches.shift
|
66
|
+
all_combos = vector1.product(*heading_matches)
|
67
|
+
w_forms = all_combos.map do |combination|
|
68
|
+
inflect(aLexeme, combination)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
w_forms.uniq
|
73
|
+
end
|
49
74
|
end # class
|
50
75
|
end # module
|
51
|
-
end # module
|
76
|
+
end # module
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'feature_heading'
|
2
4
|
require_relative 'method_heading'
|
3
5
|
require_relative 'formal_argument'
|
@@ -13,19 +15,19 @@ require_relative 'substitution'
|
|
13
15
|
require_relative 'inflection_rule'
|
14
16
|
require_relative 'inflection_table'
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
18
|
+
# DecisionTable: Common_form
|
19
|
+
# | NUMBER | .base_form | Common_form |
|
20
|
+
# | singular | X | base_form |
|
21
|
+
# | plural | ~ /[^aeiouy]y$/ | sub(base_form, /y$/, "ies")|
|
22
|
+
# | plural | X | base_form + "s" |
|
23
|
+
# build('Common_form') do
|
24
|
+
# feature_heading 'NUMBER'
|
25
|
+
# method_heading 'base_form'
|
26
|
+
# | NUMBER | base_form | Common_form |
|
27
|
+
# rule [equals(:singular), dont_care ], col('base_form')
|
28
|
+
# rule [equals(:plural) , matches(/[^aeiouy]y$/)], sub(col('base_form'), /y$/, 'ies')
|
29
|
+
# rule [equals(:plural) , dont_care ], concat(col('base_form'), 's')
|
30
|
+
# end
|
29
31
|
|
30
32
|
module Zenlish
|
31
33
|
module Inflect
|
@@ -50,20 +52,20 @@ module Zenlish
|
|
50
52
|
def feature_heading(aFeatureName)
|
51
53
|
hd = FeatureHeading.new(aFeatureName)
|
52
54
|
headings << hd
|
53
|
-
table
|
55
|
+
table&.add_heading(hd)
|
54
56
|
end
|
55
57
|
|
56
58
|
def method_heading(aMethodName)
|
57
59
|
hd = MethodHeading.new(aMethodName)
|
58
60
|
headings << hd
|
59
|
-
table
|
61
|
+
table&.add_heading(hd)
|
60
62
|
end
|
61
63
|
|
62
64
|
def rule(conditions, consequent)
|
63
65
|
@conds = []
|
64
66
|
rl = InflectionRule.new(conditions.dup, consequent)
|
65
67
|
rules << rl
|
66
|
-
table
|
68
|
+
table&.add_rule(rl)
|
67
69
|
|
68
70
|
rl
|
69
71
|
end
|
@@ -83,13 +85,13 @@ module Zenlish
|
|
83
85
|
|
84
86
|
inequality_cond
|
85
87
|
end
|
86
|
-
|
88
|
+
|
87
89
|
def in?(*theMembers)
|
88
90
|
arg = FormalArgument.new(conds.size)
|
89
91
|
membership_cond = Membership.new(arg, theMembers)
|
90
92
|
conds << membership_cond
|
91
93
|
|
92
|
-
membership_cond
|
94
|
+
membership_cond
|
93
95
|
end
|
94
96
|
|
95
97
|
def dont_care
|
@@ -99,10 +101,15 @@ module Zenlish
|
|
99
101
|
item
|
100
102
|
end
|
101
103
|
|
104
|
+
def literal(aLiteral)
|
105
|
+
LiteralAsIs.new(aLiteral)
|
106
|
+
end
|
107
|
+
|
102
108
|
def col(aColName)
|
103
109
|
col_index = headings.find_index { |hd| hd.label == aColName }
|
104
110
|
err_msg = "Cannot find heading named '#{aColName}'."
|
105
111
|
raise StandardError, err_msg if col_index.nil?
|
112
|
+
|
106
113
|
formal = FormalArgument.new(col_index)
|
107
114
|
InputAsIs.new(formal)
|
108
115
|
end
|
@@ -128,7 +135,7 @@ module Zenlish
|
|
128
135
|
|
129
136
|
private
|
130
137
|
|
131
|
-
def reset
|
138
|
+
def reset
|
132
139
|
@table = nil
|
133
140
|
@headings = []
|
134
141
|
@conds = []
|
@@ -140,4 +147,4 @@ module Zenlish
|
|
140
147
|
# end
|
141
148
|
end # class
|
142
149
|
end # module
|
143
|
-
end # module
|
150
|
+
end # module
|
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Zenlish
|
2
4
|
module Inflect
|
3
5
|
class InputExpression
|
4
6
|
def success?(_lexeme, _heading_values)
|
5
7
|
raise NotImplementedError, 'Method must be implemented in subclass(es).'
|
6
|
-
end
|
8
|
+
end
|
7
9
|
end # class
|
8
10
|
end # module
|
9
|
-
end # module
|
11
|
+
end # module
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'atomic_o_expression'
|
2
4
|
|
3
5
|
module Zenlish
|
@@ -6,6 +8,7 @@ module Zenlish
|
|
6
8
|
attr_reader :text
|
7
9
|
|
8
10
|
def initialize(aLiteralValue)
|
11
|
+
super()
|
9
12
|
@text = aLiteralValue
|
10
13
|
end
|
11
14
|
|
@@ -14,4 +17,4 @@ module Zenlish
|
|
14
17
|
end
|
15
18
|
end # class
|
16
19
|
end # module
|
17
|
-
end # module
|
20
|
+
end # module
|
@@ -1,16 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'heading'
|
2
4
|
|
3
5
|
module Zenlish
|
4
6
|
module Inflect
|
5
7
|
class MethodHeading < Heading
|
6
|
-
|
7
|
-
def initialize(aLabel)
|
8
|
-
super(aLabel)
|
9
|
-
end
|
10
|
-
|
11
8
|
def evaluate_for(aFeatureBearer)
|
12
9
|
aFeatureBearer.send(label)
|
13
|
-
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def all_matches(aFeatureBearer)
|
13
|
+
[evaluate_for(aFeatureBearer)]
|
14
|
+
end
|
14
15
|
end # class
|
15
16
|
end # module
|
16
17
|
end # module
|
@@ -1,11 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'input_expression'
|
2
4
|
|
3
5
|
module Zenlish
|
4
6
|
module Inflect
|
5
7
|
class UnaryInputExpression < InputExpression
|
6
8
|
attr_reader :argument
|
7
|
-
|
9
|
+
|
8
10
|
def initialize(anArgument)
|
11
|
+
super()
|
9
12
|
@argument = anArgument
|
10
13
|
end
|
11
14
|
end # class
|