linkparser 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fdb3ebc1f449d0bcbdf3b4a1c69b0b417abd68642ac64d9df62cc2ccf330ba5
4
- data.tar.gz: 1ea9b2c22a7a3212ca9fdae2e2640344e73f06331c451289bcac1fbe7c283940
3
+ metadata.gz: 60a11d5f3a0362ec040bd6777b59dda5773119508f77fe17f958b98504da4145
4
+ data.tar.gz: ea70b44b2f4c7c70851b912644b644a648d9361ced1846897424226e741dd380
5
5
  SHA512:
6
- metadata.gz: c8484674e2df9d3eee3844db974a28d06b4030b6609418b6b1d54641ec0e67099632955c6ebd9276bbf23353a66cbf082472791a4764834160f70a04cd8b8f20
7
- data.tar.gz: ed5d589f141897ec1b703f3f0d30628f418e1eca728f6d5d60b9e034ae5ed85956ac1897e33ed77692a8756bdc66965fbb6a8e2525818b9c00eafcbeddc4f9e6
6
+ metadata.gz: fecdcab511f4b1ac9f8f7c6e882238e275127fb05d2380d39c889102e07141e37e990ee32dc77aed3f8773de41b7bd8da56031f425b47671b6db4f95cf4c583e
7
+ data.tar.gz: 53c2e99535d292f2b0a2e5d3b13e137846a1de39e2a6f8d9b2e5f7422a90308a9eac7ebe7e1cc896bac8bf58710d9d5356b5a148d454dfbf607e507dfba85b7b
checksums.yaml.gz.sig CHANGED
Binary file
data/History.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Release History for linkparser
2
2
 
3
3
  ---
4
+ ## v2.3.0 [2023-01-02] Michael Granger <ged@faeriemud.org>
5
+
6
+ Enhancements:
7
+
8
+ - Updated old-style function declarations, made some specs more flexible
9
+ - Update deps, bump default Ruby to 3.2
10
+
4
11
 
5
12
  ## v2.2.0 [2020-12-24] Michael Granger <ged@faeriemud.org>
6
13
 
data/README.md CHANGED
@@ -96,7 +96,7 @@ https://www.gnu.org/licenses/lgpl-2.1.html
96
96
 
97
97
  The gem itself is licensed under the BSD license:
98
98
 
99
- Copyright (c) 2006-2020, The FaerieMUD Consortium
99
+ Copyright (c) 2006-2023, The FaerieMUD Consortium
100
100
  All rights reserved.
101
101
 
102
102
  Redistribution and use in source and binary forms, with or without
@@ -21,7 +21,7 @@
21
21
  * Allocation function
22
22
  */
23
23
  static struct rlink_dictionary *
