Created
November 30, 2012 06:24
-
-
Save michelp/4174107 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> pprint(sorted(db.expand('south america', [('entity', 20, 1024, 1, 1)], language='en'), key=itemgetter(1), reverse=True)) | |
| [(u'entity:"united states"', 10223L), | |
| (u'entity:"north america"', 4504L), | |
| (u'entity:europe', 3716L), | |
| (u'entity:"south america"', 3124L), | |
| (u'entity:south', 2234L), | |
| (u'entity:mexico', 2204L), | |
| (u'entity:americas', 1920L), | |
| (u'entity:africa', 1820L), | |
| (u'entity:asia', 1699L), | |
| (u'entity:brazil', 1505L), | |
| (u'entity:argentina', 1237L), | |
| (u'entity:caribbean', 1011L), | |
| (u'entity:animalia', 903L), | |
| (u'entity:"central america"', 776L), | |
| (u'entity:peru', 741L), | |
| (u'entity:colombia', 643L), | |
| (u'entity:"south american"', 642L), | |
| (u'entity:venezuela', 577L), | |
| (u'entity:bolivia', 461L)] | |
| >>> db.count() | |
| 260000L | |
| >>> pprint(sorted(db.expand('south america', [('link', 20, 1024, 1, 1)], language='en'), key=itemgetter(1), reverse=True)) | |
| [(u'link:canada', 1559L), | |
| (u'link:"north america"', 1441L), | |
| (u'link:"south america"', 1347L), | |
| (u'link:europe', 1205L), | |
| (u'link:mexico', 1117L), | |
| (u'link:brazil', 1021L), | |
| (u'link:animal', 899L), | |
| (u'link:chordata', 830L), | |
| (u'link:argentina', 809L), | |
| (u'link:africa', 670L), | |
| (u'link:colombia', 510L), | |
| (u'link:venezuela', 456L), | |
| (u'link:caribbean', 439L), | |
| (u'link:"central america"', 435L), | |
| (u'link:"birdlife international"', 380L), | |
| (u'link:bolivia', 354L), | |
| (u'link:ecuador', 350L), | |
| (u'link:americas', 328L), | |
| (u'link:linnaeus', 302L), | |
| (u'link:paraguay', 265L)] | |
| >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment