Bing Spell Check API works only in English - spell-checking

Trying Bing Spell Check API, but it doesn't seem to work correctly with languages other than English. Available languages for Spell Check
I've tried to check French text, but the results will actually suggest mistakes to a perfectly fine text and vice versa (meaning it also won't correct a mistake in a text).
I've tried checking this text:
La Terre a un noyau interne solide
This is how I've passed the language:
var result = client.SpellCheckerWithHttpMessagesAsync(text: text, mode: "spell", acceptLanguage: "fr-FR").Result;
I've also tried setLang:
var result = client.SpellCheckerWithHttpMessagesAsync(text: text, mode: "spell", setLang: "fr-FR").Result;
The result suggested changing solide to solid which is wrong.
I've tried other texts as well as different languages with the same results.
Am I missing something in how to use this API?

Pls use market parameter mkt=fr-fr in the query and drop the setLang parameter.

Related

Using datepicker in DotNetNuke-7 module

I'm a DNN beginner. I am currently building a module in which I can display statistics. My DotNetNuke Version is 7.0. The statistic is from Chartjs. For this statistic I would like to implement filters. These filters should be datepickers. As UI element I have now included a textbox with TextMode='Date'. But currently I have problems to set the default value of this field. The default value should be 01.01. of the current year.
I have already tried to set the value via C# server side. Unfortunately without success. I also tried to set the value on the client side via JavaScript. Unfortunately also without success.
These are some lines I tried in JavaScript:
document.getElementById(<%= this.DatumVon.AccessKey %>).value = "01.01.2019";
document.getElementById(<%= this.DatumVon.AccessKey %>).innerText = "01.01.2019";
document.getElementById("DatumVon").value = "01.01.2019";
These are some lines I tried in C# in the method "Page_Load" (server side):
this.DatumVon.Text = "01.01.2019";
I expected the value of the TextBox to be 01.01.2019. However, it currently only contains dd.mmm.yyyy. How can I change this?
Thank you.
There is something wrong with your localization. Please refer to the jQuery UI datepicker documentation (the "Localization" section), this should give you the answer.
wow... I solved it. I made it. Sometimes the solution is right in front of you and you don't see it. Michael Tobisch was absolutely right. When setting the value, the format is very important. I have always used the German format. A DNN TextBox with TextMode="Date" can't handle that. DNN converts this TextBox into an HTML input field. But this input field can only be clear with the format "yyyy-mm-dd". Depending on the geographical position of the client (at least that's what I think) the text displayed in the input field will be formatted. But the value of the input field always has the same format ("yyyy-mm-dd"). So very important here: the displayed text and the actual value have different formats.
Many thanks again to Michael Tobisch for the mental inspiration and the patience with me.
What is also important is that the access to the actual ID of a DNN element works as follows: this.Element.ClientID and not as I assumed before this.Element.AccessKey. This was also buggy.

Google's search operator AND

I am trying to figure out how exactly google's search operator AND works for an application that I am currently building.
I found this article:
https://supple.com.au/tools/google-advanced-search-operators/
that says that google uses AND operator as a default operator when searching
however I am trying some examples and this doesn't seem to be the whole story
For example, when I search for:
Google search term: perth tourism sea surfing
it gives me more search results than:
Google search term: perth tourism sea
How is that possible, I would expect that AND operator would narrow the search results not increase them (this is what I would expect from an OR operator)
Any ideas of why this is happening?
Check this resource out: https://www.webpagefx.com/blog/google-2/google-advanced-search-operators-cheat-sheet/
I have a feeling the default behaviour is and/or, but I am somewhat speculating.
You could incorporate some quotes such as perth tourism "sea surfing" but I might try something such as allintext: perth tourism sea surfing. That would be more machine-friendly than worrying about where to include quotes. Quotes may also constrain the order of your keywords. For example, "I like cats" will find an exact match (and not return pages with I cats like).
Additionally, I think you might not be using AND as it is documented on the site you linked.
The AND operator functions with the same logic as an AND operator - similar to the OR operator, it must be in all CAPS to work. Google will look for all conditions to be met before returning any results.
e.g. site:twitter.com AND intitle:SuppleSolutions AND inurl:Saijo_George where all the 3 conditions should be satisfied for Google to return any result.
Your search terms should probably be:
perth AND tourism AND sea AND surfing
You could add to your logic to replace the search string's characters with AND but before that, I would probably see if allintext: perth tourism sea surfing is viable.
Apparently I think that it is a problem of personalization and localization
I did the following things:
1. I open an incognito window
2. I signed out from all google accounts
3. I opened google.com rather than google.xx using www.google.com/ncr
4. I searched "perth" AND "tourism" AND "sea" and "surfing"
which seems to narrow down the results from searches with less terms.

Deezer API search: weird result in advance search

I want to use the Deezer API to find a good match for a track using its title & artist, so I tried to use the advanced search described in http://developers.deezer.com/api/search#infos
But this api returns a lot of erratic results. For example:
https://api.deezer.com/search?q=artist:%27jeff%20mills%27 //Completely à côté de la plaque
https://api.deezer.com/search?q=jeff%20mills //Nice
It's pretty weird that when using the advanced search the result is less accurate than without it...
So is there a way to receive an accurate result for a track by specifying the artist and the title?
Thanks
Actually, it is not simple quotes that should be used but double quotes, and it works. We will update the documentation about this point, thank you!

How to get result of google place API In Hindi/Korean?

I need to get Api Response in Hindi and Korean. I have passed languge parameter with(hi for hindi) and checking its response by simulator but it's result is always in English.
Here is Url that was made by me for getting Search places result in Hindi
https://maps.googleapis.com/maps/api/place/search/json?location=28.580000,77.330000&sensor=true&key=AIzaSyAnAS2zrUGCxU5zp_JvuCrBWLwndv7rElI&name=BURGER&rankby=distance&language=hi
Please tell me if anybody has idea bout my question.
See the description of the language-parameter:
The language code, indicating in which language the results should be returned, if possible
There is no guarantee that the results will be in the desired language.
When there is no translation for the desired language/particular place-detail available, you will not get it.
So your attempt is correct, but you may not get better results.
When you inspect the response you'll see that you get results in hindi(where available) e.g. for Sangam Fry Burger -> संगम फ्राय बर्गर

Select a language in the Google search API

I am using the google search API to try and fetch some results from google and store them in a listbox.
This is working fine however I want to search in my own language (dutch) instead of the default language (english).
I tried using "dutch", "nl", "nl-NL", language.dutch but it doesn't seem to work, I've also searched alot but couldn't find the right answer.
Dim cl As New GwebSearchClient("www.google.nl")
Dim rtnList As IList(Of IWebResult) = cl.Search(KEYWORD, LENGTH, LANGUAGE)
For Each itm As IWebResult In rtnList
ListBox1.Items.Add(itm.Url) '
Next
I am not sure if this is what you are looking for, no experience with this API at all, but maybe this is some information for you:
Specific UI language - if you want to specify the language for the UI components (SearchControl, branding, etc...) instead of having it auto-detected then set "language" to the specific language code such as: en, es, zh-CN, pt-PT, and etc...
google.load("search", "1", {"language" : "en"});
From here.