How to get Google Translate API to return all Spanish translations of an English word with many meanings? - google-translate

I requested "fall" from the Google Translate API and it returned "otoño", which means "autumn". "Fall" has many other meanings in English, such as to fall off a cliff ("caer"). How do I get an array of all the translated meanings? The problem isn't in my code, I tried using Google Translate in Chrome and it returned "otoño".

Related

Google translate API with annotations

When using the Google Translate API, it just returns one translation for a given word. For example, when I let it translate the English word "hide" to Italian, it just responds with "nascondere".
However, Google Translate on the web offers much more: they don't just show one translation (or list of possible translations), but also the frequency as well as the precise meaning of a specific translation:
I'd like to get these results via an API.
Is there a public API that offers the same results?
Of course, I could just use the endpoint /translate_a/single that is used by the Google Translate website. But this endpoint does not include an API key, so if I send too many requests, they will most likely block me.
Also, the endpoint /translate_a/single returns many fields of which I do not know the precise meaning, so its usage would most likely involve some reverse engineering.

Bing Search with market return strange result

I have a strange behaviour with Bing Web Search.
I have a search query "hawkers" OR "hawkersco" OR "#hawkersco" OR "#hawkers" OR "www.hawkersco.com" with market = 'es-ES', safeSearch = Strict and responseFilter = webPages.
So, I expect, that result will contain at least one of these words and it will be Spanish posts. In fact I get more of posts in English and its not contain these keywords...
If I try search one by one these keywords, without OR operator, I had expected Spanish posts.
Please, explain why it is? How to use search query for get expected results?..
Check the specification for Bing Web Search API. Possibly this might be as simple as changing market to mkt(since you listed all the other parameters as used). And that means you should have a value for setLang as well.
You're not getting Spanish posts at all?
In that case, see here.
Bing results are based on relevance. Regardless of Market or Language.
If the result is deemed relevant. It will rank higher compared to the
selected language, and appear in the results.
Freshness affects the results, in that you need relevant(popular)
sites in your language. For them to attain sufficient relevance in the
selected time period.
You cannot rely on Bing returning a single language exclusively, with
the settings as they are.

Why is "natural_feature" excluded from Google Maps Geocoding and Places API searches?

Trying to mimic the 'what's here' feature of Google Maps in my own website but it seems that items of type 'natural_feature' are excluded from Google Maps 3 API geocoding and places searches, both nearby and radar, and also on text searches unless the EXACT name of the place is provided. This must have been an informed choice by Google to do this - anyone know the rationale, and better, offer a workaround? Seems crazy that I can't get the names of woods, nature reserves etc. any more...
Found out how to do it! If you get a geocoding API key from Google you can get all the data for natural features included in the JSON/XML response from a server request like the following (I was trying to get the data for "Gamsey Wood"):
https://maps.googleapis.com/maps/api/geocode/json?latlng=52.4180698,-0.2029999&result_type=natural_feature&key=YOUR_GOOGLE_GEO_KEY
Happy days!

Google Places api vs Google Maps search

I have successfully used Google Places Api and was able to retrieve business establishments (shops) given a latlongbound and a keyword. But I cant stop wondering why it returns lesser shops than when you go to maps.google.com and type the keyword. Google Places does not even return those with a name and icon drawn on the map itself.
I want to retrieve a json with a similar result when typing a keyword on maps.google.com and I don't really mind if Google Places is not used.
Sounds like you may have additional filtering preventing you from querying all the results. Make sure you aren't restricting the 'bounds' or 'region' around your lat/long.
https://developers.google.com/maps/documentation/geocoding/
Good luck!

Google translate text-to-speech in British

I'm using the (unofficial) Google translate TTS api to retrieve mp3s to support disabled learners to read web pages. It all works fine, however we have an American accent (we're in the UK!). When I use Google translate however, it fetches the mp3 with a British accent - how do I invoke this behavior?
I've used the same GET request URL so I can assume it's not that:
http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en
(I've played with other language codes (en-gb) with no luck - fr works for french however.)
Many thanks
You can specify a regional variation in the tl parameter after an _ character, e.g.
http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en_us
http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en_gb
http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en_au
By using google's ".co.uk" translate site's GET request, you can generate British English.
So for example: translate.google.co.uk/translate_tts?q=Your+soundcard+works+perfectly&tl=en

Resources