Open topic with navigation

# Calculate Perplexity

Perplexity is a metric used in the language modeling. It indicates the average branching factor for a typical language.

To measure perplexity, you need:

- Sample text that closely resembles the speech transcripts that you intend to process with the language model, or the speech transcripts themselves
- The language model to measure

To measure perplexity of a language model

1. Normalize the sample text (see Run Text Normalization).

2. Send an `AddTask` action to IDOL Speech Server, and set the following parameters:

   `Type` | The task name. Set to `LmPerplexity`.
   `Tlm` | The base language model to analyze.
   `Text` | The sample text file.
   `Out` | The log file to generate.

For example:

    http://localhost:15000/action=AddTask&Type=LmPerplexity&Text=C:\data\transcript.txt&Tlm=C:\LP\ENUK\ver-ENUK-5.0.tlm&Out=PerpScore.ctm

This action calculates the perplexity of the `ver-ENUK-5.0.tlm` language model using the `transcript.txt` sample text, and to write the results to the `PerpScore.ctm` file.

This action returns a token. You can use the token to:

- Check the task status. See Check the Status of a Task.
- Retrieve the results. See Find Recommended Language Resources to Use in a Task.

© 2015-2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm