Sphinx extension to split searchword with TinySegmenter
Project description
A Sphinx extension for tokenize japanese query word with TinySegmenter.js
This extension tweaks searchtools.js of sphinx-generated html document to tokenize Japanese composite words.
Since Japanese is an agglutinative language, query word for document search usually becomes composite form like ‘システム標準’ (system standard). This makes difficult to search pages containing phrase such as ‘システムの標準’, ‘標準システム’, because TinySegmenter.py (Sphinx’s default Japanese index tokenizer) tokenizes ‘システム’ and ‘標準’ as indexes.
sphinx-tsegsearch patches searchtools.js to override query tokinization step so that query input is re-tokenized by TinySegmenter.js (original JavaScript implementation of TinySegmenter). As a result, roughly say, this tiny hack improves recall of Japanese document search in exchange of precision.
Usage:
Add ‘sphinx_tsegsearch’ in conf.extensions
Rebuild document.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sphinx-tsegsearch-1.2.tar.gz
.
File metadata
- Download URL: sphinx-tsegsearch-1.2.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.10.2 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d879b84c3a20491090025c91fb5a061d5840ba8850a15e842d1f9e6d454e5db |
|
MD5 | 0ad8c275b993f06969d51e0a89c54c8d |
|
BLAKE2b-256 | c42cbb367b0294fa4a639fd5099fda5fdcc3b31e56dfe19edaf26f7a4634095c |
File details
Details for the file sphinx_tsegsearch-1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: sphinx_tsegsearch-1.2-py2.py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.10.2 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac9f1dc6ff87341884e024c9e3d4ad3e7499d914139776f25fda266971c78d9a |
|
MD5 | 1c583310b018378e9a0369affdec0e0b |
|
BLAKE2b-256 | 1b6ca6764dbf5290bea12814293cf83c3cf7b67e27a315ebc4ca69e320b55753 |