Integration of grammar and statistical language constraints for partial word-sequence recognition