1#ifndef ICU4XWordSegmenter_HPP
2#define ICU4XWordSegmenter_HPP
12#include "ICU4XWordSegmenter.h"
24struct ICU4XWordSegmenterDeleter {
25 void operator()(capi::ICU4XWordSegmenter* l)
const noexcept {
26 capi::ICU4XWordSegmenter_destroy(l);
100 inline const capi::ICU4XWordSegmenter* AsFFI()
const {
return this->inner.get(); }
101 inline capi::ICU4XWordSegmenter* AsFFIMut() {
return this->inner.get(); }
110#include "ICU4XDataProvider.hpp"
116 auto diplomat_result_raw_out_value = capi::ICU4XWordSegmenter_create_auto(provider.AsFFI());
118 if (diplomat_result_raw_out_value.is_ok) {
123 return diplomat_result_out_value;
126 auto diplomat_result_raw_out_value = capi::ICU4XWordSegmenter_create_lstm(provider.AsFFI());
128 if (diplomat_result_raw_out_value.is_ok) {
133 return diplomat_result_out_value;
136 auto diplomat_result_raw_out_value = capi::ICU4XWordSegmenter_create_dictionary(provider.AsFFI());
138 if (diplomat_result_raw_out_value.is_ok) {
143 return diplomat_result_out_value;
ICU4XError
Definition ICU4XError.hpp:23
Definition ICU4XDataProvider.hpp:32
Definition ICU4XWordBreakIteratorLatin1.hpp:28
Definition ICU4XWordBreakIteratorUtf16.hpp:28
Definition ICU4XWordBreakIteratorUtf8.hpp:28
Definition ICU4XWordSegmenter.hpp:35
ICU4XWordSegmenter()=default
static diplomat::result< ICU4XWordSegmenter, ICU4XError > create_auto(const ICU4XDataProvider &provider)
Definition ICU4XWordSegmenter.hpp:115
ICU4XWordSegmenter(ICU4XWordSegmenter &&) noexcept=default
static diplomat::result< ICU4XWordSegmenter, ICU4XError > create_lstm(const ICU4XDataProvider &provider)
Definition ICU4XWordSegmenter.hpp:125
static diplomat::result< ICU4XWordSegmenter, ICU4XError > create_dictionary(const ICU4XDataProvider &provider)
Definition ICU4XWordSegmenter.hpp:135
ICU4XWordBreakIteratorUtf8 segment_utf8(const std::string_view input) const
Definition ICU4XWordSegmenter.hpp:145
ICU4XWordBreakIteratorLatin1 segment_latin1(const diplomat::span< const uint8_t > input) const
Definition ICU4XWordSegmenter.hpp:151
ICU4XWordSegmenter(capi::ICU4XWordSegmenter *i)
Definition ICU4XWordSegmenter.hpp:102
ICU4XWordBreakIteratorUtf16 segment_utf16(const std::u16string_view input) const
Definition ICU4XWordSegmenter.hpp:148
Definition diplomat_runtime.hpp:84
Definition diplomat_runtime.hpp:144
constexpr T * data() const noexcept
Definition diplomat_runtime.hpp:152
constexpr size_t size() const noexcept
Definition diplomat_runtime.hpp:155
Definition diplomat_runtime.hpp:69
Definition diplomat_runtime.hpp:55