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

How Romanization is achieved #2

Open
sushruth opened this issue Jan 15, 2017 · 4 comments
Open

How Romanization is achieved #2

sushruth opened this issue Jan 15, 2017 · 4 comments
Labels

Comments

@sushruth
Copy link

sushruth commented Jan 15, 2017

This is not an issue, I just had this question : How is the project able to romanize text? Which google tranclate call or API is being used?

Thanks.

@MrS0m30n3
Copy link
Owner

MrS0m30n3 commented Jan 30, 2017

Basically i'm using the same Google service you use when accessing Google translate from your browser (translate.google.com).

The GoogleTranslator sends a GET request to the Google server mimicking the browser behaviour, then Google sends back a JSON structure which GoogleTranslator parses to extract all the requested information (including romanization).

For more details you can view the debug output from the CLI script or the API calls.

To view the actual request being sent run google-translate -m r -vv αβγ from the command line and find the line saying Request url.

You can also search for the line saying JSON data to view the actual JSON response.

@MrS0m30n3 MrS0m30n3 changed the title Need information on Romanization How Romanization is achieved Jan 30, 2017
@sushruth
Copy link
Author

sushruth commented Feb 2, 2017

Oh okay. Thank you for explaining that. Turns out our IP can get banned if we access it enough number of times. :(

@MrS0m30n3
Copy link
Owner

Yes, Google bans your IP if you send too many requests in a sort period of time.

You can use multiple proxies to overcome this issue or use the official Google translate API if you use the translate functionality too often.

@sushruth
Copy link
Author

sushruth commented Feb 5, 2017

I suppose. Thank you for the information.

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

No branches or pull requests

2 participants