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.
- checksums.yaml +4 -4
- data/.rubocop.yml +48 -275
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +1 -1
- data/lib/zenlish/feature/feature_struct_def.rb +0 -2
- data/lib/zenlish/inflect/output_expression.rb +4 -0
- data/lib/zenlish/version.rb +1 -1
- data/lib/zenlish/wclasses/irregular_verb_extension.rb +0 -1
- data/lib/zenlish.rb +3 -3
- data/spec/zenlish/feature/boolean_domain_spec.rb +14 -14
- data/spec/zenlish/feature/boolean_value_spec.rb +6 -5
- data/spec/zenlish/feature/enumeration_domain_spec.rb +16 -16
- data/spec/zenlish/feature/feature_def_spec.rb +15 -14
- data/spec/zenlish/feature/feature_spec.rb +16 -16
- data/spec/zenlish/feature/feature_struct_def_bearer_spec.rb +16 -16
- data/spec/zenlish/feature/feature_struct_def_spec.rb +23 -23
- data/spec/zenlish/feature/identifier_domain_spec.rb +12 -12
- data/spec/zenlish/feature/identifier_value_spec.rb +6 -5
- data/spec/zenlish/feature/symbol_value_spec.rb +6 -5
- data/spec/zenlish/inflect/concatenation_spec.rb +8 -8
- data/spec/zenlish/inflect/equals_literal_spec.rb +17 -16
- data/spec/zenlish/inflect/feature_heading_spec.rb +14 -13
- data/spec/zenlish/inflect/formal_argument_spec.rb +5 -5
- data/spec/zenlish/inflect/function_call_spec.rb +8 -9
- data/spec/zenlish/inflect/inflection_rule_spec.rb +20 -20
- data/spec/zenlish/inflect/inflection_table_builder_spec.rb +37 -37
- data/spec/zenlish/inflect/inflection_table_spec.rb +33 -32
- data/spec/zenlish/inflect/input_asis_spec.rb +10 -9
- data/spec/zenlish/inflect/literal_asis_spec.rb +7 -7
- data/spec/zenlish/inflect/matches_pattern_spec.rb +15 -14
- data/spec/zenlish/inflect/membership_spec.rb +16 -15
- data/spec/zenlish/inflect/method_heading_spec.rb +12 -11
- data/spec/zenlish/inflect/not_equals_literal_spec.rb +17 -16
- data/spec/zenlish/inflect/substitution_spec.rb +9 -10
- data/spec/zenlish/inflect/unconditionally_true_spec.rb +7 -5
- data/spec/zenlish/lang/dictionary_spec.rb +17 -19
- data/spec/zenlish/lang/lemmatizer_spec.rb +23 -23
- data/spec/zenlish/lang/zenlish_grammar_spec.rb +3 -3
- data/spec/zenlish/lex/empty_lexicon_factory_spec.rb +8 -8
- data/spec/zenlish/lex/lexeme_spec.rb +18 -18
- data/spec/zenlish/lex/lexical_entry_spec.rb +14 -13
- data/spec/zenlish/lex/lexicon_spec.rb +44 -43
- data/spec/zenlish/lex/literal_spec.rb +6 -6
- data/spec/zenlish/lexer/lexer_spec.rb +10 -10
- data/spec/zenlish/parser/lesson1_spec.rb +79 -79
- data/spec/zenlish/parser/lesson2_spec.rb +102 -102
- data/spec/zenlish/parser/lesson3_spec.rb +89 -89
- data/spec/zenlish/parser/zparser_spec.rb +6 -6
- data/spec/zenlish/support/var2word.rb +0 -2
- data/spec/zenlish/trie/base_trie_node_spec.rb +11 -11
- data/spec/zenlish/trie/trie_spec.rb +46 -46
- data/spec/zenlish/wclasses/common_noun_spec.rb +9 -9
- data/spec/zenlish/wclasses/demonstrative_determiner_spec.rb +11 -11
- data/spec/zenlish/wclasses/irregular_verb_can_spec.rb +10 -10
- data/spec/zenlish/wclasses/irregular_verb_extension_spec.rb +10 -10
- data/spec/zenlish/wclasses/irregular_verb_spec.rb +19 -19
- data/spec/zenlish/wclasses/lexical_verb_spec.rb +7 -7
- data/spec/zenlish/wclasses/modal_verb_can_spec.rb +9 -9
- data/spec/zenlish/wclasses/noun_spec.rb +7 -7
- data/spec/zenlish/wclasses/personal_pronoun_spec.rb +15 -15
- data/spec/zenlish/wclasses/possessive_determiner_spec.rb +15 -15
- data/spec/zenlish/wclasses/preposition_spec.rb +5 -5
- data/spec/zenlish/wclasses/proper_noun_spec.rb +3 -3
- data/spec/zenlish/wclasses/regular_verb_spec.rb +12 -12
- data/spec/zenlish/wclasses/regular_verb_want_spec.rb +7 -7
- data/spec/zenlish/wclasses/verb_spec.rb +9 -9
- data/spec/zenlish_spec.rb +1 -1
- data/zenlish.gemspec +6 -5
- metadata +32 -16
@@ -6,17 +6,17 @@ require_relative '../../../lib/zenlish/wclasses/preposition' # Load the class un
|
|
6
6
|
module Zenlish
|
7
7
|
module WClasses
|
8
8
|
describe Preposition do
|
9
|
-
subject {
|
9
|
+
subject(:preposition) { described_class.new }
|
10
10
|
|
11
11
|
context 'Initialization:' do
|
12
|
-
it '
|
13
|
-
expect {
|
12
|
+
it 'is initialized without argument' do
|
13
|
+
expect { described_class.new }.not_to raise_error
|
14
14
|
end
|
15
15
|
end # context
|
16
16
|
|
17
17
|
context 'Provided services:' do
|
18
|
-
it '
|
19
|
-
expect(
|
18
|
+
it 'is invariable' do
|
19
|
+
expect(preposition).to be_invariable
|
20
20
|
end
|
21
21
|
end # context
|
22
22
|
end # describe
|
@@ -6,11 +6,11 @@ require_relative '../../../lib/zenlish/wclasses/proper_noun' # Load the class un
|
|
6
6
|
module Zenlish
|
7
7
|
module WClasses
|
8
8
|
describe ProperNoun do
|
9
|
-
subject {
|
9
|
+
subject { described_class.new }
|
10
10
|
|
11
11
|
context 'Initialization:' do
|
12
|
-
it '
|
13
|
-
expect {
|
12
|
+
it 'is initialized without argument' do
|
13
|
+
expect { described_class.new }.not_to raise_error
|
14
14
|
end
|
15
15
|
end # context
|
16
16
|
|
@@ -10,21 +10,15 @@ require_relative '../../../lib/zenlish/wclasses/regular_verb'
|
|
10
10
|
module Zenlish
|
11
11
|
module WClasses
|
12
12
|
describe RegularVerb do
|
13
|
-
subject {
|
13
|
+
subject(:regular_verb) { described_class.new }
|
14
14
|
|
15
15
|
context 'Initialization:' do
|
16
|
-
it '
|
17
|
-
expect {
|
16
|
+
it 'is initialized without argument' do
|
17
|
+
expect { described_class.new }.not_to raise_error
|
18
18
|
end
|
19
19
|
end # context
|
20
20
|
|
21
21
|
context 'Provided services:' do
|
22
|
-
it 'should know its inherited feature definitions' do
|
23
|
-
expect(subject['NUMBER']).to be_kind_of(Feature::FeatureDef)
|
24
|
-
expect(subject['PERSON']).to be_kind_of(Feature::FeatureDef)
|
25
|
-
expect(subject['PARADIGM'].default.val).to eq('Regular_inflection')
|
26
|
-
end
|
27
|
-
|
28
22
|
let(:present_1sg) { [:first, :singular, :present, nil] }
|
29
23
|
let(:present_3sg) { [:third, :singular, :present, nil] }
|
30
24
|
let(:present_1pl) { [:first, :plural, :present, nil] }
|
@@ -34,7 +28,7 @@ module Zenlish
|
|
34
28
|
|
35
29
|
def build_verb(aBaseForm)
|
36
30
|
entry = Zenlish::Lex::LexicalEntry.new(aBaseForm)
|
37
|
-
Zenlish::Lex::Lexeme.new(
|
31
|
+
Zenlish::Lex::Lexeme.new(regular_verb, entry)
|
38
32
|
end
|
39
33
|
|
40
34
|
def test_inflection_of(verb_form, pairs)
|
@@ -50,7 +44,13 @@ module Zenlish
|
|
50
44
|
expect(inflected.sort).to eq(wforms.sort)
|
51
45
|
end
|
52
46
|
|
53
|
-
it '
|
47
|
+
it 'knows its inherited feature definitions' do
|
48
|
+
expect(regular_verb['NUMBER']).to be_a(Feature::FeatureDef)
|
49
|
+
expect(regular_verb['PERSON']).to be_a(Feature::FeatureDef)
|
50
|
+
expect(regular_verb['PARADIGM'].default.val).to eq('Regular_inflection')
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'knows how to inflect regular verbs' do
|
54
54
|
expectations1 = [
|
55
55
|
[present_1sg, 'exist'],
|
56
56
|
[present_3sg, 'exists'],
|
@@ -112,7 +112,7 @@ module Zenlish
|
|
112
112
|
test_inflection_of('want', expectations6)
|
113
113
|
end
|
114
114
|
|
115
|
-
it '
|
115
|
+
it 'gives all word forms of a given verb' do
|
116
116
|
test_all_inflections('die', %w[die dies dying died])
|
117
117
|
end
|
118
118
|
end # context
|
@@ -10,19 +10,19 @@ require_relative '../../../lib/zenlish/wclasses/regular_verb_want'
|
|
10
10
|
module Zenlish
|
11
11
|
module WClasses
|
12
12
|
describe RegularVerbWant do
|
13
|
-
subject {
|
13
|
+
subject(:the_verb) { described_class.new }
|
14
14
|
|
15
15
|
context 'Initialization:' do
|
16
|
-
it '
|
17
|
-
expect {
|
16
|
+
it 'is initialized without argument' do
|
17
|
+
expect { described_class.new }.not_to raise_error
|
18
18
|
end
|
19
19
|
end # context
|
20
20
|
|
21
21
|
context 'Provided services:' do
|
22
|
-
it '
|
23
|
-
expect(
|
24
|
-
expect(
|
25
|
-
expect(
|
22
|
+
it 'knows its inherited feature definitions' do
|
23
|
+
expect(the_verb['NUMBER']).to be_a(Feature::FeatureDef)
|
24
|
+
expect(the_verb['PERSON']).to be_a(Feature::FeatureDef)
|
25
|
+
expect(the_verb['PARADIGM'].default.val).to eq('Regular_inflection')
|
26
26
|
end
|
27
27
|
end # context
|
28
28
|
end # describe
|
@@ -13,23 +13,23 @@ module Zenlish
|
|
13
13
|
end
|
14
14
|
|
15
15
|
describe Verb do
|
16
|
-
subject {
|
16
|
+
subject(:a_verb) { described_class.new }
|
17
17
|
|
18
18
|
context 'Initialization:' do
|
19
|
-
it '
|
20
|
-
expect {
|
19
|
+
it 'is initialized without argument' do
|
20
|
+
expect { described_class.new }.not_to raise_error
|
21
21
|
end
|
22
22
|
end # context
|
23
23
|
|
24
24
|
context 'Provided services:' do
|
25
|
-
it '
|
26
|
-
expect(
|
25
|
+
it 'knows that it has inflected forms' do
|
26
|
+
expect(a_verb).not_to be_invariable
|
27
27
|
end
|
28
28
|
|
29
|
-
it '
|
30
|
-
expect(
|
31
|
-
expect(
|
32
|
-
expect(
|
29
|
+
it 'knows its feature definitions' do
|
30
|
+
expect(a_verb['NUMBER']).to be_a(Feature::FeatureDef)
|
31
|
+
expect(a_verb['PERSON']).to be_a(Feature::FeatureDef)
|
32
|
+
expect(a_verb['PARADIGM'].default.val).to eq('Regular_inflection')
|
33
33
|
end
|
34
34
|
end # context
|
35
35
|
end # describe
|
data/spec/zenlish_spec.rb
CHANGED
data/zenlish.gemspec
CHANGED
@@ -54,12 +54,13 @@ Gem::Specification.new do |spec|
|
|
54
54
|
PkgExtending.pkg_files(spec)
|
55
55
|
PkgExtending.pkg_documentation(spec)
|
56
56
|
|
57
|
-
spec.required_ruby_version = '>=
|
57
|
+
spec.required_ruby_version = '>= 3.1.0'
|
58
|
+
spec.metadata = { 'rubygems_mfa_required' => 'true' }
|
58
59
|
|
59
60
|
# Runtime dependencies
|
60
|
-
spec.add_dependency 'rley', '~> 0.
|
61
|
+
spec.add_dependency 'rley', '~> 0.9', '>= 0.9.02'
|
61
62
|
|
62
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
63
|
-
spec.add_development_dependency 'rake', '~>
|
64
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
63
|
+
spec.add_development_dependency 'bundler', '~> 2.4', '>= 2.4.1'
|
64
|
+
spec.add_development_dependency 'rake', '~> 13'
|
65
|
+
spec.add_development_dependency 'rspec', '~> 3', '>= 3.10.0'
|
65
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenlish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.07
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitri Geshef
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-03 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rley
|
@@ -16,56 +15,74 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: '0.9'
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.9.02
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
24
26
|
- - "~>"
|
25
27
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
28
|
+
version: '0.9'
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 0.9.02
|
27
32
|
- !ruby/object:Gem::Dependency
|
28
33
|
name: bundler
|
29
34
|
requirement: !ruby/object:Gem::Requirement
|
30
35
|
requirements:
|
31
36
|
- - "~>"
|
32
37
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
38
|
+
version: '2.4'
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 2.4.1
|
34
42
|
type: :development
|
35
43
|
prerelease: false
|
36
44
|
version_requirements: !ruby/object:Gem::Requirement
|
37
45
|
requirements:
|
38
46
|
- - "~>"
|
39
47
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
48
|
+
version: '2.4'
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 2.4.1
|
41
52
|
- !ruby/object:Gem::Dependency
|
42
53
|
name: rake
|
43
54
|
requirement: !ruby/object:Gem::Requirement
|
44
55
|
requirements:
|
45
56
|
- - "~>"
|
46
57
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
58
|
+
version: '13'
|
48
59
|
type: :development
|
49
60
|
prerelease: false
|
50
61
|
version_requirements: !ruby/object:Gem::Requirement
|
51
62
|
requirements:
|
52
63
|
- - "~>"
|
53
64
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
65
|
+
version: '13'
|
55
66
|
- !ruby/object:Gem::Dependency
|
56
67
|
name: rspec
|
57
68
|
requirement: !ruby/object:Gem::Requirement
|
58
69
|
requirements:
|
59
70
|
- - "~>"
|
60
71
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3
|
72
|
+
version: '3'
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.10.0
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3
|
82
|
+
version: '3'
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 3.10.0
|
69
86
|
description: A toolkit for the Zenlish language (a simplified English language).
|
70
87
|
email:
|
71
88
|
- famished.tiger@yahoo.com
|
@@ -255,8 +272,8 @@ files:
|
|
255
272
|
homepage: https://github.com/famished-tiger/zenlish
|
256
273
|
licenses:
|
257
274
|
- MIT
|
258
|
-
metadata:
|
259
|
-
|
275
|
+
metadata:
|
276
|
+
rubygems_mfa_required: 'true'
|
260
277
|
rdoc_options:
|
261
278
|
- --charset=UTF-8 --exclude="examples|spec"
|
262
279
|
require_paths:
|
@@ -265,15 +282,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
265
282
|
requirements:
|
266
283
|
- - ">="
|
267
284
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
285
|
+
version: 3.1.0
|
269
286
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
270
287
|
requirements:
|
271
288
|
- - ">="
|
272
289
|
- !ruby/object:Gem::Version
|
273
290
|
version: '0'
|
274
291
|
requirements: []
|
275
|
-
rubygems_version: 3.
|
276
|
-
signing_key:
|
292
|
+
rubygems_version: 3.6.6
|
277
293
|
specification_version: 4
|
278
294
|
summary: A toolkit for the Zenlish language (a simplified English language).
|
279
295
|
test_files:
|