add patch2 to sentencepiece
This commit is contained in:
parent
fe52606635
commit
4a430e108e
22
fix_of_an_unattainable_condition.patch
Normal file
22
fix_of_an_unattainable_condition.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/third_party/esaxx/sais.hxx b/third_party/esaxx/sais.hxx
|
||||||
|
index f1702f8..b9071c8 100644
|
||||||
|
--- a/third_party/esaxx/sais.hxx
|
||||||
|
+++ b/third_party/esaxx/sais.hxx
|
||||||
|
@@ -179,7 +179,7 @@ typedef typename std::iterator_traits<string_type>::value_type char_type;
|
||||||
|
sort all the S-substrings */
|
||||||
|
if(fs < (maxthreads * k)) {
|
||||||
|
index_type *C, *B;
|
||||||
|
- if((C = new index_type[maxthreads * k]) == 0) { return -2; }
|
||||||
|
+ C = new index_type[maxthreads * k];
|
||||||
|
B = (1 < maxthreads) ? C + k : C;
|
||||||
|
getCounts(T, C, n, k); getBuckets(C, B, k, true); /* find ends of buckets */
|
||||||
|
#ifdef _OPENMP
|
||||||
|
@@ -271,7 +271,7 @@ typedef typename std::iterator_traits<string_type>::value_type char_type;
|
||||||
|
/* stage 3: induce the result for the original problem */
|
||||||
|
if(fs < (maxthreads * k)) {
|
||||||
|
index_type *B, *C;
|
||||||
|
- if((C = new index_type[maxthreads * k]) == 0) { return -2; }
|
||||||
|
+ C = new index_type[maxthreads * k];
|
||||||
|
B = (1 < maxthreads) ? C + k : C;
|
||||||
|
/* put all left-most S characters into their buckets */
|
||||||
|
getCounts(T, C, n, k); getBuckets(C, B, k, true); /* find ends of buckets */
|
||||||
@ -1,11 +1,12 @@
|
|||||||
Name: sentencepiece
|
Name: sentencepiece
|
||||||
Version: 0.1.92
|
Version: 0.1.92
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: An unsupervised text tokenizer and detokenizer
|
Summary: An unsupervised text tokenizer and detokenizer
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/google/sentencepiece
|
URL: https://github.com/google/sentencepiece
|
||||||
Source0: https://github.com/google/sentencepiece/archive/v%{version}.tar.gz
|
Source0: https://github.com/google/sentencepiece/archive/v%{version}.tar.gz
|
||||||
Patch0: Removed-codes-where-Zero-Width-Joiner-replaced-with-.patch
|
Patch0: Removed-codes-where-Zero-Width-Joiner-replaced-with-.patch
|
||||||
|
Patch1: fix_of_an_unattainable_condition.patch
|
||||||
BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf
|
BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf
|
||||||
BuildRequires: cmake >= 3.14.0
|
BuildRequires: cmake >= 3.14.0
|
||||||
Requires: protobuf protobuf-compiler
|
Requires: protobuf protobuf-compiler
|
||||||
@ -48,6 +49,8 @@ make install
|
|||||||
%{_includedir}/sentencepiece_*.h
|
%{_includedir}/sentencepiece_*.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 2 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-4
|
||||||
|
- fix of an unattainable condition
|
||||||
* Tue Nov 2 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-3
|
* Tue Nov 2 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-3
|
||||||
- Prevent Zero Width Joiner replaced with whitespace
|
- Prevent Zero Width Joiner replaced with whitespace
|
||||||
* Wed Sep 29 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-2
|
* Wed Sep 29 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user