コード例 #1
0
        public virtual SpellCheckResponse SpellCheck(string text, SpellCheckModeOptions mode = SpellCheckModeOptions.None, string languageCode = "")
        {
            var qs = GetSpellCheckQuerystring(mode, languageCode);

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

            return(JsonConvert.DeserializeObject <SpellCheckResponse>(response));
        }
コード例 #2
0
        public virtual double Similarity(string s1, string s2)
        {
            var response = RepositoryClient.SendEncodedFormPost(ApiKeys.Academic, $"{ApiKeys.AcademicEndpoint}{similarityUrl}", $"s1={s1}&s2={s2}");

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