lexnlp.nlp.en.segments.sections: Segmenting sections in text

The lexnlp.nlp.en.segments.sections module contains methods for segmenting text into zero or more sections.

Attention

The sections below are a work in progress. Thank you for your patience while we continue to expand and improve our documentation coverage.

If you have any questions in the meantime, please feel free to log issues on GitHub at the URL below or contact us at the email below:

lexnlp.nlp.en.segments.sections Module

Section segmentation for English.

This module implements section segmentation in English using simple machine learning classifiers.

Todo:
  • Standardize model (re-)generation

Functions

build_document_line_distribution(text[, …]) Build document and line character distribution for section segmenting based on fixed character, optionally normalizing vector.
build_section_break_features(lines, line_id, …) Build a feature vector for a given line ID with given parameters.
get_sections((text[, window_pre, …]) Get sections from text.

Variables

MODULE_PATH str(object=’‘) -> str
SECTION_SEGMENTER_MODEL A decision tree classifier.