Top | ![]() |
![]() |
![]() |
![]() |
DeeICUTermFilter * | dee_icu_term_filter_new () |
DeeICUTermFilter * | dee_icu_term_filter_new_ascii_folder () |
gchar * | dee_icu_term_filter_apply () |
void | dee_icu_term_filter_destroy () |
GQuark | dee_icu_error_quark () |
This module allows developers to easily construct powerful DeeTermFilters with ease. The filters leverage the ICU framework to provide world class transliteration features.
The filters can be employed manually by calling dee_icu_term_filter_apply()
or installed in a DeeAnalyzer by calling dee_analyzer_add_term_filter()
passing the term filter instance as the user data and
dee_icu_term_filter_destroy()
as the GDestroyNotify.
DeeICUTermFilter * dee_icu_term_filter_new (const gchar *system_id
,const gchar *rules
,GError **error
);
Create a new DeeICUTermFilter for a given ICU transliterator system id and/or set of transliteration rules.
system_id |
A system id for the transliterator to use. See userguide.icu-project.org/transforms/general |
|
rules |
A set of transliteration rules to use. See userguide.icu-project.org/transforms/general/rules. |
[allow-none] |
error |
A place to return a GError, or |
[allow-none][error-domains Dee.ICUError] |
A newly allocated DeeICUTermFilter.
Free with dee_icu_term_filter_destroy()
.
[transfer full]
DeeICUTermFilter * dee_icu_term_filter_new_ascii_folder ();
Construct a term filter that folds any UTF-8 string into ASCII.
A newly allocated DeeICUTermFilter. Free with
dee_icu_term_filter_destroy()
.
[transfer full]
gchar * dee_icu_term_filter_apply (DeeICUTermFilter *self
,const gchar *text
);
Apply a DeeICUTermFilter on a piece of UTF-8 text.
void
dee_icu_term_filter_destroy (DeeICUTermFilter *filter
);
Free all resources allocated by a DeeICUTermFilter.
#define DEE_ICU_ERROR dee_icu_error_quark()
Error domain for the ICU extension to Dee. Error codes will be from the DeeICUError enumeration
Error codes for the ICU extension to Dee. These codes will be set when the error domain is DEE_ICU_ERROR.
DEE_ICU_ERROR_BAD_RULE
: Error parsing a transliteration rule
DEE_ICU_ERROR_BAD_ID
: Error parsing a transliterator system id
DEE_ICU_ERROR_UNKNOWN
: The ICU subsystem returned an error that is not
handled in Dee