> ## Documentation Index
> Fetch the complete documentation index at: https://developers.phrase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analysis Overview

## What is Analysis?

Analysis is a Phrase TMS feature that calculates word/character counts and match statistics for a job's segments, split into bands like translation memory (TM) matches, machine translation (MT) matches, internal fuzzy matches, non-translatables, and repetitions. It's the basis for quotes, workload estimates, and post-editing effort measurement.

For a product-level walkthrough of the Analysis UI, see the [Analysis (TMS)](https://support.phrase.com/hc/en-us/articles/5709712007708-Analysis-TMS) support article. This guide covers how to create and interpret analyses via the API, and documents the [downloaded export formats](/en/guides/analysis/structure) in full.

## Analysis types

| Type                                                 | Runs on                               | Purpose                                                                   |
| ---------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------- |
| Default (`PreAnalyse`)                               | Source segments, before translation   | Baseline word/char counts for quotes and workload planning                |
| Target (`PreAnalyse` with `countSourceUnits: false`) | Target segments                       | Same breakdown, counted against target-language content instead of source |
| Post-editing (`PostAnalyse`)                         | Target segments, after translation/MT | Editing effort — how much a linguist/reviewer had to change               |
| Compare (`Compare`)                                  | Two workflow steps, same job          | Segment-level diff of word/char counts between two workflow levels        |

See [Creating an analysis](#creating-an-analysis) for how `type` and its options map to the create request.

## Creating an analysis

[Create analysis](/en/api/tms/latest/analysis/create-analysis) takes a job selection (`jobs` — job UIDs from the same project, or `jobFilter` — project + optional filename/status/targetLangs/workflowStep/provider/dueIn filters) and a `type`, which picks what gets measured:

| `type`        | Measures                                                                | Type-specific options                                                                                                                         |
| ------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `PreAnalyse`  | Source segments, before translation — the baseline for quotes/workload  | `countSourceUnits` (source vs target counts), `skipMtScoreThreshold`                                                                          |
| `PostAnalyse` | Post-editing effort on target segments, after translation/MT            | `transMemoryPostEditing`, `machineTranslatePostEditing`, `nonTranslatablePostEditing` — each measures edit distance against that match source |
| `Compare`     | Segment-level word/char diff between two workflow steps of the same job | `compareWorkflowLevel` (required)                                                                                                             |

Options common to every type: `includeTransMemory` / `includeMachineTranslationMatches` / `includeNonTranslatables` — which match sources count; `includeFuzzyRepetitions` / `separateFuzzyRepetitions` — fold internal fuzzy matches into regular bands or break them out; `includeNumbers` / `includeConfirmedSegments` / `includeLockedSegments` / `includeNotConfirmedSegments` — which segments count at all; `name` (supports macros like `{projectName}`, `{sourceLang}`, `{targetLang}`); `netRateScheme` (see [below](#net-rate-schemes-and-discounts)); `useProjectAnalysisSettings` to fall back to the project's [default analyse settings](/en/api/tms/latest/project/get-analyse-settings) instead of specifying everything inline.

To split output instead of getting one combined analysis, either pass `analyzeByLanguage`/`analyzeByProvider` on the same request, or use the dedicated [Create analyses by languages](/en/api/tms/latest/analysis/create-analyses-by-languages) / [Create analyses by providers](/en/api/tms/latest/analysis/create-analyses-by-providers) endpoints for the same job selection — the latter also pre-applies a provider's net rate scheme, if they have one assigned.

<Note>
  Analysis results are always per language pair, calculated against that pair's own TM — even when several target languages share one TM.
</Note>

### Working with Analysis via the API

| Task                                              | API operation                                                                                                                                      |
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Create an analysis                                | [Create analysis](/en/api/tms/latest/analysis/create-analysis)                                                                                     |
| Create one analysis per target language           | [Create analyses by languages](/en/api/tms/latest/analysis/create-analyses-by-languages)                                                           |
| Create one analysis per provider                  | [Create analyses by providers](/en/api/tms/latest/analysis/create-analyses-by-providers)                                                           |
| Get an analysis's results                         | [Get analysis](/en/api/tms/latest/analysis/get-analysis)                                                                                           |
| Download an analysis (CSV/CSV\_EXTENDED/LOG/JSON) | [Download analysis](/en/api/tms/latest/analysis/download-analysis)                                                                                 |
| Recalculate an outdated analysis                  | [Recalculate analysis](/en/api/tms/latest/analysis/recalculate-analysis)                                                                           |
| Delete an analysis                                | [Delete analysis](/en/api/tms/latest/analysis/delete-analysis)                                                                                     |
| Get/edit a project's default analysis settings    | [Get analyse settings](/en/api/tms/latest/project/get-analyse-settings), [Edit analyse settings](/en/api/tms/latest/project/edit-analyse-settings) |

<Note>
  A source file update marks its analyses `outdated`; recalculating re-applies the original settings. Vendors can't recalculate analyses created by the buyer.
</Note>

## Interpreting results

Each language pair's result (`analyseLanguageParts[].data`) breaks counts into buckets, each carrying `segments`, `words`, `characters`, `normalizedPages`, `percent`, and `editingTime`:

| Bucket                      | Meaning                                                                                                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `all`                       | Totals across every bucket below                                                                                                                                                     |
| `repetitions`               | Duplicate segments — only the *first* occurrence of a repeated segment is counted in its match/fuzzy bucket; every later occurrence is counted here instead                          |
| `transMemoryMatches`        | TM match bands: `match101` (in-context exact), `match100` (exact), `match95` (95–99%), `match85` (85–94%), `match75` (75–84%), `match50` (50–74%), `match0` (0–49%, no usable match) |
| `internalFuzzyMatches`      | Same match bands, but matched against other segments in the job instead of the TM (enabled via "include/separate internal fuzzies")                                                  |
| `machineTranslationMatches` | Same match bands, for MT-suggested segments                                                                                                                                          |
| `nonTranslatablesMatches`   | Same match bands, for segments Phrase determined don't need translation                                                                                                              |

<Note>
  `match95` means the 95%–99% band, `match85` means 85%–94%, and so on — the label is the band's lower (exclusive of the next band up) bound, not an exact score. `match101` only exists for TM matches, and marks in-context exact matches (same source text *and* surrounding context, not just the same text).
</Note>

Each language part also has a `discountedData` object with the same shape as `data`, reflecting the [net rate scheme](#net-rate-schemes-and-discounts) applied to that analysis, if any.

### Net rate schemes and discounts

A net rate scheme applies a discount to words/characters/pages in specific match buckets (e.g. TM 100% matches billed at 20% of the normal rate). Applying one populates `discountedData` alongside the raw `data` — the UI shows this as the analysis's **Net rate** row.

| Task                                  | API operation                                                                                                      |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Create a net rate scheme              | [Create net rate scheme](/en/api/tms/latest/net-rate-scheme/create-net-rate-scheme)                                |
| List net rate schemes                 | [List net rate schemes](/en/api/tms/latest/net-rate-scheme/list-net-rate-schemes)                                  |
| Get a net rate scheme                 | [Get net rate scheme](/en/api/tms/latest/net-rate-scheme/get-net-rate-scheme)                                      |
| Set or remove a scheme on an analysis | [Set or remove net rate scheme for analyse](/en/api/tms/latest/analysis/set-or-remove-net-rate-scheme-for-analyse) |

A scheme can also be applied automatically: pass `netRateScheme` on [Create analysis](/en/api/tms/latest/analysis/create-analysis), or use `analyzeByProvider`/[Create analyses by providers](/en/api/tms/latest/analysis/create-analyses-by-providers) to inherit the provider's assigned scheme.

## Exporting an analysis

Analyses can be downloaded in four formats via [Download analysis](/en/api/tms/latest/analysis/download-analysis) (`format` query parameter: `CSV`, `CSV_EXTENDED`, `LOG`, or `JSON`) — the same formats offered by the **Download** button in the UI. See [Analysis export formats](/en/guides/analysis/structure) for the full field-by-field reference.
