Google Places API : Is the option to switch off location biasing been removed from auto complete API? - autocomplete

Previously there was an option to disable location biasing by passing location=0,0 & radius=20000000, now this option is no longer available on the API docs. There is also change in the results of autocomplete API with location=0,0 & radius=20000000.

I had success turning off biasing by using location=0,0 and radius=1.
location=0,0 and radius=20000000 seemed to have the effect of biasing everything. That configuration resulted in some odd results like searching for "belize" and being returned only cities and provinces in Belize and not the country of Belize.

I have also noticed this and it behaves strange. For eg: when you search with input text "New" and location=0,0&radius=20000000, you will get
"New No. 142, Velachery Road, Next To Raptakos Brett & Co, opp. Maruthi Driving School, Indira Gandhi Nagar, Velachery, Chennai, Tamil Nadu, India". This is not at all justifiable when there are many other popular cities like New York is present in the bottom of the autocomplete list. An answer on this is appreciated.
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=New&key=&location=0,0&radius=20000000
Created a ticket with google support and waiting for their answer.

Related

Make tile-ID request URL work with mapbox-style "satellite-streets" using folium

I use Python for plotting geospatial data on maps.
For certain map-styles, such as ["basic", "streets", "outdoors", "light", "dark", "satellite", "satellite-streets"], I need a mapbox-access token and for some geospatial plotting packages like folium I even need to create my own link for retrieving the map-tiles.
So far, it worked great with the style "satellite":
mapbox_style = "satellite"
mapbox_access_token = "....blabla"
request_link = f"https://api.mapbox.com/v4/mapbox.{mapbox_style}/{{z}}/{{x}}/{{y}}#2x.jpg90?access_token={mapbox_access_token}"
However, when choosing "satellite-streets" as mapbox-tile-ID, the output doesn't show a background map anymore. It fails with inserting "satellite-streets", "satellitestreets" and "satellite_streets" into the aforementioned link-string.
Why is that and how can I come to know what's the correct tile-ID-name for "satellite-streets"?
I found an answer when reaching out to the customer support.
Apparently, one has to access the static APIs which have specific names listed on their website:
"In general, the styles that you mentioned including
"satellite_streets" that you are referencing are our classic styles
that are going to be deprecated starting June 1st. I would recommend
using our modern static API the equivalent modern styles. This
will allow you to see the most updated street data as well.
Like the example request below:
https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/1/1/0?access_token={your_token}
Here is more info on the deprecation of the classic styles and
the migration guide for them."
My personal adaptation after having tried everything out myself, is:
Via combining the above-mentioned with the details on how to construct a Mapbox-request link on this documention from mapbox' website,
I finally managed to make it work.
An example request looks like so (in python using f-strings):
mapbox_tile_URL = f"https://api.mapbox.com/styles/v1/mapbox/{tileset_ID_str}/tiles/{tilesize_pixels}/{{z}}/{{x}}/{{y}}#2x?access_token={mapbox_access_token}"
The tileset_ID_str could be e.g. "satellite-streets-v11" which can be seen at the following link containing valid static maps.

Undefined parameter in Google Action

