Can I feed translations back to Google Cloud Translation API to train it? - google-translate

I am using the Google Translate neural network (amazing improvement) via the Google Cloud Translation API in SDL Trados to process technical translations.
Of course it needs heavy post-editing, mostly terminology and sometimes style. I would really like if the neural network could learn from this post editing - but there seems to be no way to do feed my edits back.
It is possible when using the web interface manually (translate.google.com).
The (years unupdated) Google Translator Toolkit allowed to used a shared public TM, but that is now obsolete with the neural network.
Can I somehow feed translations back to Google Cloud Translation API to train it?
Their FAQ states this:
"Does Google use my data for training purposes?
No, Google does not use the content you translate to train and improve our machine translation engine. In order to improve the quality of machine translation, Google needs parallel text - the content along with the human translation of that content."

As you pointed out, in the documentation regarding confidentiality, it is highlighted that Google does not use the data for training purposes as a background/transparent process, due to the following reasons:
Confidentiality: for confidentiality reasons, the content inputted to the Translation API will not be used for training the model.
Non-feasibility: the Neural Network model behind Translation API would require the non-translated content plus the translated version suggested by the user in order add some training to the model; so it is not possible to train the model with just the non-translated text.
Moreover, there is currently not the possibility to suggest translations to the API in order to train the model in a more custom way.
As a side note, you might be interested in keeping an eye on AutoML, the new Google Cloud Platform's product that is currently still in alpha, but to which you can request access by filling in the form in the main page. It will allow the creation of custom Machine Learning models without requiring the dedication and expertise that other more complex products such as ML Engine require. The first product of the AutoML family to be launched will be AutoML Vision, but it is possible that similar products will appear for some of the other ML-related APIs in the Platform, such as the Translation API, which is the one you are interested in.
Also feel free to visit the Google Cloud Big Data and Machine Learning Blog from time to time in order to keep updated in the latest news in this field. If you are interested in AutoML, its release and presentation will probably have an article in the blog too.
So as a summary: no, currently you cannot feed suggested translations back to the Translation API, but in the future you might be able to do so, or at least have your own custom models.

Related

Several request to Google AI platform simultaneously

I am developing a website in wordpress that uses Google AI platform predictions. The prediction request is done through the PHP client library.
Now my question is when several users from a website are making a prediction request simultaneously is Google’s Client library able to return the right prediction to each user?
Indeed that is the intended behavior, each response is linked to a particular request and thus responses should not be mixed up even if several requests are made simultaneously. I would recommend you to look at some AI Predictions official documentation like:
Prediction overview
Getting online predictions
In general, you should ask practical, answerable questions based on actual problems that you face (see, stack overflow How do I ask a good question? and What types of questions should I avoid asking?). Hence, try to implement your desired behavior and if you find any problems while doing so (e.g. responses are not properly assigned to each user) then let us know and we will try to help you.
In this case, if you find a clear issue with the Google prediction products you can open a public issue or contact Google Support so the Google team tackles it accordingly.

Speech recognition in WordPress based on Alexa Skill

I would like to develop a WordPress plugin that will allow users to voice-interact with a WordPress website. I want it to be based on Alexa Skill.
What would be the architecture for this task?
If you think your use case is relatively standard, you can take a look at VoiceWP, which was built to allow for management of an Alexa skill mostly from within WordPress.
If you need something more custom, you can use the WordPress REST API to provide Alexa with the data you need. With this architecture, your plugin on the WordPress side would just be setting up and managing all the REST API endpoints.
From the top down the architecture looks like this:
This leaves you with 3 pieces to build:
Set up the Alexa Skill
First, you have to set up the skill with the Alexa Skills Kit. This involves setting up things like the name of your skill, the icon, and most importantly, where the skill should look to get it's functionality. In our example, we'll point the skill to an AWS Lambda function.
Set up the Lambda Skill to fulfill the Alexa input
Once the Skill knows to look to the Lambda function for it's functionality, we actually need to code the Lambda function. This can be done in Node.js (JavaScript), Python, Java (Java 8 compatible), C# (.NET Core) or Go. What the Lambda function needs to do is parse the JSON that comes from Alexa and determine which endpoint to call or which parameters to pass to this endpoint. For an example of this in Python, you can check out my example on GitHub.
Set up WordPress endpoints to provide data
Once you have the Lambda function parsing the user's intent and pushing the request to the specific endpoints, you need to write the code from within WordPress to make sure all the endpoints you need are available. This is the part that I'm able to give the least input on because the specific endpoints that you will need are based on your use case, which I don't really know at this point. But for an example of how we created a settings field and returned that value through a custom REST API endpoint, you can see this example on GitHub.
Wrapping up and Extending it Further
So once the data is returned from WordPress, formatted by the Lambda function and returned to Alexa, the user will hear the results of their query.
This can be customized and further functionality added by adding more endpoints to WordPress and more routing to the Lambda function based on new Alexa voice inputs.
Further Reading Watching
If you're interested in learning more, I've given a couple talks about this:
WP REST API as the Foundation of the Open Web Voice stuff starts at 11:06
Voice Is The New Keyboard: Voice Interfaces In 2018 And Beyond - This uses Google Home for the custom skill, but the ideas presented here are the same.

Where do APIs get their information from

After some time being working with Restful APIs I would like to know a bit more about their internal functionality.
I would like a simple explanation about how the API`s get access to the data that they provide as responses to our requests.
There are APIs, for example weather API`s or sports APIs that are capable to provide responses with very recent data (such as sports results), I am wondering where or how they get that updated info almost as soon as it is available.
I have seen here on SO questions with answers pointing to API design tutorials, but not to this particular topic.
An API is usually simply a facade (or an interface if you prefer) to some information resource. The idea behind it is to "hide" any complexity from the user, to unify several services to a single access point or even to keep the details about the implementation of the actual service a secret.
This being said you probably understand now that there can't be one definitive answer to the question "where do APIs get their info from?". But some common answers are:
other APIs
some proprietary/in-house developed service/database
etc.
For sports APIs - probably they are being provided by some sports media, which has the results as soon as they get out, so they just enter them in their DB and immediately they become available through their API.
For weather forecasts - again as with the sports API they are probably provided by a company dealing with weather forecasts.
If it's easier for you you can think of the "read-only" APIs as rss feeds in a way.
I hope this clears the things a bit for you.
You could have a look at Stack Share to see what companies use for databases and whatnot. But there isn't a universal answer, every company uses whatever works for them.
This usually means that te company has its own database in which the data is stored. But they might also get their data from another company.
But a 'database' is not just SQL, maybe they use unstructured data or any of the other options to store data.
That's where the "whatever works" comes from. The company chooses a solution they go with which best fits their needs.

Can i train it to detect my face? or any other people face

I want to create an application where in I capture images of people within my family and detect who it is. can I use vision API to create cloud database to store different pictures of each family members labelled with their names so that when I pull a request from the API it scans the images from the database and detects which family member it is rather than just detecting the faces in it. can I train it to do so???
It is possible to train the classifier. More details can be found in this link: How to train and classify images using Google Cloud Machine Learning and Cloud Dataflow

Will Google block my access if I use their features without token?

I'm using this link https://www.google.com/reader/api/0/stream/contents/feed/FEEDHERE?output=json&n=20
to fetch feeds using Google's algorithm. As you can see I'm not adding any other parameters, just fetching the returned data in JSON format. My app will be heavily used hopefully and if I send a lot of requests to this link, will Google block my access or something?
Is there anything I can include, like userip, url for my app (so if they have problem to just contact me) or something else?
The most basic answer to your question is that Google will change its Terms of Service whenever it likes, and you've got no say in the matter. So if it's allowed today, it might not be allowed tomorrow, at Google's whim.
On this issue, though, you seem fairly safe. From the Terms of Service (these is the general document, since Reader doesn't seem to have a specific one):
Don’t misuse our Services. For example, don’t interfere with our Services or try to access them using a method other than the interface and the instructions that we provide.
Google provides RSS and Atom. They provide these feeds, so I assume they expect that they'll be used. They don't say that it's a misuse to point someone else at those feeds, so it looks OK for now, but they could add such a clause at any time.
All online services are subject to the terms and conditions of the providers of those services. So, as others have said, they may be ok with your use today, but they can change their mind any time down the line. I doubt including a URL or email or contact info will help anything, because when these services change, they don't notify every user of the service, they just announce the change publicly, and usually they give several month's notice in order to give users a chance to adapt their applications, but this is not standardized or enforced so there is no guarantee. One example would be the fairly recent discontinuance of the Google Finance API (for which no replacement has been announced).
The safest approach would be to design your app such that this feature that uses google's functionality is decoupled as much as possible from the rest of your app, so that, when or if the availability of the service changes (ie it's no longer available at all) you can adapt your app to use some other source for the feeds with minimal impact to the rest of the app. Design for change and plan for the worst.

Resources