Skip to main content
Språkbanken Text is a department within Språkbanken.

swe-geotagcontext-sparv

Citation Information

Språkbanken Text (2022). swe-geotagcontext-sparv (updated: 2022-05-18). [Analysis]. Språkbanken Text.
Annotate text chunks with location data, based on locations contained within the text

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, e.g. texts, paragraphs, sentences or tokens.

Example

This analysis is used with Sparv. Check out Sparv's quick start guide to get started!

To use this analysis, add the following lines under export.annotations in the Sparv corpus configuration file:

- <text>:geo.geo_context  # Geographical places with coordinates
- <paragraph>:geo.geo_context  # Geographical places with coordinates
- <sentence>:geo.geo_context  # Geographical places with coordinates

For more info on how to use Sparv, check out the Sparv documentation.

Example output:

<text geo_context="|Göteborg;SE;57.70716;11.96679|Torslanda;SE;57.72432;11.77013|">
  <paragraph geo_context="|Torslanda;SE;57.72432;11.77013|Göteborg;SE;57.70716;11.96679|">
    <sentence geo_context="|Göteborg;SE;57.70716;11.96679|Torslanda;SE;57.72432;11.77013|">
      <token>Varje</token>
      <token>tisdag</token>
      <token>kommer</token>
      <token>en</token>
      <token>leverans</token>
      <token>av</token>
      <token>lådor</token>
      <token>med</token>
      <token>matsvinn</token>
      <token>från</token>
      <token>Ica</token>
      <token>Maxi</token>
      <token>i</token>
      <token>Torslanda</token>
      <token>till</token>
      <token>förskolan</token>
      <token>i</token>
      <token>Göteborg</token>
      <token>.</token>
    </sentence>
  </paragraph>
</text>

Type

  • Analysis

Task

geotagging

Unit

text

Tool

Sparv

Model

Created

2018-05-28

Updated

2022-05-18

Contact

Språkbanken Text
sb-info@svenska.gu.se