Created
October 30, 2013 01:43
-
-
Save CliffordAnderson/7225944 to your computer and use it in GitHub Desktop.
Extracts entities with geographic attributes using the Alchemy api
This file contains 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
(: Extracts entities from web-accessible texts using the Alchemy api :) | |
let $entities := | |
http:send-request( | |
<http:request method='post' href='http://access.alchemyapi.com/calls/url/URLGetRankedNamedEntities'> | |
<http:body media-type='application/x-www-form-urlencoded' method='text'>apikey=[Your Key Here]&url=https%3A%2F%2Fraw.github.com%2Fiulibdcs%2Ftei_text%2Fmaster%2Fvwwp_text%2FVAB7013.txt</http:body> | |
</http:request> | |
)/results/entities | |
for $entity in $entities/entity | |
where $entity//geo | |
return $entity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment