Open abitrolly opened 3 years ago
It is a good idea. We should test it and see if it detects language reliably enough. I believe, I considered it first, before switching to polyglot, and it detected languages way worse than the latter one
I am not even sure why language is needed as all https://cheat.sh output seems to be only English.
It is for input, not for output.
$ curl cht.sh/python/прочитать+json
# python - Parsing values from a JSON file?
#
# I think what Ignacio is saying is that your JSON file is incorrect.
# You have [] when you should have {}. [] are for lists, {} are for
# dictionaries.
#
# Here's how your JSON file should look, your JSON file wouldn't even
# load for me:
{
"maps": [
{
"id": "blabla",
"iscategorical": "0"
},
{
"id": "blabla",
"iscategorical": "0"
}
],
"masks": {
"id": "valore"
},
"om_points": "value",
"parameters": {
"id": "valore"
}
}
...
This feature is broken at the moment though, but we will fix it
@chubin is that supposed to search only for Russian results?
No, for any language; the feature is currently broken though
https://github.com/aboSamoor/polyglot depends on pycld2, which depends on PyICU, which needs C compiler and tons of stuff to build, because it doesn't ship wheels.
The only
polyglot
feature what is used it language detection - https://polyglot.readthedocs.io/en/latest/Detection.htmlThis can be done with less sophisticated dependencies, such as https://github.com/Mimino666/langdetect