Skip to content

Instantly share code, notes, and snippets.

@dimidd
Forked from anonymous/file1.py
Last active November 18, 2015 11:00
Show Gist options
  • Save dimidd/fe0cb84d406648dc1365 to your computer and use it in GitHub Desktop.
Save dimidd/fe0cb84d406648dc1365 to your computer and use it in GitHub Desktop.
Pasted from IPython
import pymongo
cl = pymongo.MongoClient()
db = cl.ner-dict
db = cl['ner-dict']
c = db.dict
c.count
c.count()
qs = c.find()
aliases = [bytes(x, 'latin1').decode('utf8') for x in r['aliases']]
aliases
Out[26]:
['Herzl, Theodor,',
'הרצל, בנימין זאב,',
'Герцль, Теодор,',
'هرصل، بنيامين زئيب',
'הרצל, בנימין זאב',
'Herzl, Benjamin Zeev',
'Herzl, Tivadar,',
'Herzl, Teodoro',
'הרצל, תאודור',
'הערצל, בנימין זאב,',
'הערצעל, בנימין זאב,',
'Херцл, Теодор,',
'Херцел, Теодор,',
'هرتزل، بنيامين زئيب',
'هرصل، ثيودور',
'هرتسل، ثيودور',
'هيرتسل، ثيودور',
'هرتزل، ثيودور',
'הרצל, תיאודור',
'הרצל, מתתיהו',
'הירצל, תיאודור',
'הערצל, תיאודור',
'הרצל, בנימין זאב בן יעקב']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment