|
Open Chinese Convert 1.3.2
A project for conversion between Traditional and Simplified Chinese
|
A Converter that performs one segmentation pass followed by one ConversionChain.
More...
#include <SingleStageConverter.hpp>
Public Member Functions | |
| SingleStageConverter (SegmentationPtr segmentation, ConversionChainPtr conversionChain) | |
| std::string | Convert (std::string_view text) const override |
Converts text and returns the result. | |
| ConversionInspectionResult | Inspect (std::string_view text) const override |
Converts text and returns a detailed inspection result that includes the initial segmentation, per-stage intermediate segments, and final output. | |
| SegmentationPtr | GetSegmentation () const override |
Returns the segmentation used by this converter, or nullptr if the converter has no single segmentation (e.g. | |
| ConversionChainPtr | GetConversionChain () const override |
Returns the conversion chain used by this converter, or nullptr if the converter has no single chain (e.g. | |
A Converter that performs one segmentation pass followed by one ConversionChain.
This is the standard converter produced by loading a single JSON config file. It:
Segmentation (or treats the entire input as one segment when segmentation is nullptr).ConversionChain, which applies one or more dictionaries in order.
|
inline |
| segmentation | Segmentation strategy to use, or nullptr to skip segmentation and treat the whole input as a single segment. |
| conversionChain | Ordered dictionary chain applied to each segment. |
|
overridevirtual |
Converts text and returns the result.
| text | UTF-8 input; need not be null-terminated. |
Implements opencc::Converter.
|
inlineoverridevirtual |
Returns the conversion chain used by this converter, or nullptr if the converter has no single chain (e.g.
Implements opencc::Converter.
|
inlineoverridevirtual |
Returns the segmentation used by this converter, or nullptr if the converter has no single segmentation (e.g.
Implements opencc::Converter.
|
overridevirtual |
Converts text and returns a detailed inspection result that includes the initial segmentation, per-stage intermediate segments, and final output.
Intended for debugging and tooling rather than production conversion.
Implements opencc::Converter.