Open Chinese Convert: opencc::ConversionInspectionResult Struct Reference

Open Chinese Convert 1.3.2.dirty A project for conversion between Traditional and Simplified Chinese

Loading...
Searching...
No Matches
Public Attributes | List of all members
opencc::ConversionInspectionResult Struct Reference
OpenCC C++ Comprehensive API

Full inspection result returned by Converter::Inspect(). More...

`#include <ConversionInspection.hpp>`

## Public Attributes
std::string | input
| The original input text passed to Inspect().
std::vector< std::string > | segments
| Initial segmentation produced by this converter's Segmentation.
std::vector< ConversionInspectionStage > | stages
| Per-dictionary-stage trace through this converter's ConversionChain.
std::vector< ConversionInspectionResult > | pipelineStages
| Per-child-converter inspection results for a PipelineConverter.
std::string | output
| The final converted output of this converter.

## Detailed Description

Full inspection result returned by Converter::Inspect().

The fields that are populated depend on the concrete Converter type:

- SingleStageConverter fills `segments` (initial segmentation), `stages` (per-Conversion trace through the ConversionChain), and `output`. `pipelineStages` is empty.
- PipelineConverter fills `pipelineStages` (one entry per child Converter, each with its own fully populated result) and `output`. `segments` and `stages` are empty at the pipeline level.

In both cases `input` and `output` are always populated.

## Member Data Documentation

## ◆ output

std::string opencc::ConversionInspectionResult::output

The final converted output of this converter.

Always populated.

## ◆ pipelineStages

std::vector<ConversionInspectionResult> opencc::ConversionInspectionResult::pipelineStages

Per-child-converter inspection results for a PipelineConverter.

Each entry is the full result of the corresponding pipeline stage; the structure is naturally recursive for nested pipelines. Empty for SingleStageConverter.

## ◆ segments

std::vector<std::string> opencc::ConversionInspectionResult::segments

Initial segmentation produced by this converter's Segmentation.

Non-empty only for SingleStageConverter.

## ◆ stages

std::vector<ConversionInspectionStage> opencc::ConversionInspectionResult::stages

Per-dictionary-stage trace through this converter's ConversionChain.

Non-empty only for SingleStageConverter.

The documentation for this struct was generated from the following file:

- ConversionInspection.hpp