Login

Tag "stemming"

Snippet List

Haystack whoosh backend with custom analyzer (allow using any lang, word processing, etc)

It is a haystack custom whoosh backend which provides analyzer customisation (required `get_analyzer` method definition). That means it is possible to define any complex analyzers (see [whoosh](https://bitbucket.org/mchaput/whoosh/wiki/Home) docs and source). Sample code shows how to use it, builtin `LanguageAnalyzer` instance configured for working with russian language used as custom analyzer. Base idea taken from this snippet: [https://djangosnippets.org/snippets/3025/](https://djangosnippets.org/snippets/3025/)

  • haystack
  • stemming
  • whoosh
  • analyzer
Read More

Haystack whoosh backend for stemming non-english language words

It's haystack whoosh backend code which involves stemming for specific language in time of indexing. 2 lines was changed comparing to original whoosh backend (StemmingAnalyzer replaced with LanguageAnalyzer for russian language, list of supported languages: [here](https://bitbucket.org/mchaput/whoosh/raw/default/src/whoosh/lang/snowball/__init__.py) )

  • haystack
  • stemming
  • whoosh
Read More

2 snippets posted so far.