代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/sentencepiece 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Name: sentencepiece
Version: 0.1.92
Release: 3
Summary: An unsupervised text tokenizer and detokenizer
License: Apache-2.0
URL: https://github.com/google/sentencepiece
Source0: https://github.com/google/sentencepiece/archive/v%{version}.tar.gz
Patch0: Removed-codes-where-Zero-Width-Joiner-replaced-with-.patch
BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf
BuildRequires: cmake >= 3.14.0
Requires: protobuf protobuf-compiler
%description
SentencePiece is an unsupervised text tokenizer and detokenizer mainly for Neural Network-based text generation
systems where the vocabulary size is predetermined prior to the neural model training.
%global debug_package %{nil}
%prep
%autosetup -p1 -n %{name}-%{version}
%build
mkdir -p cmake/build
cd cmake/build
cmake ../../ -DCMAKE_CXX_FLAGS="-D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -Wno-sign-compare"\
-DCMAKE_C_FLAGS="-D_FORTIFY_SOURCE=2"\
-DCMAKE_BUILD_TYPE=Release\
-DSPM_USE_BUILTIN_PROTOBUF=ON\
-DSPM_ENABLE_SHARED=OFF\
-DSPM_BUILD_TEST=ON\
-DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir}\
-DCMAKE_INSTALL_BINDIR=%{buildroot}%{_bindir}\
-DCMAKE_INSTALL_INCDIR=%{buildroot}%{_includedir}
make -j24 V=1
make CTEST_OUTPUT_ON_FAILURE=1 test
cd ../../
%install
cd cmake/build
make install
%files
%defattr(-,root,root)
%{_bindir}/spm_*
%{_libdir}/*.a
%{_libdir}/pkgconfig/*
%{_includedir}/sentencepiece_*.h
%changelog
* Tue Nov 2 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-3
- Prevent Zero Width Joiner replaced with whitespace
* Wed Sep 29 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-2
- add test cases
* Wed Sep 23 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-1
- package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。