Using <2FEMALE> and <2MALE> with the Google Translate API - google-translate

Has anyone had any luck using the <2FEMALE> and <2MALE> tags (https://ai.googleblog.com/2018/12/providing-gender-specific-translations.html) for helping the translation to properly conjugate verbs for the person's gender?
For example:
Hi Sarah, the next time you’re feeling overwhelmed by work.
is translated to:
Bonjour Sarah, la prochaine fois que vous vous sentirez submergé par le travail.
but the submergé should be submergéé given Sarah is a female name.
If I try <2FEMALE>Hi Sarah, the next time you’re feeling overwhelmed by work. then it works correctly, but if I do <2FEMALE>Hi George, the next time you’re feeling overwhelmed by work. then it ignores the <2FEMALE> and still returns the male conjugation. Keep in mind that George can be a nickname for Georgina, although that shouldn't really be relevant if it was respecting the <2FEMALE> tag.
Anyway, would love if someone has some tips to make this reliable.
Thanks.

Related

How to specify gender in Google Cloud Translation API

I am using Google Cloud Translation API in one of my projects. I want to specify the gender for the translation. I am unable to find about this in Google Cloud Translation. I have also searched a lot on the Internet but not found any way to do this. I know how to specify the gender in Google Text to Speech API using the SSML, but I need it for the translation. Any help will be highly appreciated.
After much searching I have discovered that there is currently no way to do this.
I have made a feature request along these lines at the invitation of GCP support.
The documentation indicates that feature requests are prioritised by how often an issue is starred, so for now my best answer is to star the issue here so that they know how many people are interested in this.
Looking for the same...
As it is NMT (Neural Machine Translation), it reacts to context.
I tried many combinations and found that this works well so far (says, not 'to', not 'talk').
Examples are EN > ES
However, sometimes its effect doesn't reach far in the translation.
So you have to stick the 'prefix' before each sentence.
Sometimes you get irregular behavior (see lower case "estoy"). And when you change something irrelevant (to you, but not to the model) ... buala!
So the final version (for now) is:
I guess the point is:
Understanding how it works (Machine Learning Language Models)
The Model (Algorithm) they use is evolving, so you need to keep an eye, as what works today may break tomorrow.
Once you get the response you will have to filter out you 'prefix', but that is not too difficult.
Please comment if you find better ways (or the API gets updated).
Related info: https://ai.googleblog.com/2018/12/providing-gender-specific-translations.html

Alexa - build custom slot for addresses

I am creating in which a user can say an address (for further processing). An address can be anything from "New York" to "123 First Avenue Washington" to "Seattle Harbor". Basically like something you can enter at Google Maps - it will recognize more or less everything :)
So now of course comes the problem on how to create a custom slot for this? LITERAL is deprecated PLUS I am working on a German language skill.
Should I actually try to fill the 50,000 lines I got available for a custom skill with as many enumerations of addresses as I can come up with? I'm afraid that even if I go down that road, Alexa will still try to map any input that's not in that list to one that is - and thereby rendering my skill a bit mood :(
Thanks for any advise!
As you suggest, using a custom slot with 50K sample addresses wouldn't really work. Something as complicated as an address really needs a built-in slot type, and there is one for US skills:
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference#postaladdress
But you noted that you are targeting a German language skill and as far as I know there isn't a German language or address version of the above built-in slot yet.
The fact that they have done it for US suggests that they will add it for Germany at some point, but counting on that is risky, of course, so you are in a difficult position. In the mean-time I would suggest you go to the feature request space and add a request for a German version of the above:

Scraping: Check if wiki a page is a person-page

I have been trying to scrape all the biography wiki pages for weeks. The problem is I can't find a way to distinguish a page concerning a person or something else.
For instance the following pages:
view-source:https://en.wikipedia.org/wiki/Albert_Einstein
view-source:https://en.wikipedia.org/wiki/Spider
look pretty similar regarding their HTML code. I am sure there must be a keyword allowing you to know if the page is related to a person.
Has anyone faced the same problem?
Thanks in advance =)
I'm not sure there is a definite way to tell but you could build up a list of indicators that you think the page might be about a person and then match on these.
For example on the Albert Einstein page there is a section for "Born" and "Died" on the right pane. By having these present we can be pretty sure that this article is about a person (although if you look for died you'll probably only get dead people). These titles however aren't consistent and you would need to match against one or more of these to build up confidence that the article is indeed about a person. e.g. https://en.wikipedia.org/wiki/Lionel_Messi doesn't contain the "Born" header but it does contain "Date of birth".
Alternatively to this you could do some natural language parsing to try and figure out if the main text on the page is talking about a person. Lots of mentions of "he" or "she", probably means the article is talking about a person.

Strange alert when navigating through map google api v3

a strange problem is happening to me. When I load the map this alert appears im my map:
Dados do mapa
Dados cartográficos ©2012 Google, MapLink
I'm Brazilian so in english this alert would be:
Map Data
Cartographic data ©2012 Google, MapLink
This think started recently... about 3 or 4 days. I don't know what i can do to solve this problem... Anyone can help me?
If this help: Firebug detect that the domain of this alert is: maps.googleapis.com
My application include google api as this:
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
I'm putting another question here because i can't find an google support e-mail to talk about the alert that they put on api v3 when someone violate the terms of use of google.
I was reading the problem and I'm really not violating the terms of use, cause I'm trying to up the application in my local machine like a test, and I'm still getting the alert. I don't want to violate the google code to put off the alert so I realy need to talk with the supporters to solve the problem. Anyone has the e-mail of any supporter, I realy need to solve this problem.
Thank you very much for your time.
Heitor Polizeli Rodrigues Brazilian Student in Cience Computer UNESP - 3º Year - 5 semester
This is a large notice on top of the map, like this...?
Normally this means that you have obscured the Terms of Use or copyright links, or the Google logo. It may indicate that Google have detected you're using the Free API on an internal network.

Can one Twitter account lead to every other Twitter account?

Well, I'm sure all of you are aware of the Wikipedia 'Easter egg' that enables a user to follow every first embedded link in each article to an eventual link to the /Philosophy page.
Is it possible to connect to every Twitter account in some sort of linked-list-like fashion by starting from just one account that follows at least one other account?
Ex:
#Bob follows #Pete.
#Pete follows #Bob and #Susan.
So, from #Pete, you can get to #Susan through #Bob
etc...
I wasn't sure if this is supposed to be asked on the theoretical computer science SE page or here on SO.
If nobody follows poor old Toby and Toby follows nobody then you could never get to him. (Toby just likes the idea of twitter not actually using it) .
'Orphan' accounts (ones that are neither followed nor follow others) would make it impossible for all accounts to be linked.
Even ignoring them, there would still be some 'closed' loops - just like there are in the Wiki Philosophy curiosity/game.
However, it seems you're not the first to wonder about this and there's a good write-up here: http://www.sysomos.com/insidetwitter/sixdegrees/

Resources