Skip to content

Commit

Permalink
correct word cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
danemadsen committed Aug 5, 2024
1 parent 4db02c2 commit 99d9d67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cleaners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ namespace DeepPhonemizer {

result.insert(result.end(), words.begin(), words.end());

if (i > 0 && i < suffixes.size()) {
result.push_back(suffixes[i - 1]);
if (i < suffixes.size() && i < parts.size() - 1) {
int suffix = parts.size() - i - 2;

result.push_back(suffixes[suffix]);
}
}

Expand Down

0 comments on commit 99d9d67

Please sign in to comment.