Skip to main content
100%

Reads a page from a given book at the Internet Archive and extracts disambiguated geographic entities as GeoJSON using the Alchemy API

✓ Published0🌍 Public
CCliffordAnderson
Last edited Oct 30, 2013
Created on Oct 30, 2013

This example shows how to transform a digitized book page from the Internet Archive into a map of geographic locations mentioned in the text. It extracts named entities from page 15 of a scanned text and filters for those with geographic coordinates, then renders them as point features on a map. The code uses the Alchemy API’s `TextGetRankedNamedEntities` endpoint to perform entity recognition and disambiguation, while XQuery and BaseX’s `json:serialize` handle the XML-to-GeoJSON conversion. The output is a FeatureCollection with point geometries, built from the disambiguated `geo` coordinates returned by the API, with each feature’s properties containing the entity’s text.

AI-generated description

Similar vizzes