Closed LuisMayo closed 3 years ago
Haven't tested this one but it looks good, thank you!
There is an error where if you make loads of petitions it'll crash with a 429 HTTP error code
I advise against using this code in production and I'm sorry for the problems that may arise
I plan to make a fix during today
Check https://github.com/LuisMayo/ace-attorney-bot/tree/translation-error-hotfix for a hotfix
Thanks and sorry for the disturbances
Ah cool, no worries. I added the hotfix, it's running smoothly. The other bots look great! Let me know if you'd like me to make an announcement on u/objection-bot that the bot is now available on other platforms
An announcement would be great! I'm well aware people were asking it for discord at least so they may find the info useful.
As for the "Rate exceeded" I've found several possible solutions so I'll just state them here for the sake of discussion. In case you aren't fully aware of the problem, the problem is that by processing several messages the "detect_language" function starts crashing by being limited by the Google Translate API.
To fix this problem, several solutions may be used:
Which option do you think will be the best for this project? Tell me so I open a PR with whatever you want to do (or do it yourself if you want to). For my project I'll probably use the Google Official API, fallbacking to py-googletrans then fallback to no translation since language support is more important in Twitter/Telegram/Discord than it is on Reddit so I prefer a more stable API.
Regards and thanks!
Cool, I've created a post with links to each project. Let me know if there's any further info I should add.
For the reddit bot, I think making the hotfix permanent is probably the best solution. As you said, most of reddit is in english and by having the hotfix in place at least it will work on the non-english subs as traffic on the bot reduces over time.
Thanks. The Discord link is this: https://discord.com/oauth2/authorize?client_id=806980920544460831&permissions=100352&scope=bot
Thank you again! I'll do a PR in a few hours probably
This PR adds sentiment analysis capabilities to other languages other than english by performing the analysis over a translated version of the original text.
I'm well aware that Reddit speaks mainly in English, so this PR may not be useful. Please feel free to reject it. I had to type code anyway for my own purposes so I think you may be interested in it. As I said, feel free to reject the PR if you fell it doesn't add anything relevant.
Thanks