This is a small programming problem to test your technical ability and coding style.
Write a simple script to generate a set of n-grams from a string of text. N-grams are a contiguous sequence of n words from a string of text, and have many applications from full-text search indexes to machine learning.
You'll generate a set of every permutation of contiguous n-grams from a string of text, from 1-gram to n-grams where n is the number of words in the string
"Show me the code."
[
"Show",
"Show me",
"Show me the",
"Show me the code",
"me",
"me the",
"me the code",
"the",
"the code",
"code"
]
- Program in the language for the position for which you are applying
- Strip punctuation
- Include tests
- Write a single code file that includes both the application and tests
- As comments in the code file, include installation instructions & instructions for how to run your test and run your code
- Application accepts a parameter to generate n-grams from the parameter
- Create a secret Gist
- Email your Gist link to [email protected]