More infrastructure code for keyword building

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>