#!/usr/bin/env python

import sys

# Open just for read
dbpediadb = set(open('dbpedia_labels.txt').read().splitlines())

for line in sys.stdin:
    # remove leading and trailing whitespace
    line = line.strip()
    # split the line into words
    ngram, num = line.split('\t')

    if ngram in dbpediadb:
        print '<%s>\t%s' % (ngram.replace(' ', '_'), num)


@@ -319,12 +319,10 @@
 nt '
-%3C
 %25s
-%3E
 %5Ct%25s

make counts similar to ratio