libthai 0.1.29

Functions
thwbrk.h File Reference

Thai wide-char word segmentation. More...

## Functions
int | th_brk_wc_find_breaks (ThBrk *brk, const thwchar_t *s, int pos[], size_t pos_sz)
| Find word break positions in Thai wide-char string.
int | th_brk_wc_insert_breaks (ThBrk *brk, const thwchar_t *in, thwchar_t *out, size_t out_sz, const thwchar_t *delim)
| Insert word delimitors in given wide-char string.
int | th_wbrk (const thwchar_t *s, int pos[], size_t pos_sz)
| Find word break positions in Thai wide-char string.
int | th_wbrk_line (const thwchar_t *in, thwchar_t *out, size_t out_sz, const thwchar_t *delim)
| Insert word delimitors in given wide-char string.

## Detailed Description

Thai wide-char word segmentation.

## Function Documentation

## ◆ th_brk_wc_find_breaks()

int th_brk_wc_find_breaks | ( | ThBrk * | brk,
|  | const thwchar_t * | s,
|  | int | pos[],
|  | size_t | pos_sz
| ) |  |
| extern

Find word break positions in Thai wide-char string.

Parameters

  brk | : the word breaker
  s | : the input string to be processed
  pos | : array to keep breaking positions
  pos_sz | : size of pos[]

Returns
  the actual number of breaking positions occurred

Finds word break positions in Thai string s and stores at most pos_sz breaking positions in pos[], from left to right.

(Available since version 0.1.25, libthai.so.0.3.0)

## ◆ th_brk_wc_insert_breaks()

int th_brk_wc_insert_breaks | ( | ThBrk * | brk,
|  | const thwchar_t * | in,
|  | thwchar_t * | out,
|  | size_t | out_sz,
|  | const thwchar_t * | delim
| ) |  |
| extern

Insert word delimitors in given wide-char string.

Parameters

  brk | : the word breaker
  in | : the input wide-char string to be processed
  out | : the output wide-char buffer
  out_sz | : the size of out (as number of elements)
  delim | : the wide-char word delimitor to insert

Returns
  the actual size of the processed string (as number of elements)

Analyzes the input string and store the string in output buffer with the given word delimitor inserted at every word boundary.

(Available since version 0.1.25, libthai.so.0.3.0)

## ◆ th_wbrk()

int th_wbrk | ( | const thwchar_t * | s,
|  | int | pos[],
|  | size_t | pos_sz
| ) |  |
| extern

Find word break positions in Thai wide-char string.

Parameters

  s | : the input string to be processed
  pos | : array to keep breaking positions
  pos_sz | : size of pos[]

Returns
  the actual number of breaking positions occurred

Finds word break positions in Thai string s and stores at most pos_sz breaking positions in pos[], from left to right. Uses the shared word breaker.

(This function is deprecated since version 0.1.25, in favor of th_brk_wc_find_breaks(), which is more thread-safe.)

## ◆ th_wbrk_line()

int th_wbrk_line | ( | const thwchar_t * | in,
|  | thwchar_t * | out,
|  | size_t | out_sz,
|  | const thwchar_t * | delim
| ) |  |
| extern

Insert word delimitors in given wide-char string.

Parameters

  in | : the input wide-char string to be processed
  out | : the output wide-char buffer
  out_sz | : the size of out (as number of elements)
  delim | : the wide-char word delimitor to insert

Returns
  the actual size of the processed string (as number of elements)

Analyzes the input string and store the string in output buffer with the given word delimitor inserted at every word boundary. Uses the shared word breaker.

(This function is deprecated since version 0.1.25, in favor of th_brk_wc_insert_breaks(), which is more thread-safe.)