I just published the simple-random ruby gem, which is ported from C# code by John D. Cook. You can view the source on github or install the gem via rubygems: gem install simple-random The gem allows you to sample from the following distributions: Beta Cauchy Chi Square Exponential Gamma Inverse Gamma Laplace (double exponential) Normal Student [...]
Posts Tagged ‘ruby’
Simple Random Number Generator Gem
Posted: 24 July 2010 in UncategorizedTags: code, math, random number generation, ruby, rubygems, statistics
Wordnik Gem
Posted: 12 March 2010 in UncategorizedTags: api, dictionaries, erin mckean, ruby, rubygems, wordnik
I’ve had my eye on Wordnik for a while, since finding out the excellent lexicographer Erin McKean co-founded it. Wordnik is the most comprehensive dictionary in the known universe. Srsly! They released an API a few months ago and I quickly threw together a gem wrapping it, based on HTTParty. Tonight I updated the gem [...]
TunkRank Improvements
Posted: 17 February 2010 in UncategorizedTags: influence ranking, merb, mysql, postgresql, rails, redis, resque, ruby, tunkrank, twitter
Over the past few weeks, I’ve been working on a number of improvements to TunkRank that I will be rolling out tonight. First, I’ve secured a server to host it on, rather than my old Dell laptop, so reliability should improve and TunkRank is no longer a slave to dynamic DNS problems. Also, my cable [...]
NLP Resources for Ruby
Posted: 13 September 2009 in UncategorizedTags: computational linguistics, java, natural language processing, nlp, parsers, python, ruby, stemmers, wordnet
There are quite a few well-known libraries for doing various NLP tasks in Java and Python, such as the Stanford Parser (Java) and the Natural Language Toolkit (Python). For Ruby, there are a few resources out there, but they are usually derivative or not as mature. By derivative, I mean they are ports from other [...]
Updates to lda-ruby gem
Posted: 30 July 2009 in UncategorizedTags: c, computational linguistics, latent dirichlet allocation, lda, machine learning, nlp, ruby, rubygems, topic modeling
A while back I ported David Blei’s lda-c code for performing Latent Dirichlet Allocation to Ruby. Basically I just wrapped the C methods in a Ruby class, turned it into a gem, and called it a day. The result was a bit ugly and unwieldy, like most research code. A few months later, Todd Fisher [...]
Porting the UEA-Lite Stemmer to Ruby
Posted: 16 July 2009 in UncategorizedTags: computational linguistics, finite state transducers, github, information retrieval, nlp, open source software, ruby, software, stemmers, stemming
A twitter friend (@communicating) tipped me off to the UEA-Lite Stemmer by Marie-Claire Jenkins and Dan J. Smith. Stemmers are NLP tools that get rid of inflectional and derivational affixes from words. In English, that usually means getting rid of the plural -s, progressive -ing, and preterite -ed. Depending on the type of stemmer, that [...]
Learning Scala
Posted: 11 July 2009 in UncategorizedTags: books, friends, programming languages, ruby, scala, twitter
Two weeks ago, I picked up my copy of Programming in Scala, which had been languishing on my shelf for months. I pre-purchased it since I went to high school with one of the authors (Lex Spoon). His mother, incidentally, was also my favorite math teacher. When I started my new job back in September [...]
Fun with trees in Ruby
Posted: 20 November 2008 in UncategorizedTags: algorithms, github, inheritance, interfaces, java, programming, ruby, ruby gems, trees
Like Java and unlike Python, Ruby does not support multiple inheritance. Also there is no explicit way to create an interface. One way Ruby lets you get around both problems is by allowing you to include a module in a class. It’s not quite the same, but with the proper planning you can duplicate the [...]
LDA in Ruby
Posted: 17 November 2008 in UncategorizedTags: c, code, computational linguistics, git, github, latent dirichlet allocation, machine learning, programming, ruby, ruby gems, rubyforge, topic modeling
Since Ruby is my new favorite toy, I thought it would be fun to try my hand at C extensions. I came across David Blei’s C code for Latent Dirichlet Allocation and it looked simple enough to convert into a Ruby module. Ruby makes it very easy to wrap some C functions (which is good [...]


