public virtual async Task <SpellCheckResponse> SpellCheckAsync(string text, SpellCheckModeOptions mode = SpellCheckModeOptions.None, string languageCode = "")
        {
            var qs = GetSpellCheckQuerystring(mode, languageCode);

            var response = await RepositoryClient.SendEncodedFormPostAsync(ApiKeys.BingSpellCheck, $"{ApiKeys.BingSpellCheckEndpoint}{qs}", $"Text={text}");

            return(JsonConvert.DeserializeObject <SpellCheckResponse>(response));
        }
Example #2
0
        public virtual async Task <double> SimilarityAsync(string s1, string s2)
        {
            var response = await RepositoryClient.SendEncodedFormPostAsync(ApiKeys.Academic, $"{ApiKeys.AcademicEndpoint}{similarityUrl}", $"s1={s1}&s2={s2}");

            return(JsonConvert.DeserializeObject <double>(response));
        }