-
|
Hello, where is the path of the automatic search language detection code (in the air filter, not the settings)? And how does it work? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
|
Its in the util.py ... Lines 555 to 623 in 4b42644 |
Beta Was this translation helpful? Give feedback.
-
|
thank you . Sir, does he also use the language of the browser? Because most of the time, it does not recognize the language of the searched text correctly and returns only the language of the browser. What is the solution? (I have a searxng sample) |
Beta Was this translation helpful? Give feedback.
-
|
There is a threshold Lines 262 to 263 in 4b42644 if lang detection does not reach the threshold, browser's language is used: Lines 192 to 195 in 4b42644 |
Beta Was this translation helpful? Give feedback.
-
|
Well, this lowers the accuracy of the work and consequently the quality of the results. Why don't you use more accurate libraries for language recognition or online services? |
Beta Was this translation helpful? Give feedback.
-
lowers by what and compared to what? ..
You know a better lib? .. (that does not to much memory) .. we optimized fasttext to lower the footprint --> https://github.com/searxng/fasttext-predict
Would add a HTTP request/response round-trip (on server side) to each search a user sends .. the response of the result list will take longer / we try to minimize the search response to as little as possible. Most time consumption is in the HTTP request/response cycles / OT: that is why we also optimized such round-trips in the CSS & JS .. |
Beta Was this translation helpful? Give feedback.
-
|
In the tests that I did, this method does not work well on non-English languages, especially with short text lengths, and most of the time, the browser language is used, so the results are diverted to the browser language. This Python library has worked well in my use: langdetect That's right, online service is not good for this |
Beta Was this translation helpful? Give feedback.
Its in the util.py ...
searxng/searx/utils.py
Lines 555 to 623 in 4b42644