24
- rlink_dictionary_alloc()
24
+ rlink_dictionary_alloc( void )
25
25
  {
26
26
  struct rlink_dictionary *ptr = ALLOC( struct rlink_dictionary );
27
27
 
@@ -310,7 +310,7 @@ rlink_parse( int argc, VALUE *argv, VALUE self )
310
310
  * file, and then creates all other objects through it.
311
311
  */
312
312
  void
313
- rlink_init_dict()
313
+ rlink_init_dict( void )
314
314
  {
315
315
  #ifdef FOR_RDOC
316
316
  rlink_mLinkParser = rb_define_module( "LinkParser" );
@@ -28,7 +28,7 @@ VALUE max_width_sym;
28
28
  * Allocation function
29
29
  */
30
30
  static struct rlink_linkage *
31
- rlink_linkage_alloc()
31
+ rlink_linkage_alloc( void )
32
32
  {
33
33
  struct rlink_linkage *ptr = ALLOC( struct rlink_linkage );
34
34
 
@@ -136,20 +136,17 @@ rlink_linkage_s_alloc( VALUE klass )
136
136
  * the parse options of the Sentence for the new linkage.
137
137
  */
138
138
  static VALUE
139
- rlink_linkage_init( argc, argv, self )
140
- int argc;
141
- VALUE *argv;
142
- VALUE self;
139
+ rlink_linkage_init( int argc, VALUE *argv, VALUE self )
143
140
  {
144
141
  if ( !check_linkage(self) ) {
145
- int i, link_index, max_index;
142
+ int link_index, max_index;
146
143
  VALUE index, sentence, options, defopts;
147
144
  struct rlink_sentence *sent_ptr;
148
145
  Linkage linkage;
149
146
  Parse_Options opts;
150
147
  struct rlink_linkage *ptr;
151
148
 
152
- i = rb_scan_args( argc, argv, "21", &index, &sentence, &options );
149
+ rb_scan_args( argc, argv, "21", &index, &sentence, &options );
153
150
 
154
151
  defopts = rb_hash_new(); /*rb_funcall( sentence, rb_intern("options"), 0 );*/
155
152
  options = rlink_make_parse_options( defopts, options );
@@ -651,7 +648,7 @@ rlink_linkage_get_violation_name( VALUE self )
651
648
  *
652
649
  */
653
650
  void
654
- rlink_init_linkage()
651
+ rlink_init_linkage( void )
655
652
  {
656
653
  rlink_cLinkage = rb_define_class_under( rlink_mLinkParser, "Linkage", rb_cObject );
657
654
 
@@ -90,7 +90,7 @@ rlink_log( const char *level, const char *fmt, va_dcl )
90
90
  * somewhere useful.
91
91
  */
92
92
  _Noreturn void
93
- rlink_raise_lp_error()
93
+ rlink_raise_lp_error( void )
94
94
  {
95
95
  rb_raise( rlink_eLpError, "Unknown error" );
96
96
  }
@@ -152,7 +152,7 @@ rlink_link_grammar_config( VALUE self )
152
152
  * LinkParser extension init function
153
153
  */
154
154
  void
155
- Init_linkparser_ext()
155
+ Init_linkparser_ext( void )
156
156
  {
157
157
  rlink_mLinkParser = rb_define_module( "LinkParser" );
158
158
 
@@ -726,7 +726,7 @@ rlink_parseopts_reset_resources( VALUE self )
726
726
 
727
727
 
728
728
  void
729
- rlink_init_parseoptions()
729
+ rlink_init_parseoptions( void )
730
730
  {
731
731
  rlink_cParseOptions = rb_define_class_under( rlink_mLinkParser,
732
732
  "ParseOptions", rb_cObject );
@@ -30,7 +30,7 @@
30
30
  * Allocation function
31
31
  */
32
32
  static struct rlink_sentence *
33
- rlink_sentence_alloc()
33
+ rlink_sentence_alloc( void )
34
34
  {
35
35
  struct rlink_sentence *ptr = ALLOC( struct rlink_sentence );
36
36
 
@@ -459,7 +459,7 @@ rlink_sentence_disjunct_cost( VALUE self, VALUE i )
459
459
  *
460
460
  */
461
461
  void
462
- rlink_init_sentence()
462
+ rlink_init_sentence( void )
463
463
  {
464
464
  rlink_cSentence = rb_define_class_under( rlink_mLinkParser, "Sentence",
465
465
  rb_cObject );
data/lib/linkparser.rb CHANGED
@@ -9,7 +9,7 @@ module LinkParser
9
9
 
10
10
 
11
11
  # Release version
12
- VERSION = '2.2.0'
12
+ VERSION = '2.3.0'
13
13
 
14
14
 
15
15
  # Loggability API -- set up a logger
@@ -31,11 +31,11 @@ module LinkParser
31
31
  end
32
32
 
33
33
  require 'linkparser/mixins'
34
+
34
35
  require 'linkparser/dictionary'
35
36
  require 'linkparser/sentence'
36
37
  require 'linkparser/linkage'
37
38
  require 'linkparser/parseoptions'
38
39
 
39
-
40
40
  end # class LinkParser
41
41
 
@@ -333,17 +333,18 @@ describe LinkParser::Linkage do
333
333
 
334
334
 
335
335
  it "should know that it's not an imperative sentence" do
336
- expect( linkage.imperative? ).to be_falsey()
336
+ expect( linkage ).to_not be_imperative()
337
337
  end
338
338
 
339
339
 
340
340
  context "from an imperative sentence" do
341
341
 
342
342
  let( :text ) { "Go to the store!" }
343
+ let( :linkage ) { sentence.linkages.find {|l| l.links.detect {|link| link.label == 'Wi' } } }
343
344
 
344
345
 
345
346
  it "knows that it's an imperative sentence" do
346
- expect( linkage.imperative? ).to be_truthy()
347
+ expect( linkage ).to be_imperative()
347
348
  end
348
349
 
349
350
 
@@ -15,7 +15,7 @@ describe LinkParser::ParseOptions do
15
15
  it "starts out with documented defaults" do
16
16
  expect( opts.verbosity ).to eq( 1 ) # Docs say this is 0
17
17
  expect( opts.linkage_limit ).to eq( 100 ) # Docs say this is 10000
18
- expect( opts.disjunct_cost ).to eq( 2 )
18
+ expect( opts.disjunct_cost ).to eq( -10000 ) # Docs say this is 2.8
19
19
  expect( opts.min_null_count ).to eq( 0 )
20
20
  expect( opts.max_null_count ).to eq( 0 )
21
21
  expect( opts.islands_ok? ).to eq( false )
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIID+DCCAmCgAwIBAgIBAz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qiCj3Ulp1jTv3TOlvRl8fqcfhxUJI0
30
- +5Q82jJODjEN+GaWs0V+NlrbU94cXwS2PH5dXogftB5YYA5Ex8A0ikZ73xns4Hdo
31
- XxdLdd92F5ovxA23j/rKe/IDwqr6FpDkU3nPXH/Qp0TVGv9zZnVJc/Z6ChkuWj8z
32
- pW7JAyyiiHZgKKDReDrA2LA7Zs3o/7KA6UtUH0FHf8LYhcK+pfHk6RtjRe65ffw+
33
- MCh97sQ/Z/MOusb5+QddBmB+k8EicXyGNl4b5L4XpL7fIQu+Y96TB3JEJlShxFD9
34
- k9FjI4d9EP54gS/4
26
+ 9w0BAQsFAAOCAYEASrm1AbEoxACZ9WXJH3R5axV3U0CA4xaETlL2YT+2nOfVBMQ9
27
+ 0ZlkPx6j4ghKJgAIi1TMfDM2JyPJsppQh8tiNccDjWc62UZRY/dq26cMqf/lcI+a
28
+ 6YBuEYvzZfearwVs8tHnXtwYV3WSCoCOQaB+nq2lA1O+nkKNl41WOsVbNama5jx3
29
+ 8cQtVSEEmZy6jIDJ8c5TmBJ7BQUDEUEWA/A3V42Xyctoj7DvUXWE0lP+X6ypAVSr
30
+ lFh3TS64D7NTvxkmg7natUoCvobl6kGl4yMaqE4YRTlfuzhpf91TSOntClqrAOsS
31
+ K1s56WndQj3IoBocdY9mQhDZLtLHofSkymoP8btBlj5SsN24TiF0VMSZlctSCYZg
32
+ GKyHim/MMlIfGOWsgfioq5jzwmql7W4CDubbb8Lkg70v+hN2E/MnNVAcNE3gyaGc
33
+ P5YP5BAbNW+gvd3QHRiWTTuhgHrdDnGdXg93N2M5KHn1ug8BtPLQwlcFwEpKnlLn
34
+ btEP+7EplFuoiMfd
35
35
  -----END CERTIFICATE-----
36
- date: 2020-12-24 00:00:00.000000000 Z
36
+ date: 2023-01-02 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: loggability
@@ -55,58 +55,44 @@ dependencies:
55
55
  requirements:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: '1.1'
58
+ version: '1.2'
59
59
  type: :runtime
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - "~>"
64
64
  - !ruby/object:Gem::Version
65
- version: '1.1'
66
- - !ruby/object:Gem::Dependency
67
- name: rdoc
68
- requirement: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - "~>"
71
- - !ruby/object:Gem::Version
72
- version: '6.2'
73
- type: :runtime
74
- prerelease: false
75
- version_requirements: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - "~>"
78
- - !ruby/object:Gem::Version
79
- version: '6.2'
65
+ version: '1.2'
80
66
  - !ruby/object:Gem::Dependency
81
67
  name: rake-deveiate
82
68
  requirement: !ruby/object:Gem::Requirement
83
69
  requirements:
84
70
  - - "~>"
85
71
  - !ruby/object:Gem::Version
86
- version: '0.15'
72
+ version: '0.21'
87
73
  type: :development
88
74
  prerelease: false
89
75
  version_requirements: !ruby/object:Gem::Requirement
90
76
  requirements:
91
77
  - - "~>"
92
78
  - !ruby/object:Gem::Version
93
- version: '0.15'
79
+ version: '0.21'
94
80
  - !ruby/object:Gem::Dependency
95
- name: rdoc-generator-fivefish
81
+ name: rdoc-generator-sixfish
96
82
  requirement: !ruby/object:Gem::Requirement
97
83
  requirements:
98
84
  - - "~>"
99
85
  - !ruby/object:Gem::Version
100
- version: '0.4'
86
+ version: '0.2'
101
87
  type: :development
102
88
  prerelease: false
103
89
  version_requirements: !ruby/object:Gem::Requirement
104
90
  requirements:
105
91
  - - "~>"
106
92
  - !ruby/object:Gem::Version
107
- version: '0.4'
108
- description: This module is a Ruby binding for the Abiword version of CMU&#39;s Link
109
- Grammar, a syntactic parser of English.
93
+ version: '0.2'
94
+ description: This module is a Ruby binding for the Abiword version of CMUs Link Grammar,
95
+ a syntactic parser of English.
110
96
  email:
111
97
  - ged@faeriemud.org
112
98
  executables: []
@@ -161,9 +147,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
147
  - !ruby/object:Gem::Version
162
148
  version: '0'
163
149
  requirements: []
164
- rubygems_version: 3.1.4
150
+ rubygems_version: 3.4.1
165
151
  signing_key:
166
152
  specification_version: 4
167
- summary: This module is a Ruby binding for the Abiword version of CMU&#39;s Link Grammar,
153
+ summary: This module is a Ruby binding for the Abiword version of CMUs Link Grammar,
168
154
  a syntactic parser of English.
169
155
  test_files: []
metadata.gz.sig CHANGED
Binary file