-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into choose
- Loading branch information
Showing
29 changed files
with
98 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Commit CI | |
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '!master' | ||
tags: | ||
- '![0-9]+.*' | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
plugins/*/ | ||
build/ | ||
build-static/ | ||
debug/ | ||
|
@@ -14,3 +15,4 @@ node_modules/ | |
.*.swp | ||
.cache/ | ||
*.7z | ||
*.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
#!/bin/bash | ||
|
||
dep_packages=( | ||
doxygen | ||
libboost-locale-dev | ||
libboost-regex-dev | ||
libgoogle-glog-dev | ||
libleveldb-dev | ||
libmarisa-dev | ||
libyaml-cpp-dev | ||
libopencc-dev | ||
libgtest-dev | ||
) | ||
|
||
sudo apt update -y | ||
sudo apt update | ||
# fix a package dependency bug in Ubuntu 22.04 | ||
# https://bugs.launchpad.net/ubuntu/+source/google-glog/+bug/1991919 | ||
# https://github.com/kadalu-tech/pkgs/pull/2/files#r1001042597 | ||
sudo apt install -y libunwind-dev ninja-build ${dep_packages[@]} | ||
|
||
make deps/gtest | ||
make -C deps/opencc build | ||
sudo env "PATH=$PATH" make -C deps/opencc install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule opencc
updated
18 files
+1 −1 | .appveyor.yml | |
+32 −0 | .github/workflows/mingw.yml | |
+1 −1 | .github/workflows/nodejs.yml | |
+36 −3 | .github/workflows/python.yml | |
+1 −1 | .github/workflows/release-pypi.yml | |
+1 −1 | .travis.yml | |
+26 −1 | CMakeLists.txt | |
+10 −0 | NEWS.md | |
+7 −0 | OpenCCConfig.cmake.in | |
+1 −1 | README.md | |
+10 −3 | data/dictionary/STPhrases.txt | |
+1 −0 | data/dictionary/TWPhrasesIT.txt | |
+399 −1,973 | package-lock.json | |
+1 −1 | package.json | |
+7 −5 | release-pypi-linux.sh | |
+7 −5 | release-pypi-macos.sh | |
+7 −5 | release-pypi-windows.cmd | |
+21 −1 | src/CMakeLists.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
// 2011-11-27 GONG Chen <[email protected]> | ||
// | ||
#include <filesystem> | ||
#include <boost/lexical_cast.hpp> | ||
#include <utf8.h> | ||
#include <rime/resource.h> | ||
#include <rime/service.h> | ||
|
@@ -74,7 +73,7 @@ bool PresetVocabulary::GetWeightForEntry(const string& key, double* weight) { | |
if (!db_ || !db_->Fetch(key, &weight_str)) | ||
return false; | ||
try { | ||
*weight = boost::lexical_cast<double>(weight_str); | ||
*weight = std::stod(weight_str); | ||
} catch (...) { | ||
return false; | ||
} | ||
|
@@ -105,7 +104,7 @@ bool PresetVocabulary::IsQualifiedPhrase(const string& phrase, | |
return false; | ||
} | ||
if (min_phrase_weight_ > 0.0) { | ||
double weight = boost::lexical_cast<double>(weight_str); | ||
double weight = std::stod(weight_str); | ||
if (weight < min_phrase_weight_) | ||
return false; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
// 2013-04-18 GONG Chen <[email protected]> | ||
// | ||
#include <boost/algorithm/string.hpp> | ||
#include <boost/lexical_cast.hpp> | ||
#include <rime/dict/table_db.h> | ||
#include <rime/dict/user_db.h> | ||
|
||
|
@@ -28,7 +27,7 @@ static bool rime_table_entry_parser(const Tsv& row, | |
UserDbValue v; | ||
if (row.size() >= 3 && !row[2].empty()) { | ||
try { | ||
v.commits = boost::lexical_cast<int>(row[2]); | ||
v.commits = std::stoi(row[2]); | ||
const double kS = 1e8; | ||
v.dee = (v.commits + 1) / kS; | ||
} catch (...) { | ||
|
@@ -51,7 +50,7 @@ static bool rime_table_entry_formatter(const string& key, | |
return false; | ||
boost::algorithm::trim(row[0]); // remove trailing space | ||
row[0].swap(row[1]); | ||
row.push_back(boost::lexical_cast<string>(v.commits)); | ||
row.push_back(std::to_string(v.commits)); | ||
return true; | ||
} | ||
|
||
|
Oops, something went wrong.