Open Chinese Convert: opencc::AmbiguousSpan Struct Reference

Open Chinese Convert 1.4.2+g71621a0e1.dirty A project for conversion between Traditional and Simplified Chinese

Loading...
Searching...
No Matches
Public Attributes | List of all members
opencc::AmbiguousSpan Struct Reference

One span of the converted output whose source maps to more than one candidate (a one-to-many dictionary entry was applied), e.g. More...

`#include <src/ConversionAmbiguities.hpp>`

## Public Attributes
size_t | outputOffset
size_t | outputLength
size_t | sourceIndex

## Detailed Description

One span of the converted output whose source maps to more than one candidate (a one-to-many dictionary entry was applied), e.g.

文丑 in s2t, where 丑 maps to both 醜 and 丑 and either 文醜 (the Three Kingdoms general) or 文丑 (the opera role) may be intended.

Offsets and lengths are UTF-8 byte counts into AnnotatedConversion::output. The output bytes [outputOffset, outputOffset + outputLength) hold the default candidate. The input slice that produced this span is AnnotatedConversion::sources[sourceIndex]; passing it to GetAllConversions() enumerates every candidate.

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

- ConversionAmbiguities.hpp