wapiti 2.0.0 → 2.1.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: 3b74106d7614faa9118a4eb41c4c93c83529811262925e5dbc4938494b5f5ea2
4
- data.tar.gz: 99f234680ae7c6c671e82dc6b2c4ae585056dc2e921ed795e2307ee7acde9bee
3
+ metadata.gz: 13cbaf03c29f1a8c1aae4e4f766dab2eb906da59ee821eddb5a0d3a4c2e2587d
4
+ data.tar.gz: 8ea99657736efa5374c2f33225247f2dd307fa6431c119b4f83b6e4a17fe293b
5
5
  SHA512:
6
- metadata.gz: b10b669fb51366ee7ebf3171d2b4ecb2d16f839864023ea96f87ca6536341556eef3078869636567623237ae3e537bd0be6186f62c3d9ce70f08aa9283fde994
7
- data.tar.gz: 0774e1613e495969be07685fe426002a6992a9bb1da91d34b0a2716bad4486dc061a1a9dc9e70fa0ce0ed5434241fdca871ae77e8209eda7e7edd42874a3fb48
6
+ metadata.gz: 9ebb1b481e51f6dfbdfc67a04e2f10a117add1919474ecfc0bf424420c1a227bf9b180fe471a38c4e1a4365ba38a829b0dc3d6a65002d622a98ba1132f7cb9a0
7
+ data.tar.gz: aa0b4c8a81eee4dfe2f1240f68de09f57b4f4776310a51f96d68ba18b02a719cd14f80499800a6470f178660b11cc428f51ecd36236c32c13e633462cbbfbdcf
@@ -0,0 +1,46 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [ main ]
5
+ pull_request:
6
+ branches: [ main ]
7
+ concurrency:
8
+ group: ci-${{ github.ref }}
9
+ cancel-in-progress: true
10
+ jobs:
11
+ ci:
12
+ name: ${{ matrix.ruby-version }} ${{ matrix.friendlyName }}-${{ matrix.arch }}
13
+ runs-on: ${{ matrix.os }}
14
+
15
+ strategy:
16
+ matrix:
17
+ ruby-version:
18
+ - "2.6"
19
+ - "2.7"
20
+ - "3.0"
21
+ - "3.1"
22
+ - "3.2"
23
+ os:
24
+ - ubuntu-latest
25
+ - macos-latest
26
+ - windows-latest
27
+ arch:
28
+ - x64
29
+ include:
30
+ - os: ubuntu-latest
31
+ friendlyName: Linux
32
+ - os: macos-latest
33
+ friendlyName: macOS
34
+ - os: windows-latest
35
+ friendlyName: Windows
36
+
37
+ steps:
38
+ - name: Checkout repository
39
+ uses: actions/checkout@v3
40
+ - name: Setup Ruby and install bundle
41
+ uses: ruby/setup-ruby@v1
42
+ with:
43
+ ruby-version: ${{ matrix.ruby-version }}
44
+ bundler-cache: true
45
+ - name: Compile and run test
46
+ run: bundle exec rake
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ 2.1.0 / 2023-01-02
2
+ ==================
3
+ * Removed tainted strings checks (deprecated in Ruby 3.2)
4
+
1
5
  1.0.5 / 2019-05-13
2
6
  ==================
3
7
  * Updated examples in README.md to current API
data/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
1
  Wapiti-Ruby
2
- Copyright 2011-2018 Sylvester Keil. All rights reserved.
2
+ Copyright 2011-2023 Sylvester Keil. All rights reserved.
3
3
 
4
4
  Wapiti - A linear-chain CRF tool
5
5
  Copyright 2009-2013 CNRS. All rights reserved.
data/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  Wapiti-Ruby
2
2
  ===========
3
+ [![CI](https://github.com/inukshuk/wapiti-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/inukshuk/wapiti-ruby/actions/workflows/ci.yml)
4
+
3
5
  The Wapiti-Ruby gem provides a wicked fast linear-chain CRF
4
6
  ([Conditional Random Fields](http://en.wikipedia.org/wiki/Conditional_random_field))
5
7
  API for sequence segmentation and labelling; it is based on the
6
8
  codebase of [wapiti](http://wapiti.limsi.fr/).
7
9
 
8
- [![Linux Build Status](https://travis-ci.org/inukshuk/wapiti-ruby.svg?branch=master)](https://travis-ci.org/inukshuk/wapiti-ruby)
9
- [![Windows Build Status](https://ci.appveyor.com/api/projects/status/12rtxe2o8p55g1w6/branch/master?svg=true)](https://ci.appveyor.com/project/inukshuk/wapiti-ruby/branch/master)
10
- [![Coverage Status](https://coveralls.io/repos/github/inukshuk/wapiti-ruby/badge.svg?branch=master)](https://coveralls.io/github/inukshuk/wapiti-ruby?branch=master)
11
10
 
12
11
  Requirements
13
12
  ------------
@@ -142,7 +141,7 @@ example, fix the bug and submit a pull request.
142
141
 
143
142
  License
144
143
  -------
145
- Copyright 2011-2020 Sylvester Keil. All rights reserved.
144
+ Copyright 2011-2023 Sylvester Keil. All rights reserved.
146
145
 
147
146
  Copyright 2009-2013 CNRS. All rights reserved.
148
147
 
data/ext/wapiti/tools.c CHANGED
@@ -44,10 +44,6 @@ FILE *ufopen(VALUE path, const char *mode) {
44
44
  FILE *file = (FILE*)0;
45
45
  Check_Type(path, T_STRING);
46
46
 
47
- if (rb_obj_tainted(path)) {
48
- fatal("failed to open file from tainted string '%s'", StringValueCStr(path));
49
- }
50
-
51
47
  if (!(file = fopen(StringValueCStr(path), mode))) {
52
48
  pfatal("failed to open file '%s'", StringValueCStr(path));
53
49
  }
@@ -39,9 +39,6 @@ module Wapiti
39
39
  end
40
40
 
41
41
  def open(path, format: File.extname(path), **opts)
42
- raise ArgumentError,
43
- "cannot open dataset from tainted path: '#{path}'" if path.tainted?
44
-
45
42
  input = File.read(path, encoding: 'utf-8')
46
43
  case format.downcase
47
44
  when '.xml', 'xml'
@@ -141,9 +138,6 @@ module Wapiti
141
138
  end
142
139
 
143
140
  def save(path, format: File.extname(path), **opts)
144
- raise ArgumentError,
145
- "cannot write dataset to tainted path: '#{path}'" if path.tainted?
146
-
147
141
  output = case format.downcase
148
142
  when '.txt', 'txt'
149
143
  to_s(**opts)
@@ -1,3 +1,3 @@
1
1
  module Wapiti
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wapiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2023-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -49,6 +49,7 @@ extra_rdoc_files:
49
49
  - HISTORY.md
50
50
  - LICENSE
51
51
  files:
52
+ - ".github/workflows/ci.yml"
52
53
  - HISTORY.md
53
54
  - LICENSE
54
55
  - README.md
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  - !ruby/object:Gem::Version
122
123
  version: '0'
123
124
  requirements: []
124
- rubygems_version: 3.2.15
125
+ rubygems_version: 3.4.2
125
126
  signing_key:
126
127
  specification_version: 4
127
128
  summary: Wicked fast Conditional Random Fields for Ruby.