I have a DialogFlow agent I am trying to test on Google Assistant. I've created a relatively simple Intent called "Set name" with the following Training phrases:
My name is Ryan.
Bill
I'm Steve
The name's Bond. James Bond.
It has two parameters:
Required: given-name with the Entity #sys.given-name and the value stored as $given-name
last-name with the Entity #sys.last-name and the value $last-name
I'm able to test in just fine in the DialogFlow test console. But when I try to "See how it works in Google Assistant." I get the following error:
Request contains an invalid argument. The query pattern 'The name's
Bond. $SchemaOrg_Person:given-name $SchemaOrg_Person:last-name.'
contains an undefined parameter 'last-name.'
If I delete the "James Bond" training phrase, it works okay. But I would like to include that. What am I doing wrong?
Here is a screenshot of the intent that is causing the problem:
Here is the link I'm clicking to try in Google Assistant:
And finally, here is the error message that appears in the bottom-right corner of the screen when I click that link:
I suddenly got a few of these error messages when both clicking the "See how it works in Google Assistant" link and submitting the app for production.
It seems like characters like apostrophes and hyphens in the training phrases creates trouble and can give that error message.
In addition it complained about a variant of the training phrases that I could not find anywhere no matter how much I looked at all languages, all pages of the phrases and all intents. I finally found the phrase in question by exporting the project and searching through the JSON files. Then I could delete the phrase locally, delete the intent in Dialogflow and do an import back to Dialogflow. (From my understanding it had messed up a follow-up intent which it also in the JSON (nowhere in the UI) had attached parts of some training phrases.)
Try to remove the dot from the sentence. So it will be:
"The name's Bond. James Bond"
I ran into same error and finally it was found to be an issue with the additional language I have added.
There was default "en" language and "en-IN" added by me. The issue was with training phrases in "en-IN" language. I didn't need it so removed it and it worked fine.
So, do check how many languages are enabled in your agent and whether training phrases are set properly for them or not.

Why watson Personality Inisights shows different results using different API versions/demo

My apologies if the question is duplicated. We are facing an issue with the analysis of a profile using Watson Personality Insights API in Spanish. We have a demo we implemented using PI API version 2 and then we tested the results (exact same text) with the demo published on developer cloud(in spanish) and we found important differences on how the big five were calculated when the facet values were not that different. Is it possible that these differences are caused because of the API version? The issue that with our demo the big five values produced a kind of negative summary profile when the developercloud summary is kinder.
We could send both result jsons. For example here is how the big five rated:
BigFive DeveloperCloud Demo V2
Openness 0.773834349 0.847273232
Conscientiousness 0.916616088 0.914907481
Extraversion 0.796331544 0.612606551
Agreeableness 0.17445636 0.096118648
Emotional range 0.036287447 0.01623536
thanks in advance!!
So the API version would not make a difference, as that just governs the format of the API; the back-end models are the same for both v2 and v3 of the API.
So the jist of your question is that when you run the same text in your app, and in the demo you get different big5 results, while the facet values are about the same.
This might be easiest solved by you opening a support ticket so we can debug the issue together; if you'd rather not do that then can you provide a sample text? Typically it boils down to a difference in the way the text is parsed.
Another question; did you try making the request using curl? That would cut out any custom logic in your app and narrow down the problem.
thanks Neil for you answer!
We tested the text using CURL and we noticed that the results didn't change by the service version used but instead by how the text was sent. If we called the service using curl passing a plain text input(formatted in UTF-8 with line breaks) it returned the same results for version2 and version 3 and also matched the ones from our demo. If we called the service using curl passing json input WITHOUT line breaks it returned the same values as well. But if we called the service passing the json input WITH line breaks then the results changed and almost matched those shown by ibm demo. My question here is which are the correct results? The ones shown when the text is sent as a plain text input(with line breaks) or when the text is sent as json input(with line breaks)? Is there any technical guideline besides the one shown in developercloud on how the text should be parsed to use this service?
Thanks again!

What does the parameter "cvid" in Bing search engine stands for?

