View Source TxtaiEx.Segmentation (txtai_ex v0.1.1)

txtai segmentation instance for interfacing with a remote txtai service via REST API calls, providing functionality for segmenting text into semantic units.

Summary

Functions

Segments a list of texts into semantic units in batch.

Segments text into semantic units.

Functions

Link to this function

batchsegment(api, texts)

View Source

Segments a list of texts into semantic units in batch.

Parameters

  • api: The API struct containing configuration for URL and token.
  • texts: A list of texts to be segmented.

Returns

  • on success, where batch_segments is a list of lists, each containing segmented text units for each input text.
  • on failure.

Segments text into semantic units.

Parameters

  • api: The API struct containing configuration for URL and token.
  • text: The text to segment.

Returns

  • on success, where segments is a list of segmented text units.
  • on failure.