FlutterKiwiFfiBindings class

Bindings for src/flutter_kiwi_ffi.h.

Regenerate bindings with dart run ffigen --config ffigen.yaml.

Constructors

FlutterKiwiFfiBindings(DynamicLibrary dynamicLibrary)
The symbols are looked up in dynamicLibrary.
FlutterKiwiFfiBindings.fromLookup(Pointer<T> lookup<T extends NativeType>(String symbolName))
The symbols are looked up with lookup.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

flutter_kiwi_ffi_add_user_word(Pointer<flutter_kiwi_ffi_handle_t> handle, Pointer<Char> word, Pointer<Char> tag, double score) int
Adds a user word to the in-memory dictionary.
flutter_kiwi_ffi_analyze_json(Pointer<flutter_kiwi_ffi_handle_t> handle, Pointer<Char> text, int top_n, int match_options) Pointer<Char>
Returns analysis output as a JSON string allocated by this library. Call flutter_kiwi_ffi_free_string to free the returned value.
flutter_kiwi_ffi_analyze_json_batch(Pointer<flutter_kiwi_ffi_handle_t> handle, Pointer<Pointer<Char>> texts, int text_count, int top_n, int match_options) Pointer<Char>
Runs analysis for multiple sentences and returns a JSON object: {"results":[{"candidates":...}, ...]}. Call flutter_kiwi_ffi_free_string to free the returned value.
flutter_kiwi_ffi_analyze_token_count(Pointer<flutter_kiwi_ffi_handle_t> handle, Pointer<Char> text, int top_n, int match_options, Pointer<Int32> out_token_count) int
Runs analysis and returns the token count of the first candidate. Returns 0 on success and writes to out_token_count.
flutter_kiwi_ffi_analyze_token_count_batch(Pointer<flutter_kiwi_ffi_handle_t> handle, Pointer<Pointer<Char>> texts, int text_count, int top_n, int match_options, Pointer<Int32> out_token_counts) int
Runs analysis for multiple sentences and returns first-candidate token counts for each sentence in order. Returns 0 on success and writes to out_token_countstext_count.
flutter_kiwi_ffi_analyze_token_count_batch_runs(Pointer<flutter_kiwi_ffi_handle_t> handle, Pointer<Pointer<Char>> texts, int text_count, int runs, int top_n, int match_options, Pointer<Int64> out_total_tokens) int
Runs repeated analysis for the same batch and returns the summed first-candidate token counts across all runs. Returns 0 on success and writes to out_total_tokens.
flutter_kiwi_ffi_close(Pointer<flutter_kiwi_ffi_handle_t> handle) int
Releases all resources for an analyzer instance.
flutter_kiwi_ffi_free_string(Pointer<Char> value) → void
Frees heap strings returned by this library.
flutter_kiwi_ffi_init(Pointer<Char> model_path, int num_threads, int build_options, int match_options) Pointer<flutter_kiwi_ffi_handle_t>
Initializes an analyzer instance. model_path can be null/empty for embedded/default model paths.
flutter_kiwi_ffi_last_error() Pointer<Char>
Returns last error for current thread. Returns null if there is no error.
flutter_kiwi_ffi_version() Pointer<Char>
Returns wrapper version.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited