tokenizers 0.5.4-x64-mingw-ucrt → 0.6.0-x64-mingw-ucrt

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.
Binary file
Binary file
Binary file
@@ -1,13 +1,13 @@
1
1
  module Tokenizers
2
2
  module FromPretrained
3
3
  # for user agent
4
- TOKENIZERS_VERSION = "0.21.0"
4
+ TOKENIZERS_VERSION = "0.22.0"
5
5
 
6
6
  # use Ruby for downloads
7
7
  # this avoids the need to vendor OpenSSL on Linux
8
8
  # and reduces the extension size by about half
9
9
  def from_pretrained(identifier, revision: "main", auth_token: nil)
10
- require "cgi"
10
+ require "cgi/escape"
11
11
  require "digest"
12
12
  require "fileutils"
13
13
  require "json"
@@ -1,15 +1,16 @@
1
1
  module Tokenizers
2
2
  module Trainers
3
3
  class UnigramTrainer
4
- def self.new(vocab_size: 8000,
5
- show_progress: true,
6
- special_tokens: [],
7
- initial_alphabet: [],
8
- shrinking_factor: 0.75,
9
- unk_token: nil,
10
- max_piece_length: 16,
11
- n_sub_iterations: 2)
12
-
4
+ def self.new(
5
+ vocab_size: 8000,
6
+ show_progress: true,
7
+ special_tokens: [],
8
+ initial_alphabet: [],
9
+ shrinking_factor: 0.75,
10
+ unk_token: nil,
11
+ max_piece_length: 16,
12
+ n_sub_iterations: 2
13
+ )
13
14
  _new({
14
15
  vocab_size: vocab_size,
15
16
  show_progress: show_progress,
@@ -1,15 +1,16 @@
1
1
  module Tokenizers
2
2
  module Trainers
3
3
  class WordPieceTrainer
4
- def self.new(vocab_size: 30000,
5
- min_frequency: 0,
6
- show_progress: true,
7
- special_tokens: [],
8
- limit_alphabet: nil,
9
- initial_alphabet: [],
10
- continuing_subword_prefix: "##",
11
- end_of_word_suffix: nil)
12
-
4
+ def self.new(
5
+ vocab_size: 30000,
6
+ min_frequency: 0,
7
+ show_progress: true,
8
+ special_tokens: [],
9
+ limit_alphabet: nil,
10
+ initial_alphabet: [],
11
+ continuing_subword_prefix: "##",
12
+ end_of_word_suffix: nil
13
+ )
13
14
  _new({
14
15
  vocab_size: vocab_size,
15
16
  min_frequency: min_frequency,
@@ -1,3 +1,3 @@
1
1
  module Tokenizers
2
- VERSION = "0.5.4"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tokenizers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-29 00:00:00.000000000 Z
11
+ date: 2025-08-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -23,7 +23,6 @@ files:
23
23
  - LICENSE.txt
24
24
  - README.md
25
25
  - lib/tokenizers.rb
26
- - lib/tokenizers/3.1/tokenizers.so
27
26
  - lib/tokenizers/3.2/tokenizers.so
28
27
  - lib/tokenizers/3.3/tokenizers.so
29
28
  - lib/tokenizers/3.4/tokenizers.so
@@ -69,7 +68,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
68
  requirements:
70
69
  - - ">="
71
70
  - !ruby/object:Gem::Version
72
- version: '3.1'
71
+ version: '3.2'
73
72
  - - "<"
74
73
  - !ruby/object:Gem::Version
75
74
  version: 3.5.dev
Binary file