[mod] drop fasttext-predict (#5795)

Removes the `fasttext-predict` dependency and the language detection code.

If a user now selects `auto` for the search language, the detected language now
falls back directly to the `Accept-Language` header sent by the browser (which was already the fallback when fasttext returned no result).

- fasttext's [language detection is unreliable](https://github.com/searxng/searxng/issues/4195) for some languages, especially short search queries, and in particular for queries containing proper names which is a common case.
- `fasttext-predict` consumes [significant memory](https://github.com/searxng/searxng/pull/1969#issuecomment-1345366676) without offering users much real value.
- the upstream fasttext project was archived by Meta in 2024
- users already have two better alternatives: the `Accept-Language` header and the search-syntax language prefix (e.g. `:fr` or `:de`).

Related: https://github.com/searxng/searxng/issues/4195
Closes: https://github.com/searxng/searxng/issues/5790
This commit is contained in:
Brock Vojkovic
2026-03-06 22:40:44 +08:00
committed by GitHub
parent c7ba2158f9
commit 68ff08f224
5 changed files with 5 additions and 127 deletions
-1
View File
@@ -12,7 +12,6 @@ httpx-socks[asyncio]==0.10.0
sniffio==1.3.1
valkey==6.1.1
markdown-it-py==3.0.0
fasttext-predict==0.9.2.4
tomli==2.4.0; python_version < '3.11'
msgspec==0.20.0
typer==0.24.1