.. index:: single: n_grams(Representation)
.. _n_grams/1:

.. rst-class:: right

**object**

``n_grams(Representation)``
===========================

* ``Representation`` - Text representation. Valid values are ``atom``, ``codes``, and ``chars``.


Token and character n-gram generation for multiple text representations.

| **Availability:** 
|    ``logtalk_load(n_grams(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-09-05

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Implements:**
|    ``public`` :ref:`n_grams_protocol <n_grams_protocol/0>`
| **Imports:**
|    ``public`` :ref:`options <options/0>`
| **Uses:**
|    :ref:`list <list/0>`
|    :ref:`type <type/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`n_grams_protocol/0::bigrams/2`  :ref:`n_grams_protocol/0::character_n_grams/3`  :ref:`n_grams_protocol/0::character_n_grams/4`  :ref:`options_protocol/0::check_option/1`  :ref:`options_protocol/0::check_options/1`  :ref:`n_grams_protocol/0::count/2`  :ref:`n_grams_protocol/0::count/3`  :ref:`options_protocol/0::default_option/1`  :ref:`options_protocol/0::default_options/1`  :ref:`n_grams_protocol/0::n_grams/3`  :ref:`n_grams_protocol/0::n_grams/4`  :ref:`options_protocol/0::option/2`  :ref:`options_protocol/0::option/3`  :ref:`n_grams_protocol/0::trigrams/2`  :ref:`options_protocol/0::valid_option/1`  :ref:`options_protocol/0::valid_options/1`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

(no local declarations; see entity ancestors if any)

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

.. seealso::

   :ref:`n_grams_protocol <n_grams_protocol/0>`

