entropy script for NER