MCPcopy Create free account
hub / github.com/PaddlePaddle/PaddleOCR / GetSubModule

Method GetSubModule

deploy/cpp_infer/src/utils/yaml_config.cc:251–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 return default_value;
250}
251absl::StatusOr<std::unordered_map<std::string, std::string>>
252YamlConfig::GetSubModule(const std::string &key) const {
253 std::unordered_map<std::string, std::string> submodule_result = {};
254 for (const auto &info : data_) {
255 if (info.first.find(key) != std::string::npos) {
256 submodule_result[info.first] = info.second;
257 }
258 }
259 if (submodule_result.empty()) {
260 return absl::NotFoundError("the " + key + " is not exits!");
261 }
262 return submodule_result;
263}
264absl::Status YamlConfig::HasKey(const std::string &key) const {
265 if (data_.find(key) != data_.end()) {
266 return absl::OkStatus();

Callers 1

_OCRPipelineMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected