Category Archives: Coding

Generating Unique Short Hashes

Ever wonder how URL shortening websites get such short hashes? Most of them simply make a random hash then check if they’ve used it before. An advantage of this system is that very short hashes can be created with an no possibility of collision — especially if a wide range of characters are used. While… Read More »

N-Gram Tutorial in R

What are n-grams? N-grams of texts are extensively used in text mining and natural language processing tasks. They are basically a set of co-occurring words within a given window and when computing the n-grams you typically move one word forward. For example, for the sentence: “The cow jumps over the moon”. If N=2 (known as a… Read More »