Skip to content
Snippets Groups Projects
Commit 59ddb0d2 authored by Franck Dary's avatar Franck Dary
Browse files

Adding None to dict in cotnextual module

parent 2cf0aae6
No related branches found
No related tags found
No related merge requests found
...@@ -132,7 +132,12 @@ void ContextualModuleImpl::addToContext(std::vector<std::vector<long>> & context ...@@ -132,7 +132,12 @@ void ContextualModuleImpl::addToContext(std::vector<std::vector<long>> & context
else if (index == -2) else if (index == -2)
{ {
for (auto & contextElement : context) for (auto & contextElement : context)
{
auto currentState = dict.getState();
dict.setState(Dict::State::Open);
contextElement.push_back(dict.getIndexOrInsert(fmt::format("{}({})", col, "_NONE_"))); contextElement.push_back(dict.getIndexOrInsert(fmt::format("{}({})", col, "_NONE_")));
dict.setState(currentState);
}
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment