.. index:: single: sentence_splitter_protocol .. _sentence_splitter_protocol/0: .. rst-class:: right **protocol** ``sentence_splitter_protocol`` ============================== Sentence splitting protocol for text represented as atoms, lists of characters, or lists of character codes. | **Availability:** | ``logtalk_load(tokenization(loader))`` | **Author:** Paulo Moura | **Version:** 1:0:0 | **Date:** 2026-09-08 | **Compilation flags:** | ``static`` | **Dependencies:** | (none) | **Remarks:** | (none) | **Inherited public predicates:** | (none) .. contents:: :local: :backlinks: top Public predicates ----------------- .. index:: split_sentences/2 .. _sentence_splitter_protocol/0::split_sentences/2: ``split_sentences/2`` ^^^^^^^^^^^^^^^^^^^^^ Splits text into sentences using the default options. | **Compilation flags:** | ``static`` | **Template:** | ``split_sentences(Text,Sentences)`` | **Mode and number of proofs:** | ``split_sentences(+text,-list(text))`` - ``one_or_error`` | **Exceptions:** | The ``Representation`` parameter is a variable: | ``instantiation_error`` | The ``Representation`` parameter is neither a variable nor ``atom``, ``chars``, or ``codes``: | ``domain_error(text_representation,Representation)`` | The ``Language`` parameter is a variable: | ``instantiation_error`` | The ``Language`` parameter neither a variable nor an object identifier: | ``type_error(object_identifier,Language)`` | The ``Language`` parameter is an object identifier but not an object conforming to ``tokenizer_language_protocol``: | ``domain_error(tokenizer_language_protocol,Language)`` | ``Text`` is not ground: | ``instantiation_error`` | The ``Representation`` parameter is ``atom`` but ``Text`` is not an atom: | ``type_error(atom,Text)`` | The ``Representation`` parameter is ``chars`` but ``Text`` is not a list of characters: | ``type_error(chars,Text)`` | The ``Representation`` parameter is ``codes`` but ``Text`` is not a list of character codes: | ``type_error(codes,Text)`` ------------ .. index:: split_sentences/3 .. _sentence_splitter_protocol/0::split_sentences/3: ``split_sentences/3`` ^^^^^^^^^^^^^^^^^^^^^ Splits text into sentences using the given tokenization options. | **Compilation flags:** | ``static`` | **Template:** | ``split_sentences(Text,Sentences,Options)`` | **Mode and number of proofs:** | ``split_sentences(+text,-list(text),+list(compound))`` - ``one_or_error`` | **Exceptions:** | The ``Representation`` parameter is a variable: | ``instantiation_error`` | The ``Representation`` parameter is neither a variable nor ``atom``, ``chars``, or ``codes``: | ``domain_error(text_representation,Representation)`` | The ``Language`` parameter is a variable: | ``instantiation_error`` | The ``Language`` parameter neither a variable nor an object identifier: | ``type_error(object_identifier,Language)`` | The ``Language`` parameter is an object identifier but not an object conforming to ``tokenizer_language_protocol``: | ``domain_error(tokenizer_language_protocol,Language)`` | ``Text`` is not ground: | ``instantiation_error`` | The ``Representation`` parameter is ``atom`` but ``Text`` is not an atom: | ``type_error(atom,Text)`` | The ``Representation`` parameter is ``chars`` but ``Text`` is not a list of characters: | ``type_error(chars,Text)`` | The ``Representation`` parameter is ``codes`` but ``Text`` is not a list of character codes: | ``type_error(codes,Text)`` | ``Options`` is a variable: | ``instantiation_error`` | ``Options`` is neither a variable nor a list: | ``type_error(list,Options)`` | An element ``Option`` of the list ``Options`` is a variable: | ``instantiation_error`` | An element ``Option`` of the list ``Options`` is neither a variable nor a compound term: | ``type_error(compound,Option)`` | An element ``Option`` of the list ``Options`` is a compound term but not a valid option: | ``domain_error(option,Option)`` ------------ Protected predicates -------------------- (none) Private predicates ------------------ (none) Operators --------- (none) .. seealso:: :ref:`tokenizer_protocol `, :ref:`tokenizer_language_protocol `, :ref:`tokenizer(Representation,Language) `