From dfd8efa04fd878f6cea58512d4228547abb27956 Mon Sep 17 00:00:00 2001
From: co63oc
Date: Mon, 15 Sep 2025 14:59:03 +0800
Subject: [PATCH] fix typos (#16374)
---
awesome_projects.md | 2 +-
deploy/cpp_infer/src/common/processors.cc | 4 ++--
.../cpp_infer/src/modules/text_recognition/predictor.cc | 2 +-
deploy/cpp_infer/src/utils/ilogger.cc | 2 +-
deploy/cpp_infer/src/utils/utility.cc | 4 ++--
deploy/slim/quantization/quant_kl.py | 4 ++--
docs/index.en.md | 2 +-
docs/version3.x/deployment/cpp/OCR.en.md | 2 +-
.../module_usage/table_structure_recognition.en.md | 2 +-
ppocr/data/simple_dataset.py | 8 ++++----
10 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/awesome_projects.md b/awesome_projects.md
index 178edcc22c..3cee305a4e 100644
--- a/awesome_projects.md
+++ b/awesome_projects.md
@@ -15,7 +15,7 @@
| [March7thAssistant](https://github.com/moesnow/March7thAssistant)
| Daily Tasks: Stamina recovery, daily training, claiming rewards, commissions, and farming. |
| [PaddlePaddle/models](https://github.com/PaddlePaddle/models)
|PaddlePaddle's industrial-grade model zoo.|
| [katanaml/sparrow](https://github.com/katanaml/sparrow)
| Sparrow is an innovative open-source solution for efficient data extraction and processing from various documents and images. |
-| [RapidOCR](https://github.com/RapidAI/RapidOCR)
| Awesome OCR multiple programing languages toolkits based on ONNXRuntime, OpenVINO, PaddlePaddle and PyTorch |
+| [RapidOCR](https://github.com/RapidAI/RapidOCR)
| Awesome OCR multiple programming languages toolkits based on ONNXRuntime, OpenVINO, PaddlePaddle and PyTorch |
| [autoMate](https://github.com/yuruotong1/autoMate)
| AI-Powered Local Automation Tool & Let Your Computer Work for You. |
| [Agent-S](https://github.com/simular-ai/Agent-S)
| A Compositional Generalist-Specialist Framework for Computer Use Agents. |
| [pdf-craft](https://github.com/oomol-lab/pdf-craft)
| PDF Craft can convert PDF files into various other formats. |
diff --git a/deploy/cpp_infer/src/common/processors.cc b/deploy/cpp_infer/src/common/processors.cc
index 25b82d8f59..0116455386 100644
--- a/deploy/cpp_infer/src/common/processors.cc
+++ b/deploy/cpp_infer/src/common/processors.cc
@@ -79,7 +79,7 @@ Resize::Resize(const std::vector &target_size, bool keep_ratio,
auto interp_value = GetInterp(interp_upper);
if (!interp_value.ok()) {
- INFOE("Unknow type: %s", interp_value.status().ToString().c_str());
+ INFOE("Unknown type: %s", interp_value.status().ToString().c_str());
exit(-1);
}
interp_ = interp_value.value();
@@ -134,7 +134,7 @@ ResizeByShort::ResizeByShort(int target_short_edge, int size_divisor,
auto interp_value = Resize::GetInterp(interp_upper);
if (!interp_value.ok()) {
- INFOE("Unknow type: %s", interp_value.status().ToString().c_str());
+ INFOE("Unknown type: %s", interp_value.status().ToString().c_str());
exit(-1);
}
interp_ = interp_value.value();
diff --git a/deploy/cpp_infer/src/modules/text_recognition/predictor.cc b/deploy/cpp_infer/src/modules/text_recognition/predictor.cc
index d4df5a908b..08d0fe58f0 100644
--- a/deploy/cpp_infer/src/modules/text_recognition/predictor.cc
+++ b/deploy/cpp_infer/src/modules/text_recognition/predictor.cc
@@ -108,7 +108,7 @@ absl::Status TextRecPredictor::CheckRecModelParams() {
auto result_models_check = Utility::GetOcrModelInfo(
params_.lang.value_or(""), params_.ocr_version.value_or(""));
if (!result_models_check.ok()) {
- return absl::InvalidArgumentError("lang and ocr_version is invaild : " +
+ return absl::InvalidArgumentError("lang and ocr_version is invalid : " +
result_models_check.status().ToString());
}
auto result_model_name = ModelName();
diff --git a/deploy/cpp_infer/src/utils/ilogger.cc b/deploy/cpp_infer/src/utils/ilogger.cc
index 1c81e12f86..fef87f4636 100644
--- a/deploy/cpp_infer/src/utils/ilogger.cc
+++ b/deploy/cpp_infer/src/utils/ilogger.cc
@@ -108,7 +108,7 @@ const char *level_string(LogLevel level) {
case LogLevel::Fatal:
return "fatal";
default:
- return "unknow";
+ return "unknown";
}
}
diff --git a/deploy/cpp_infer/src/utils/utility.cc b/deploy/cpp_infer/src/utils/utility.cc
index 91dbc5f634..4439c47222 100644
--- a/deploy/cpp_infer/src/utils/utility.cc
+++ b/deploy/cpp_infer/src/utils/utility.cc
@@ -86,7 +86,7 @@ Utility::GetDefaultConfig(std::string pipeline_name) {
for (int i = 0; i < 2; i++) {
size_t pos = current_path.find_last_of(PATH_SEPARATOR);
if (pos == std::string::npos) {
- return absl::NotFoundError("Could not find pipline config yaml :" +
+ return absl::NotFoundError("Could not find pipeline config yaml :" +
pipeline_name);
}
current_path = current_path.substr(0, pos);
@@ -100,7 +100,7 @@ Utility::GetDefaultConfig(std::string pipeline_name) {
} else if (FileExists(config_path_yml).ok()) {
return config_path_yml;
}
- return absl::NotFoundError("Could not find pipline config yaml :" +
+ return absl::NotFoundError("Could not find pipeline config yaml :" +
pipeline_name);
}
absl::StatusOr
diff --git a/deploy/slim/quantization/quant_kl.py b/deploy/slim/quantization/quant_kl.py
index f367203c57..deaa9e938a 100755
--- a/deploy/slim/quantization/quant_kl.py
+++ b/deploy/slim/quantization/quant_kl.py
@@ -90,7 +90,7 @@ quant_config = {
def sample_generator(loader):
def __reader__():
- for indx, data in enumerate(loader):
+ for _, data in enumerate(loader):
images = np.array(data[0])
yield images
@@ -99,7 +99,7 @@ def sample_generator(loader):
def sample_generator_layoutxlm_ser(loader):
def __reader__():
- for indx, data in enumerate(loader):
+ for _, data in enumerate(loader):
input_ids = np.array(data[0])
bbox = np.array(data[1])
attention_mask = np.array(data[2])
diff --git a/docs/index.en.md b/docs/index.en.md
index dc58ba8f39..a588d28706 100644
--- a/docs/index.en.md
+++ b/docs/index.en.md
@@ -31,7 +31,7 @@ In addition to providing an outstanding model library, PaddleOCR 3.0 also offers
-You can [Quick Start](./quick_start.en.md) directly, find comprehensive documentation in the [PaddleOCR Docs](https://paddlepaddle.github.io/PaddleOCR/main/index.html), get support via [Github Issus](https://github.com/PaddlePaddle/PaddleOCR/issues), and explore our OCR courses on [OCR courses on AIStudio](https://aistudio.baidu.com/course/introduce/25207).
+You can [Quick Start](./quick_start.en.md) directly, find comprehensive documentation in the [PaddleOCR Docs](https://paddlepaddle.github.io/PaddleOCR/main/index.html), get support via [Github Issues](https://github.com/PaddlePaddle/PaddleOCR/issues), and explore our OCR courses on [OCR courses on AIStudio](https://aistudio.baidu.com/course/introduce/25207).
**Special Note**: PaddleOCR 3.x introduces several significant interface changes. **Old code written based on PaddleOCR 2.x is likely incompatible with PaddleOCR 3.x**. Please ensure that the documentation you are reading matches the version of PaddleOCR you are using. [This document](./update/upgrade_notes.en.md) explains the reasons for the upgrade and the major changes from PaddleOCR 2.x to 3.x.
diff --git a/docs/version3.x/deployment/cpp/OCR.en.md b/docs/version3.x/deployment/cpp/OCR.en.md
index 71d5c53ebe..1ec15b30e0 100644
--- a/docs/version3.x/deployment/cpp/OCR.en.md
+++ b/docs/version3.x/deployment/cpp/OCR.en.md
@@ -153,7 +153,7 @@ You can directly download the inference models provided by PaddleOCR:
-Text Image Unwraping Module (Optional):
+Text Image Unwrapping Module (Optional):
diff --git a/docs/version3.x/module_usage/table_structure_recognition.en.md b/docs/version3.x/module_usage/table_structure_recognition.en.md
index b2a744580b..77f043ad77 100644
--- a/docs/version3.x/module_usage/table_structure_recognition.en.md
+++ b/docs/version3.x/module_usage/table_structure_recognition.en.md
@@ -6,7 +6,7 @@ comments: true
## 1. Overview
-Table structure recognition is an important component of table recognition systems, capable of converting non-editable table images into editable table formats (such as HTML). The goal of table structure recognition is to identify the positions of rows, columns, and cells in tables. The performance of this module directly affects the accuracy and efficiency of the entire table recognition system. The table structure recognition module usually outputs HTML code for the table area, which is then passed as input to the tabl recognition pipeline for further processing.
+Table structure recognition is an important component of table recognition systems, capable of converting non-editable table images into editable table formats (such as HTML). The goal of table structure recognition is to identify the positions of rows, columns, and cells in tables. The performance of this module directly affects the accuracy and efficiency of the entire table recognition system. The table structure recognition module usually outputs HTML code for the table area, which is then passed as input to the table recognition pipeline for further processing.
## 2. Supported Model List
diff --git a/ppocr/data/simple_dataset.py b/ppocr/data/simple_dataset.py
index a8e1c0309a..b072a36a2b 100644
--- a/ppocr/data/simple_dataset.py
+++ b/ppocr/data/simple_dataset.py
@@ -166,10 +166,10 @@ class MultiScaleDataSet(SimpleDataSet):
def wh_aware(self):
data_line_new = []
wh_ratio = []
- for lins in self.data_lines:
- data_line_new.append(lins)
- lins = lins.decode("utf-8")
- name, label, w, h = lins.strip("\n").split(self.delimiter)
+ for line in self.data_lines:
+ data_line_new.append(line)
+ line = line.decode("utf-8")
+ name, label, w, h = line.strip("\n").split(self.delimiter)
wh_ratio.append(float(w) / float(h))
self.data_lines = data_line_new