[ngrams] adding function to extract an array of ngrams from a string, with optional special prefixes/suffixes for the edges

This commit is contained in:
Al
2016-12-17 01:33:18 -05:00
parent 3c6ed7489c
commit 3ed95a175e
2 changed files with 74 additions and 0 deletions

3
src/ngrams.h Normal file
View File

@@ -0,0 +1,3 @@
#include "string_utils.h"
bool add_ngrams(cstring_array *grams, char *str, size_t n, size_t len, bool prefix, bool suffix);