# Language Modeling

The aim of language modeling is to output the probability of a sentence.

Language models are used in speech recognition and machine translation systems, where it can be useful to know the most probable sentence. Ex. if a machine hears "today is a great day", it should know to use "great" instead of "grate".

A language model can be trained using a sufficiently large corpus of text.

It can be used to predict the probability of the next word in a sentence, given the previous word(s).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vikram-bajaj.gitbook.io/deep-learning-specialization-coursera/main-10/sequence-models/recurrent-neural-networks/language-modeling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
