Home
last modified time | relevance | path

Searched refs:EditDistance (Results 1 – 17 of 17) sorted by relevance

/third_party/ninja/src/
Dedit_distance_test.cc20 EXPECT_EQ(5, EditDistance("", "ninja")); in TEST()
21 EXPECT_EQ(5, EditDistance("ninja", "")); in TEST()
22 EXPECT_EQ(0, EditDistance("", "")); in TEST()
29 EditDistance("abcdefghijklmnop", "ponmlkjihgfedcba", in TEST()
36 EXPECT_EQ(1, EditDistance("ninja", "njnja", allow_replacements)); in TEST()
37 EXPECT_EQ(1, EditDistance("njnja", "ninja", allow_replacements)); in TEST()
40 EXPECT_EQ(2, EditDistance("ninja", "njnja", allow_replacements)); in TEST()
41 EXPECT_EQ(2, EditDistance("njnja", "ninja", allow_replacements)); in TEST()
45 EXPECT_EQ(0, EditDistance("browser_tests", "browser_tests")); in TEST()
46 EXPECT_EQ(1, EditDistance("browser_test", "browser_tests")); in TEST()
[all …]
Dedit_distance.h20 int EditDistance(const StringPiece& s1,
Dedit_distance.cc20 int EditDistance(const StringPiece& s1, in EditDistance() function
Dstate.cc127 int distance = EditDistance( in SpellcheckNode()
Dutil.cc402 int distance = EditDistance(*i, text, kAllowReplacements, in SpellcheckStringV()
/third_party/gn/src/gn/
Dstring_utils_unittest.cc120 TEST(StringUtils, EditDistance) { in TEST() argument
121 EXPECT_EQ(3u, EditDistance("doom melon", "dune melon", 100)); in TEST()
122 EXPECT_EQ(2u, EditDistance("doom melon", "dune melon", 1)); in TEST()
124 EXPECT_EQ(2u, EditDistance("ab", "ba", 100)); in TEST()
125 EXPECT_EQ(2u, EditDistance("ba", "ab", 100)); in TEST()
127 EXPECT_EQ(2u, EditDistance("ananas", "banana", 100)); in TEST()
128 EXPECT_EQ(2u, EditDistance("banana", "ananas", 100)); in TEST()
130 EXPECT_EQ(2u, EditDistance("unclear", "nuclear", 100)); in TEST()
131 EXPECT_EQ(2u, EditDistance("nuclear", "unclear", 100)); in TEST()
133 EXPECT_EQ(3u, EditDistance("chrome", "chromium", 100)); in TEST()
[all …]
Dstring_utils.h43 size_t EditDistance(std::string_view s1,
Dstring_utils.cc287 size_t EditDistance(std::string_view s1, in EditDistance() function
336 size_t distance = EditDistance(word, text, kMaxValidEditDistance); in SpellcheckString()
/third_party/mindspore/tests/st/ops/ascend/
Dtest_edit_distance.py26 class EditDistance(nn.Cell): class
28 super(EditDistance, self).__init__()
29 self.edit_distance = P.EditDistance(normalize)
46 edit_distance = EditDistance(hypothesis_shape, truth_shape)
/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/op_declare/
Darray_ops_declare.cc100 INPUT_MAP(EditDistance) = {{1, INPUT_DESC(hypothesis_indices)}, {2, INPUT_DESC(hypothesis_values)},
103 ATTR_MAP(EditDistance) = {{"normalize", ATTR_DESC(normalize, AnyTraits<bool>())}};
104 OUTPUT_MAP(EditDistance) = {{0, OUTPUT_DESC(output)}};
105 REG_ADPT_DESC(EditDistance, kNameEditDistance, ADPT_DESC(EditDistance))
Darray_ops_declare.h61 DECLARE_OP_ADAPTER(EditDistance)
62 DECLARE_OP_USE_OUTPUT(EditDistance)
/third_party/mindspore/mindspore/ops/operations/
D__init__.py32 … Squeeze, StridedSlice, Tile, TensorScatterUpdate, TensorScatterAdd, EditDistance, Sort,
Darray_ops.py5646 class EditDistance(PrimitiveWithInfer): class
/third_party/mindspore/tests/ut/python/ops/
Dtest_ops.py1006 class EditDistance(nn.Cell): class
1008 super(EditDistance, self).__init__()
1009 self.edit_distance = P.EditDistance(normalize)
2559 'block': EditDistance(Tensor(np.array([1, 1, 2]).astype(np.int64)),
/third_party/icu/icu4j/perf-tests/data/collation/
Dthesis.txt1565 EditDistance
1731 public class EditDistance implements Comparer
/third_party/googletest/googletest/test/
Dgtest_unittest.cc3539 TEST(EditDistance, TestSuites) { in TEST() argument
/third_party/mindspore/config/
Dop_info.config10 {"op_name": "EditDistance", "inputs": [{"index": 0, "name": "hypothesis_indices", "param_type": "re…