Licensee

The problem

You’ve got an open source project. How do you know what you can and can’t do with the software?

You’ve got a bunch of open source projects, how do you know what their licenses are?

You’ve got a project with a license file, but which license is it? Has it been modified?

The solution

Licensee automates the process of reading LICENSE files and compares their contents to known licenses using a several strategies (which we call “Matchers”). It attempts to determine a project’s license in the following order:

If the license file has an explicit copyright notice, and nothing more (e.g., Copyright (c) 2015 Ben Balter), we’ll assume the author intends to retain all rights, and thus the project isn’t licensed.

If the license is an exact match to a known license. If we strip away whitespace and copyright notice, we might get lucky, and direct string comparison in Ruby is cheap.

If we still can’t match the license, we use a fancy math thing called the Sørensen–Dice coefficient, which is really good at calculating the similarity between two strings. By calculating the percent changed from the known license to the license file, you can tell, e.g., that a given license is 95% similar to the MIT license, that 5% likely representing legally insignificant changes to the license text.