sentencepiece 0.1.0 → 0.2.1

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: 63aaf69a72781f0087072db8197b9ae3a126b63e632b52bded5b483ff7b2c6b4
4
- data.tar.gz: 5ffbd48ed587ef57fd3b427615cc21f4d79804ea90598f9db2178ceff702ca57
3
+ metadata.gz: 80ae3390c530c8f096ae2a05f22480f2c96369b91cf707aa38389dad1071d70b
4
+ data.tar.gz: 0e8ab7972f7b81a6b2ab33a36513769dd579450bfeace245352da13fa1f76d07
5
5
  SHA512:
6
- metadata.gz: 61b91c838bbdb2f7c47166036b890b545060361e91a66e6cf416206f53d84595cc74052a38df083ad507a6f219d0b2b8ba3667095d2d3514b5ba0c3660967ee5
7
- data.tar.gz: 467c2f252e23fbfe684486d42af9fe0eedd058dd99361fc5652bb83412ae801571e5e25879b2f1bb6734c997b9c04f4287378c595afa3698b06885631c8fdcae
6
+ metadata.gz: e276f50ca53f403bb1840f5fa0850baf8cf2638a5b6b8ba34d0d05f858b92b2d3b063f73c2d8a654c7ed84cd1f1938722288c727d08eb29566f092cd37667afe
7
+ data.tar.gz: c00786e7fee6c2c0f8551339d3d316ce471b27d136a58c6cc7c8e5a1bbd45439888c67956eaca881efa4516181aa457c8a4f279720a5bac81538a911658c390f
data/CHANGELOG.md CHANGED
@@ -1,11 +1,17 @@
1
- ## [Unreleased]
1
+ ## [[0.2.1](https://github.com/yoshoku/sentencepiece.rb/compare/v0.2.0...v0.2.1)] - 2026-02-16
2
2
 
3
- ## [0.1.0] - 2023-03-26
3
+ - Remove libstdc++ loading check from native extensions build step.
4
+
5
+ ## [[0.2.0](https://github.com/yoshoku/sentencepiece.rb/compare/v0.1.0...v0.2.0)] - 2025-12-29
6
+
7
+ - Change to specify `c++17` with -std option as recent sentencepiece uses `std::string_view`.
8
+
9
+ ## [[0.1.0](https://github.com/yoshoku/sentencepiece.rb/compare/v0.0.2...v0.1.0)] - 2023-03-26
4
10
 
5
11
  - Add API documentation.
6
12
  - Add type signatures.
7
13
 
8
- ## [0.0.2] - 2023-03-26
14
+ ## [[0.0.2](https://github.com/yoshoku/sentencepiece.rb/compare/v0.0.1...v0.0.2)] - 2023-03-26
9
15
 
10
16
  - Add SentencePieceTrainer class.
11
17
  - Add some encoding and decoding methods to SentencePieceProcessor.
@@ -2,13 +2,16 @@
2
2
 
3
3
  require 'mkmf'
4
4
 
5
- abort 'libstdc++ is not found.' unless have_library('stdc++')
6
5
  abort 'libsentencepiece is not found.' unless have_library('sentencepiece')
7
6
  abort 'libsentencepiece_train is not found.' unless have_library('sentencepiece_train')
8
7
 
9
8
  # abort 'sentencepiece_processor.h is not found.' unless have_header('sentencepiece_processor.h')
10
9
  # abort 'sentencepiece_trainer.h is not found.' unless have_header('sentencepiece_trainer.h')
11
10
 
12
- $CXXFLAGS << ' -std=c++11'
11
+ $CXXFLAGS << if /mswin/ =~ RUBY_PLATFORM
12
+ '/std:c++17'
13
+ else
14
+ ' -std=c++17'
15
+ end
13
16
 
14
17
  create_makefile('sentencepiece/sentencepiece')
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * sentencepiece.rb provides Ruby bindings for the SentencePiece.
3
3
  *
4
- * Copyright (c) 2023 Atsushi Tatsuma
4
+ * Copyright (c) 2023-2026 Atsushi Tatsuma
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * sentencepiece.rb provides Ruby bindings for the SentencePiece.
3
3
  *
4
- * Copyright (c) 2023 Atsushi Tatsuma
4
+ * Copyright (c) 2023-2026 Atsushi Tatsuma
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -79,6 +79,7 @@ public:
79
79
  rb_define_method(rb_cSentencePieceProcessor, "bos_id", RUBY_METHOD_FUNC(_sentencepiece_processor_bos_id), 0);
80
80
  rb_define_method(rb_cSentencePieceProcessor, "eos_id", RUBY_METHOD_FUNC(_sentencepiece_processor_eos_id), 0);
81
81
  rb_define_method(rb_cSentencePieceProcessor, "pad_id", RUBY_METHOD_FUNC(_sentencepiece_processor_pad_id), 0);
82
+ rb_define_alias(rb_cSentencePieceProcessor, "vocab_size", "piece_size");
82
83
  return rb_cSentencePieceProcessor;
83
84
  };
84
85
 
@@ -3,5 +3,5 @@
3
3
  # sentencepiece.rb provides Ruby bindings for the SentencePiece.
4
4
  module SentencePiece
5
5
  # The version of sentencepiece.rb you install.
6
- VERSION = '0.1.0'
6
+ VERSION = '0.2.1'
7
7
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentencepiece
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-03-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: |
14
13
  sentencepiece.rb provides Ruby bindings for the SentencePiece,
@@ -38,7 +37,6 @@ metadata:
38
37
  changelog_uri: https://github.com/yoshoku/sentencepiece.rb/blob/main/CHANGELOG.md
39
38
  documentation_uri: https://yoshoku.github.io/sentencepiece.rb/doc/
40
39
  rubygems_mfa_required: 'true'
41
- post_install_message:
42
40
  rdoc_options: []
43
41
  require_paths:
44
42
  - lib
@@ -53,8 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
51
  - !ruby/object:Gem::Version
54
52
  version: '0'
55
53
  requirements: []
56
- rubygems_version: 3.3.26
57
- signing_key:
54
+ rubygems_version: 4.0.3
58
55
  specification_version: 4
59
56
  summary: Ruby bindings for the SentencePiece
60
57
  test_files: []