a keyword filter using AC state machine