As I searching something with Bing and I open the Chrome development tools. Here is the request url:
http://cn.bing.com/search?q=%e4%b9%a0%e8%bf%91%e5%b9%b3&go=%e6%8f%90%e4%ba%a4&qs=n&pq=%e4%b9%a0%e8%bf%91%e5%b9%b3&sc=6-6&sp=-1&sk=&cvid=AF49B4165317411D8AFEF30F13BCD108&first=10&FORM=PERE
So, what does the parameter "cvid" stands for? It seems if i don't set a cvid,i can't get the complete result html in my program.
By the way, the cvid is calculated by the browser automaticlly, so how to calculate?
In the Bing search context, cvid represents the JavaScript parameter ConversationId. Bing uses this key to identify your search result collection as its reply to your query, q. Similarly, pq is PartialQuery. These and other parameters may also apply to different kinds of searches, such as image or video searches.
Next, qs is your query's SuggestionType, sc shows your SuggestionCount, and from the suggestion list (dropped down, if enabled), sp shows the SuggestionPosition you chose. In your case, you did not select a suggestion, so &sp=-1. Toward the end of your string, sk is the SkipValue, because you might skip through your result pages, first tells the issuer how many results belong on the first page, and I'll let you figure out what FORM means. ;)
TRY:
Navigate to Bing, conduct a search, choose some options, change your displays, and change some search types. Next, open file explorer and navigate to your Windows OS equivalent of the following path.
C:\Users\{user}\AppData\Local\Microsoft\Windows
Next, you may need to adjust your View temporarily to "Show hidden files, folders, and drives." View tab > Options > Change... > View tab again, and click the bullet to "Show...".
In File Explorer's Search pane at the upper right, enter *.js to find all JavaScript files. It may point you several subfolders deeper, and the folder names may be hashed. Choose a JavaScript file you find interesting, right-click the file, and open it with Notepad, your favorite IDE, or some similar editor. You should see something akin to this (truncated; may not run independently):
var AutoSuggest,__extends,Bing,sa_inst;(function(n){var t;(function(n){var t,i,r,u,f,e;(function(n){n.User="SRCHHPGUSR"})(t=n.CookieNames||(n.CookieNames={})),function(n){n.AutoSuggest="AS"}(i=n.CrumbNames||(n.CrumbNames={})),function(n){n.CursorPosition="cp";n.ConversationId="cvid";n.SuggestionCount="sc";n.PartialQuery="pq";n.SuggestionPosition="sp";n.SuggestionType="qs";n.PreviewPaneSuggestionType="qsc";n.SkipValue="sk";n.PreviewPaneSkipValue="skc";n.Ghosting="ghc";n.Css="css";n.Count="count";n.DataSet="ds";n.SessionId="sid";n.TimeStamp="qt";n.Query="q";n.ImpressionGuid="ig";n.QFQuery="qry";n.BaseQuery="bq";n.FormCode="form";n.HashedMuid="nclid";n.RequestElToken="elvr";n.ElTokenValue="elv";n.AppId="appid";n.History="history";n.NoHistory="nohs";n.ApiTextDecoration="textdecorations";n.ClientId="clientid";n.Market="mkt";n.Scope="scope";n.CountryCode="cc";n.HomeGeographicRegion="hgr";n.SetLang="setlang";n.ZeroInputSerp="zis"}(r=n.QueryParams||(n.QueryParams={}))
I hope that helps someone! :D
I'm also trying to find out what this is :)
I'm pretty sure it's an encryption mechanism for bing a la public key cryptography, though I could be wildly wrong. There is another field called pq - and p's and q's are used a lot in crypto theory.
The field is 32 nibbles (e.g. 8D0E519A91024A08B075654D006C0A14) which equals 128 bits. This number results in some arithmetic operation with the binary value of your search and bing's private key - thus making url generation quite difficult.

GitHub advanced search default behaviour

I'm new to Github and just want to browse through repos to find interesting ones.
I want, say, all ruby repos with more than 100 followers.
I go to advanced search and try "followers:100"
and get only repos with EXACTLY 100 followers (4 at the moment).
That differs from what i expect to be default behavior - find repos with 100 or more followers (more like Stackoverflow search works).
I am quite frustrated, because I can't get what is expected to be basic search functionality from a very popular site, and that makes me think that I'm obviously not understanding something very simple (because I think it is not possible for Github not to have such functions).
So is there a way for me to get the desired result?
Update January 2013 (source: "A whole new code search")
followers:>100
(intervals are supported: followers:100..150)
Original answer (April 2011)
followers:[100 TO *]
should do what you want: see your query with 100 or more followers.
(Note: the "TO" needs to be in uppercase)
(Source: New and Improved Search)
For example, we can search:
for people with a username fuzzily similar to ‘chacon’
who use Ruby as their primary language,
have at least 5 repos and
at least one follower:
You might also like the Hubscovery application. A simple search interface for Github.