Fix segfault in trigrams generation and expose MAXGRAMS constant in the header
Differential Revision: https://phabricator.kde.org/D4181