Added a try-except to avoid having to manually restart the script for every timeout, also adjusted calculations, so that only keywords that occur in at least 2 documents get a score.