Google Translate,alternatives to translation - api

when i'm using the google-translate website like this
https://translate.google.de/#de/en/schnell
i have the possibility to click on the suggested translation, and i can see alternatives (for example quick, fast etc.)
Is there any possiblity to get these alternatives via the API ? Or does anybody know a reliable API to get a translation for a single word with alternatives?

At the moment there is no such feature. I've filed a Feature Request to get this implemented, although there is no ETA.

Related

How to call Google NLP Api from a Google Chrome extension

My aim is to select some text from a web page, start a google chrome extension and give the text to a google cloud api (Natural Language API) in my case.
I want to do some sentimental analysis and then get back the result to mark/ highlight positive sentences in green and negative ones in red.
I am new to this and do not know how to start.
The extension consists of manifest, popup etc. How should I call an API from there that does Natural Language Processing?
Should I create a Google Cloud Application with an API_KEY to call? In that case I would have to upload my credentials right?
Sorry sounds a bit confusing I know but I just don't know how I can bring this 2 things together an would be more than happy about any help
The best way to authenticate your app will depend on the specific needs and use cases of your application. You can see an overview of all the different methods here.
If you are not planning on identifying users nor on using a back end server that handles authenticating (as I assume to be your case), the best option would indeed be to use API keys. They do not identify the user, but are enough for the Natural Language APIs.
To do this you will need to create an API key for the services you want and add the necessary restrictions to make the key as secure as possible. Detailed instructions on how to do this and how to use the key in a url can be found here.
The API call could be made from within the Chrome extension with any JavaScript method capable of performing POST requests. For example using XMLHttpRequest or the Fetch API. You can find an example of the parameters that need to be included in the request here.
You may run into CORS issues when making the request directly from the extension. I recommend reading this answer, where a couple of workarounds for these issues are suggested.

How to get Google Cloud Translation used Chars via API?G

how do i get information from this page 'https://console.cloud.google.com/iam-admin/quotas' programmatically, i couldn't find any API service to do this, is there a way to do it?
Currently, this is not possible to achieve, however, there's a feature request to consider having this functionality.

google home reading from website

I'm currently working on a project where my main focus is to create an Action for Google Home which can be invoked and asked to read out some articles (chosen previously from a list, also by voice) from a particular website.
I was wondering if it was possible, or if it were already some similar projects.
What I'd like to do is something like the feature in Pocket or instapaper, where you can make the device read the article for you.
I also thought to make something like a database with all the articles I'm interested in, which auto-updates itself whenever a new article is posted, but my main concern now is to be able to separate the articles in various lists, parse the article and in the end implement text to speech into the Action.
Also some implementations with 3rd party services and apps would be useful.
Please ask me if anything isn't exactly clear, english is not my first language.
Yes, this is possible. Not necessarily easy, but possible.
First - there is nothing in the Actions on Google library or in Google Home that will automatically scrape a website. That will be up to you.
Second - Responses from your Action are limited in how much they can send at a time.
If you're having it do text-to-speech, you're limited to two "text bubbles" of 640 characters each before the user has to reply. You should keep well below that and should probably stick to just one "text bubble".
If you're playing an audio cut, then you're limited to two minutes.
You can work around both of these limitations by using the Media Response. With TTS, you would play a portion of the text, a brief Media response, at the conclusion of which, your server would be triggered to send the next chunk of text. If it is all recorded, you can just send the longer audio as the Media.
Be advised, however, that if you're using the inline editor or using Firebase Cloud Functions (which the inline editor uses), that by default you're not able to access most sites outside Google's network. You need to upgrade to a paid plan to do so. I suggest the Blaze plan which is pay-as-you-go, but includes a free tier which is typically good enough for development work and light production usage.

Why should we use twitter api insted of getting it from the non-api URL?

I was wondering if i can use the PHP library of Brandom
http://viralpatel.net/blogs/demo/Twitter.class.php.txt
Instead of using the twitter API which has rate limit.
What about using this:
http:// twitter.com/users/show/'.$id.".$format";
Instead of this:
https:// api.twitter.com/1/statuses/show/'.$id.".$format";
The 2nd one uses the API. The first one...i guess it doesn't.
So... can i use the fist one for this same purpose?
THanks.
Reasons you might want to use Twitter API:
Well documented and easy to comprehend
Proper explanation for the caught exception
Most reliable and real time results
Many dimensions to extract the data
Active community that resolves the issues(bugs, confusions ..etc). Also as the developers are Twitter guys, nothing could be more reliable as they know their product better.
Last but not the least, very easy to use
As far as "Rate Limit" is concerned, it can be dealt using Streaming API.

Why bother with an API for google's CDN

http://code.google.com/apis/libraries/devguide.html states that you need to sign up for an API to use the CDN. But why? You can clearly use it without.
Doesn't linking to google.com/blah/jquery.js?myAPIcode mean that a new version of jquery.js would be downloaded, rather than using a cached version? So using an API would slow down my website, and not using one would speed it up? Is there any advantage of using an API? Or is it just so Google can "contact you directly if we detect an issue with your site" AKA track you?
It says here a direct link is actually fastest:
"The preferred method is to load the libraries via standard tags (as in script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">, which will result in the fastest loads. "
Here it says a few reasons for using Load is that you can get the latest version automatically or specify a language or automatically load (or not load) css files, etc.
Given the http://html5boilerplate.com/ guys don't use an API, I think it's best not to. No one seems to know of a good reason. And Google tracking your site isn't a good reason (you probably use google analytics anyway!).