Anthony Corletti cloud computing. startups. music. etc.
Posts with the tag ruby:

Text Processing in Ruby

I’ve come across a lot of text based processing and analytics software is written in python, but not so much in ruby, so I’ve decided to share an example about how to algorithmically parse lots of text with plain ruby code – no dependencies required!

The problem statement is simple.

Given a new-line delimited text file, with each line being field separated by commas, determine the $m$ most common string of length $n$, accounting for multiple most common strings.

Let’s get hacking 🤓

Read more ...