Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JMMackenzie authored and elshize committed Jan 16, 2024
1 parent 10dfbd7 commit d86f4d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ auto Query::terms() const noexcept -> std::vector<WeightedTerm> const& {
}

/** The first occurrence of each term is assigned the accumulated weight. */
void accumualte_weights(std::vector<WeightedTerm>& terms) {
void accumulate_weights(std::vector<WeightedTerm>& terms) {
std::unordered_map<TermId, decltype(terms.begin())> positions;
for (auto it = terms.begin(); it != terms.end(); ++it) {
if (auto pos = positions.find(it->id); pos != positions.end()) {
Expand All @@ -69,7 +69,7 @@ void dedup_by_term_id(std::vector<WeightedTerm>& terms) {
void Query::postprocess(query::TermPolicy policy) {
if (!policy.contains(query::keep_duplicates)) {
if (!policy.contains(query::unweighted)) {
accumualte_weights(m_terms);
accumulate_weights(m_terms);
}
dedup_by_term_id(m_terms);
}
Expand Down

0 comments on commit d86f4d6

Please sign in to comment.