engtagger 0.4.2 → 0.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 043237e54c8a17bcf8871e4a45a6231fb84cf75a6a975cfb027f2bdc2cda7fa9
4
- data.tar.gz: 6bc1e9161ade26750731d4d9c11ecad6e406dc3edfcc1774bd1e52970890c6dd
3
+ metadata.gz: 688eb41815586b529212a5451966f0cb2a1f4027c8aeb1c949fb437f1c8e5b4a
4
+ data.tar.gz: 1c7eea0dccc4c52133506220861c3ccce512d84f75df10060419dce5d24dfb8f
5
5
  SHA512:
6
- metadata.gz: bcae03556ad6402de71668519418889b76b9b850e18719b5e91c5d9bd0095725676523fb4e9bc51114f11e01dd18c44d9d21bcab30cd5ef58b8780707030233e
7
- data.tar.gz: 2f518f2f6968838cca458ec1ee51a614ae332b43dce59302ec6fe746b24923b868a682bb9b2d2c7c656989d68bc9d66ddc3a0d26869da6a98561748f23336cf9
6
+ metadata.gz: 3e5d673b7dd49cbe468c915e247f7d7e6b13002dc1b67e4e98c4e2d9066165f6cc6e0426d1393ff2711a4fb9df1294e44e9dbfc4c89e2b685b32a49482cd68c6
7
+ data.tar.gz: 609562c6c5cc2ea37762ff27e16a8689d569389eb9bf31af413d702e421a78d47acc8bdf993a1acffdce19631c565ca3452f371936f005e395db7f930933695e
data/.gitignore CHANGED
@@ -16,6 +16,3 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  /.idea
19
- .rubocop.yml
20
- .solargraph.yml
21
- .yardopts
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## 0.4.3
4
+
5
+ - Fix gem packaging that produced files with owner-only (0600) permissions,
6
+ making the gem unreadable after a `sudo gem install` (#20). File permissions
7
+ are now normalized before packaging.
8
+ - Restore lost debug output in `valid_text` (a remnant of the Perl port left
9
+ the message string in void context).
10
+ - Clarify that the VBG tag covers both gerunds and present participles, as in
11
+ the Penn Treebank tagset (#19).
12
+ - Minor RuboCop cleanups.
13
+
14
+ ## 0.4.2 and earlier
15
+
16
+ See the [commit history](https://github.com/yohasebe/engtagger/commits/master).
data/Gemfile CHANGED
@@ -5,5 +5,5 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  gem "rake"
8
- gem "test-unit"
9
8
  gem "sin_lru_redux"
9
+ gem "test-unit"
data/README.md CHANGED
@@ -104,7 +104,7 @@ The set of POS tags used here is a modified version of the Penn Treebank tagset.
104
104
  UH Interjection oh, yes, mmm
105
105
  VB Verb, infinitive take, live
106
106
  VBD Verb, past tense took, lived
107
- VBG Verb, gerund taking, living
107
+ VBG Verb, gerund or present participle taking, living
108
108
  VBN Verb, past/passive participle taken, lived
109
109
  VBP Verb, base present form take, live
110
110
  VBZ Verb, present 3SG -s form takes, lives
data/Rakefile CHANGED
@@ -8,3 +8,13 @@ Rake::TestTask.new do |t|
8
8
  t.test_files = FileList["test/test*.rb"]
9
9
  t.verbose = true
10
10
  end
11
+
12
+ # Gem packaging preserves on-disk file modes; owner-only permissions here
13
+ # produce gems whose files are unreadable after a sudo install (issue #20).
14
+ task :normalize_permissions do
15
+ `git ls-files -z`.split("\x0").each do |f|
16
+ File.chmod(File.executable?(f) ? 0o755 : 0o644, f)
17
+ end
18
+ end
19
+
20
+ Rake::Task["build"].enhance([:normalize_permissions])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class EngTagger
4
- VERSION = "0.4.2"
4
+ VERSION = "0.4.3"
5
5
  end
data/lib/engtagger.rb CHANGED
@@ -128,7 +128,7 @@ class EngTagger
128
128
  "UH", "Interjection",
129
129
  "VB", "Verb, infinitive",
130
130
  "VBD", "Verb, past tense",
131
- "VBG", "Verb, gerund",
131
+ "VBG", "Verb, gerund or present participle",
132
132
  "VBN", "Verb, past/passive participle",
133
133
  "VBP", "Verb, base present form",
134
134
  "VBZ", "Verb, present 3SG -s form",
@@ -645,7 +645,7 @@ class EngTagger
645
645
  def valid_text(text)
646
646
  if !text
647
647
  # there's nothing to parse
648
- "method call on uninitialized variable" if @conf[:debug]
648
+ puts "method call on uninitialized variable" if @conf[:debug]
649
649
  false
650
650
  elsif /\A\s*\z/ =~ text
651
651
  # text is an empty string, nothing to parse
@@ -839,7 +839,7 @@ class EngTagger
839
839
  when /\w-\w/o # Hyphenated word
840
840
  /-([^-]+)\z/ =~ word
841
841
  h_suffix = $1
842
- if h_suffix && (@@lexicon[h_suffix] && @@lexicon[h_suffix]["jj"])
842
+ if h_suffix && @@lexicon[h_suffix] && @@lexicon[h_suffix]["jj"]
843
843
  # last part of this is defined as an adjective
844
844
  "-hyp-adj-"
845
845
  else
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engtagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoichiro Hasebe
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: sin_lru_redux
@@ -37,6 +36,7 @@ files:
37
36
  - ".rubocop.yml"
38
37
  - ".solargraph.yml"
39
38
  - ".yardopts"
39
+ - CHANGELOG.md
40
40
  - Gemfile
41
41
  - LICENSE
42
42
  - README.md
@@ -54,7 +54,6 @@ homepage: http://github.com/yohasebe/engtagger
54
54
  licenses:
55
55
  - GPL
56
56
  metadata: {}
57
- post_install_message:
58
57
  rdoc_options: []
59
58
  require_paths:
60
59
  - lib
@@ -69,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
68
  - !ruby/object:Gem::Version
70
69
  version: '0'
71
70
  requirements: []
72
- rubygems_version: 3.5.9
73
- signing_key:
71
+ rubygems_version: 3.6.9
74
72
  specification_version: 4
75
73
  summary: A probability based, corpus-trained English POS tagger
76
74
  test_files: []