sentencepiece 0.1.0 → 0.2.0

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: 45cc838c2108753b87e03e3aee4bf3665f1e8c6e0cd407e5a68355b44657c582
4
+ data.tar.gz: 14d29d47f2a78b57218ceaf45c12a30de270f000c5d6d756b6b66a767a2ee128
5
5
  SHA512:
6
- metadata.gz: 61b91c838bbdb2f7c47166036b890b545060361e91a66e6cf416206f53d84595cc74052a38df083ad507a6f219d0b2b8ba3667095d2d3514b5ba0c3660967ee5
7
- data.tar.gz: 467c2f252e23fbfe684486d42af9fe0eedd058dd99361fc5652bb83412ae801571e5e25879b2f1bb6734c997b9c04f4287378c595afa3698b06885631c8fdcae
6
+ metadata.gz: ac0b780ec734901f030bbfdcf91949401b40064d89480fa54d303d7d83f707e42e0ba897cf342ea4650402b350deac2da4c1017cac7c278adb1272e5cee0834e
7
+ data.tar.gz: b03e10826137a4d3d1002906af0e8e46014eafed08da76fb5494e7b5311deaf002b40b7771b7299ef1b39cb2349e1fa9f5f3262020479d2655a2ede9c3db4f03
data/CHANGELOG.md CHANGED
@@ -1,11 +1,13 @@
1
- ## [Unreleased]
1
+ ## [[0.2.0](https://github.com/yoshoku/sentencepiece.rb/compare/v0.1.0...v0.2.0)] - 2025-12-29
2
2
 
3
- ## [0.1.0] - 2023-03-26
3
+ - Change to specify `c++17` with -std option as recent sentencepiece uses `std::string_view`.
4
+
5
+ ## [[0.1.0](https://github.com/yoshoku/sentencepiece.rb/compare/v0.0.2...v0.1.0)] - 2023-03-26
4
6
 
5
7
  - Add API documentation.
6
8
  - Add type signatures.
7
9
 
8
- ## [0.0.2] - 2023-03-26
10
+ ## [[0.0.2](https://github.com/yoshoku/sentencepiece.rb/compare/v0.0.1...v0.0.2)] - 2023-03-26
9
11
 
10
12
  - Add SentencePieceTrainer class.
11
13
  - Add some encoding and decoding methods to SentencePieceProcessor.
@@ -9,6 +9,10 @@ abort 'libsentencepiece_train is not found.' unless have_library('sentencepiece_
9
9
  # abort 'sentencepiece_processor.h is not found.' unless have_header('sentencepiece_processor.h')
10
10
  # abort 'sentencepiece_trainer.h is not found.' unless have_header('sentencepiece_trainer.h')
11
11
 
12
- $CXXFLAGS << ' -std=c++11'
12
+ $CXXFLAGS << if /mswin/ =~ RUBY_PLATFORM
13
+ '/std:c++17'
14
+ else
15
+ ' -std=c++17'
16
+ end
13
17
 
14
18
  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-2025 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-2025 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.0'
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.0
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: []