Measuring Democracy: From Texts To Data