Skip to main content

sbx-mul-sentence-sparv-whitespace

Standard reference Information

Bird, Steven, Edward Loper and Ewan Klein (2009), Natural Language Processing with Python. O’Reilly Media Inc.

Analysis citation Information

Språkbanken Text (2021). sbx-mul-sentence-sparv-whitespace (updated: 2021-05-07). [Analysis]. Språkbanken Text. https://doi.org/10.23695/d064-0046
BibTeX Additional ways to cite the dataset.
Segments text into sentences by whitespaces using the RegexpTokenizer from NLTK

The documentation for NLTK's RegexpTokenizer can be found here.

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:

- segment.sentence  # Sentence segments

In order to use this sentence segmenter you need to add the following setting to your Sparv corpus configuration file:

segment:
  sentence_segmenter: whitespace

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

Example output:

<sentence>
  <token>Det</token>
  <token>här</token>
  <token>är</token>
  <token>en</token>
  <token>korpus</token>
  <token>.</token>
</sentence>
<sentence>
  <token>Den</token>
  <token>har</token>
  <token>flera</token>
  <token>meningar</token>
  <token>.</token>
</sentence>

Type

  • Analysis

Task

  • sentence segmentation

Unit

  • sentence

Dependencies

External tools

Created

2010-12-15

Updated

2021-05-07

Contact

sb-info@svenska.gu.se