MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Equals

Function Equals

tensorflow/lite/models/smartreply/ops/extract_feature.cc:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39static const std::vector<string> kBlacklistNgram = {"<S>", "<E>", "<S> <E>"};
40
41bool Equals(const string& x, const tflite::StringRef& strref) {
42 if (strref.len != x.length()) {
43 return false;
44 }
45 if (strref.len > 0) {
46 int r = memcmp(strref.str, x.data(), strref.len);
47 return r == 0;
48 }
49 return true;
50}
51
52bool IsValidNgram(const tflite::StringRef& strref) {
53 for (const auto& s : kBlacklistNgram) {

Callers 1

IsValidNgramFunction · 0.85

Calls 2

lengthMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected