engtagger 0.4.3 → 0.4.5

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: 688eb41815586b529212a5451966f0cb2a1f4027c8aeb1c949fb437f1c8e5b4a
4
- data.tar.gz: 1c7eea0dccc4c52133506220861c3ccce512d84f75df10060419dce5d24dfb8f
3
+ metadata.gz: be5e5dcb477d743356b79d58eadb358a4bd1a47e2b318011313ea46a577402f9
4
+ data.tar.gz: c8c0fa1024e6d2ad2bb3d619eb92b259f7fe25076ad82119345c5ceab192af45
5
5
  SHA512:
6
- metadata.gz: 3e5d673b7dd49cbe468c915e247f7d7e6b13002dc1b67e4e98c4e2d9066165f6cc6e0426d1393ff2711a4fb9df1294e44e9dbfc4c89e2b685b32a49482cd68c6
7
- data.tar.gz: 609562c6c5cc2ea37762ff27e16a8689d569389eb9bf31af413d702e421a78d47acc8bdf993a1acffdce19631c565ca3452f371936f005e395db7f930933695e
6
+ metadata.gz: 2cd4aa320c5c01fa830b68163c8a0b88acc5a87eb91e6ccc2880adb033d6d291be75542867efc7fe8610257cb4cafd61714abaff59f1cb674e07ae5e38820be3
7
+ data.tar.gz: 5ad319a0decea08e49b1b68022d86d0b9e856524bbaa684fe518199139f7cfd7e708d218910780ec052a633b685f8a9bb68876b7b3c27f87da446d5d06f3b434
data/.gitattributes ADDED
@@ -0,0 +1,4 @@
1
+ # Packaging reads the working tree (gemspec uses `git ls-files`), so a
2
+ # checkout that rewrites line endings would ship a corrupted model or lexicon.
3
+ *.etm.gz binary
4
+ *.hash binary
data/.gitignore CHANGED
@@ -16,3 +16,6 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  /.idea
19
+ experiments/
20
+
21
+ .DS_Store
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ AllCops:
3
3
  SuggestExtensions: false
4
4
  TargetRubyVersion: 2.6
5
5
 
6
- Documentation:
6
+ Style/Documentation:
7
7
  Enabled: false
8
8
 
9
9
  Naming/AccessorMethodName:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.5 (2026-08-14)
4
+
5
+ License metadata correction; no code changes. This library is a port (2009) of
6
+ Perl Lingua::EN::Tagger, which has been licensed GPL-3.0-only since its
7
+ version 0.14 (2008). As a derivative work EngTagger is therefore GPL-3.0-only:
8
+ the bundled LICENSE is now the GPLv3 text and the gemspec declares
9
+ `GPL-3.0-only`. Earlier releases carried a GPLv2 license text, and 0.4.4
10
+ declared `GPL-2.0-or-later`; both were inaccurate.
11
+
12
+ ## 0.4.4 (2026-08-14)
13
+
14
+ This is the final planned release of the 0.4 line. Version 2.0 replaces the
15
+ HMM engine with an averaged perceptron and does not ship the Penn
16
+ Treebank-derived probability tables, so its tagging output differs. Pin
17
+ `gem "engtagger", "~> 0.4"` to stay on this line; it will receive critical
18
+ fixes only.
19
+
20
+ - Fix the test suite silently rewriting the bundled lexicon files
21
+ (`lib/engtagger/*.hash`) on every run: a path-join bug in the test setup made
22
+ the existence check always fail, so `install` ran before each test. This was
23
+ also the enabler of the 0600-permission contamination behind #20. Tests are
24
+ ~6x faster as a result.
25
+ - `get_sentences` now applies its intended punctuation cleanup. Four of its
26
+ five reattachment rules had discarded their results since the original port
27
+ (only the leading-backquote rule was ever applied), and their regexes were
28
+ corrupted by string escaping (`\W` matched a literal "W"). Sentences returned
29
+ by this method now read naturally (`"Lisa Raines, a lawyer,"`,`"$3"`).
30
+ Known limitation carried over from the tokenizer: contractions other than
31
+ possessives remain space-separated (`"I 'm"`, `"is n't"`).
32
+ - Fix the public `WORD` constant, whose regex was corrupted by the same
33
+ escaping problem and matched only `<w>`-style tags.
34
+ - Tag regexes produced by `EngTagger.get_ext` (NUM, NN, SEN, etc.) now end with
35
+ a real `\s*`, so they consume trailing whitespace including newlines instead
36
+ of spaces only.
37
+ - `assign_tag` no longer raises `NoMethodError` for words absent from the
38
+ lexicon; it returns `""` so callers fall back to `"nn"` as designed.
39
+ - `EngTagger::VERSION` is now defined at runtime (`engtagger/version` was not
40
+ required by the library itself).
41
+ - Read and write the Marshal lexicon files in binary mode to avoid corruption
42
+ on Windows.
43
+ - Remove the stray shebang and executable bit from `lib/engtagger.rb`, and the
44
+ obsolete `require "rubygems"`.
45
+ - Clarify licensing: the LICENSE file had a stray MIT license appended after
46
+ the GPLv2 text. The library is licensed as GPL-2.0-or-later; the MIT tail has
47
+ been removed and the gemspec now declares the SPDX identifier.
48
+ - Gemspec: use the https homepage URL, add `metadata` URIs, and drop the
49
+ obsolete `test_files`.
50
+ - Fix a dead test (`text_get_ext` typo) that had never run and would have
51
+ failed if enabled.
52
+ - Note in the README that 0.4.x carries Penn Treebank-derived probability
53
+ tables; 2.x is trained on openly licensed data instead.
54
+
3
55
  ## 0.4.3
4
56
 
5
57
  - Fix gem packaging that produced files with owner-only (0600) permissions,
data/Gemfile CHANGED
@@ -5,5 +5,6 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  gem "rake"
8
+ gem "rubocop", require: false
8
9
  gem "sin_lru_redux"
9
10
  gem "test-unit"