Skip to content

Commit

Permalink
VSTR tags must be generated before checking if they are certain types
Browse files Browse the repository at this point in the history
  • Loading branch information
TinoDidriksen committed Nov 24, 2023
1 parent 75ab52c commit 03ed80e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/GrammarApplicator_runRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,12 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
auto theTags = ss_taglist.get();
getTagList(*rule->maplist, theTags);

for (auto& tter : *theTags) {
if (tter->type & T_VSTR) {
VARSTRINGIFY(tter);
}
}

for (auto tter : *theTags) {
if(tter->type & T_WORDFORM) {
spacesInAddedWf = std::count_if(tter->tag.begin(), tter->tag.end(), [](UChar c){ return c == ' '; });
Expand Down Expand Up @@ -1414,6 +1420,12 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
auto theTags = ss_taglist.get();
getTagList(*rule->maplist, theTags);

for (auto& tter : *theTags) {
if (tter->type & T_VSTR) {
VARSTRINGIFY(tter);
}
}

Tag* wf = nullptr;
for (auto tter : *theTags) {
if (tter->type & T_WORDFORM) {
Expand Down Expand Up @@ -1894,6 +1906,12 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
auto theTags = ss_taglist.get();
getTagList(*rule->maplist, theTags);

for (auto& tter : *theTags) {
if (tter->type & T_VSTR) {
VARSTRINGIFY(tter);
}
}

for (auto tter : *theTags) {
VARSTRINGIFY(tter);
if (tter->type & T_BASEFORM) {
Expand Down

0 comments on commit 03ed80e

Please sign in to comment.