Text chunks are enriched with place names (and their geographic coordinates) occurring within them. This is based on the place names found by the named entity tagger SweNer. Geographical coordinates are looked up in the GeoNames database. This annotation can be applied to any text chunk and any attribute containing place names.
Citation
Språkbanken Text (2022). swe-geotagmetadata-sparv (updated: 2022-05-18). [Analysis]. Språkbanken Text.Annotate text chunks with location data, based on metadata containing location names
Example
This analysis is used with Sparv. Check out Sparv's quick start guide to get started!
To use this analysis, add the following line under export.annotations
in the Sparv corpus configuration file:
- <text>:geo.geo_metadata # Geographical places with coordinates
In order to use this annotation you need to tell Sparv where to look for the geographic metadata. If, for example, your corpus looks like this:
<text author_location="Göteborg">Det var då änna bösigt i bamban!</text>
and you would like to use author_location
as input for your annotation you need to add the following setting to your
Sparv corpus configuration file:
geo:
metadata_source: text:author_location
For more info on how to use Sparv, check out the Sparv documentation.
Example output:
<text author_location="Göteborg" geo_metadata="|Göteborg;SE;57.70716;11.96679|">
<token>Det</token>
<token>var</token>
<token>då</token>
<token>änna</token>
<token>bösigt</token>
<token>i</token>
<token>bamban</token>
<token>!</token>
</text>