|
Open Chinese Convert 1.3.2+gad37fd0a6.dirty
A project for conversion between Traditional and Simplified Chinese
|
Abstract base for text segmentation. More...
#include <Segmentation.hpp>
Public Member Functions | |
| virtual SegmentsPtr | Segment (std::string_view text) const =0 |
Splits text into segments and returns them. | |
| SegmentsPtr | Segment (const char *text) const |
| Convenience overload for null-terminated C strings. | |
| SegmentsPtr | Segment (const std::string &str) const |
| Convenience overload for std::string. | |
Abstract base for text segmentation.
Splits a UTF-8 string into an ordered list of segments. Each segment is either a dictionary-matched word or a single unmatched code point / IDS sequence. The primary virtual is Segment(std::string_view); the const char* and const std::string& overloads are non-virtual convenience adapters that forward to it.
|
pure virtual |
Splits text into segments and returns them.
This is the primary override point for subclasses.
Implemented in opencc::JiebaSegmentation, and opencc::MaxMatchSegmentation.