<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/modeling/ops/__init__.py) |

Ops package definition.

## Classes

[`class SamplingModule`](https://www.tensorflow.org/api_docs/python/tfm/nlp/ops/SamplingModule): Implementation for sampling strategies (go/decoding-tf-nlp).

[`class SequenceBeamSearch`](https://www.tensorflow.org/api_docs/python/tfm/nlp/ops/SequenceBeamSearch): Implementation of beam search loop.

## Functions

[`get_next_sentence_labels(...)`](https://www.tensorflow.org/api_docs/python/tfm/nlp/ops/get_next_sentence_labels): Extracts the next sentence label from sentences.

[`get_sentence_order_labels(...)`](https://www.tensorflow.org/api_docs/python/tfm/nlp/ops/get_sentence_order_labels): Extract segments and labels for sentence order prediction (SOP) task.

[`sequence_beam_search(...)`](https://www.tensorflow.org/api_docs/python/tfm/nlp/ops/sequence_beam_search): Search for sequence of subtoken ids with the largest probability.