Searched refs:terminal_rules (Results 1 – 5 of 5) sorted by relevance
/external/libtextclassifier/native/utils/grammar/utils/ |
D | ir.cc | 232 return AddRule(lhs, terminal, &shards_[shard].terminal_rules); in Add() 274 std::vector<TerminalEntry> terminal_rules; in SerializeTerminalRules() local 285 terminal_rules_sets.push_back(&shards_[i].terminal_rules); in SerializeTerminalRules() 287 rules_shards->at(i)->terminal_rules.reset( in SerializeTerminalRules() 291 rules_maps.push_back(rules_shards->at(i)->terminal_rules.get()); in SerializeTerminalRules() 296 terminal_rules.push_back( in SerializeTerminalRules() 300 std::sort(terminal_rules.begin(), terminal_rules.end(), in SerializeTerminalRules() 307 for (int i = 0; i < terminal_rules.size(); i++) { in SerializeTerminalRules() 308 terminal_rules[i].index = index[terminal_rules[i].set_index]++; in SerializeTerminalRules() 317 std::vector<int> suffix(terminal_rules.size(), kInvalidIndex); in SerializeTerminalRules() [all …]
|
D | ir_test.cc | 153 EXPECT_THAT(rules.rules.front()->terminal_rules->terminal_offsets, IsEmpty()); in TEST() 206 EXPECT_THAT(rules.rules[0]->terminal_rules->terminal_offsets, IsEmpty()); in TEST() 212 EXPECT_THAT(rules.rules[1]->terminal_rules->terminal_offsets, IsEmpty()); in TEST()
|
D | ir.h | 90 std::unordered_map<std::string, LhsSet> terminal_rules; member
|
/external/libtextclassifier/native/utils/grammar/parsing/ |
D | matcher.cc | 158 const RulesSet_::Rules_::TerminalRulesMap* terminal_rules, in FindTerminalMatches() argument 161 if (terminal_size < terminal_rules->min_terminal_length() || in FindTerminalMatches() 162 terminal_size > terminal_rules->max_terminal_length()) { in FindTerminalMatches() 168 terminal_rules->terminal_offsets()->data(), in FindTerminalMatches() 169 terminal_rules->terminal_offsets()->size(), &terminal_index)) { in FindTerminalMatches() 172 terminal_rules->lhs_set_index()->Get(terminal_index)); in FindTerminalMatches() 273 shard->terminal_rules(), &terminal)) { in AddTerminal()
|
/external/libtextclassifier/native/utils/grammar/ |
D | rules.fbs | 73 terminal_rules:Rules_.TerminalRulesMap;
|