morpheme_funcs
morpheme_funcs · MeCab morpheme extraction and set-based text similarity
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100902 | morpheme_funcs | morpheme_funcs | 0.0.0 | FTS | Unknown | Rust |
PostgreSQL · 12, 13, 14, 15, 16, 17
Usage
Sources:
morpheme_funcs version 0.0.0 is a Rust/pgrx wrapper around MeCab for Japanese morphological tokenization. to_morpheme_array(text) returns a sorted set of unique morphemes, while calculate_similar_score(text,text) computes the Jaccard ratio of the two unique-token sets.
Example
Build and runtime require the native MeCab library plus an installed dictionary. Tokenization therefore depends on the exact dictionary and configuration and may vary between servers. The score ignores token order and frequency, so it is not a linguistic or semantic similarity measure. The implementation keeps a mutable process-local tagger and is still version 0.0.0; pin the full native environment and load-test it before exposing it to arbitrary text.