Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Translating Comment Feature #497

Closed

Conversation

ashvinnihalani
Copy link

@ashvinnihalani ashvinnihalani commented Feb 2, 2022

Related Issue/Addition to code

Please delete options that are not relevant.

  • Fixes #
  • Issue/Addition to code, goes here.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Proposed Changes

  • Translate the comment text into English before filtering.

Additional Info

  • Several non-English comments slip by. An rc version of py-googletrans is needed due to downstream error

Checklist:

  • My code follows the style guidelines of this project and have read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Screenshots

Original Updated
** original screenshot ** updated screenshot **

@ethnh
Copy link
Contributor

ethnh commented Feb 2, 2022

It's a good idea in theory, but I can think of a couple of issues

  1. Performance issues
    If every comment is passed through the Google Translate API, the process of scanning for spam comments would be significantly slower -- Not everyone has 10Gig Fiber internet, and just the latency between a user and Google Translate could lead to a significant slowdown
  2. API Limits
    Unless the translate API is truly unlimited (which I doubt, but I'm not sure), it would be impossible for larger channels to scan their comments without reaching the limit or paying an incredible amount

Adding support for a greater number of languages will become necessary as this project grows, but I do not think that this will be the way to do it.
If both of these issues can be resolved, this would be a promising idea, but I don't think is the best way to solve this issue

No disrespect at all, but I'm not confident that it fits here.

As a possible solutions to both of these issues:
Grouping translation of messages might be possible,
image
I know nothing of the translating package, but translating multiple messages at once would cut the number of requests significantly, perhaps a viable option

@ThioJoe
Copy link
Owner

ThioJoe commented Feb 2, 2022

This is going to be infeasible tbh. Waiting on an API call for every single comment... Would slow down scanning by a factor of 1000x. Also you just used the translated text for everything which would break a ton of the filters. Not gonna be able to go with this unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants