Skip to content

Commit

Permalink
small clean-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
v-stadam committed May 11, 2018
1 parent 44b7863 commit 2984bce
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
---
title: Frequently Asked Questions (FAQ) about Azure Spell Check API | Microsoft Docs
description: Get answers to common questions about Microsoft Cognitive Services Spell Check API on Azure.
title: Frequently Asked Questions about the Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get answers to common questions about the Bing Spell Check API on Azure.
services: cognitive-services
author: HeidiSteen
manager: jhubbard
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: conceptual
ms.date: 07/26/2017
ms.author: heidist
---
# Frequently Asked Questions about the Bing Spell Check API

# Frequently Asked Questions (FAQ) about Spell Check API (Cognitive Services)

Find answers to commonly asked questions about concepts, code, and scenarios related to the Spell Check API for Microsoft Cognitive Services on Azure.
Find answers to commonly asked questions about concepts, code, and scenarios related to the Bing Spell Check API for Microsoft Cognitive Services on Azure.

### How do I get the optional client headers when calling the Bing Spell Check API from JavaScript?
## How do I get the optional client headers when calling the Bing Spell Check API from JavaScript?

The following headers are optional, but we recommend that you treat them as required. These headers help the Bing Spell Check API return more accurate results.

Expand All @@ -25,9 +24,9 @@ The following headers are optional, but we recommend that you treat them as requ

However, when you call the Bing Spell Check API from JavaScript, your browser's built-in security features might prevent you from accessing the values of these headers.

To resolve this, you can make the Bing Spell Check API request through a CORS proxy. The response from such a proxy has a `Access-Control-Expose-Headers` header that whitelists response headers and makes them available to JavaScript.
To resolve this issue, you can make the Bing Spell Check API request through a CORS proxy. The response from such a proxy has a `Access-Control-Expose-Headers` header that whitelists response headers and makes them available to JavaScript.

It's easy to install a CORS proxy to allow our [tutorial app](tutorials/spellcheck.md) to access the optional client headers. First, if you don't already have it, [install Node.js](https://nodejs.org/en/download/). Then enter the following command at a command prompt.
It's easy to install a CORS proxy to allow the [tutorial app](tutorials/spellcheck.md) to access the optional client headers. First, if you don't already have it, [install Node.js](https://nodejs.org/en/download/). Then enter the following command at a command prompt.

npm install -g cors-proxy-server

Expand All @@ -39,11 +38,11 @@ Finally, start the CORS proxy with the following command:

cors-proxy-server

Leave the command window open while you use the tutorial app; closing the window stops the proxy. In the expandable HTTP Headers section below the search results, you can now see the `X-MSEdge-ClientID` header (among others) and verify that it is the same for each request.
Leave the command window open while you use the tutorial app; closing the window stops the proxy. In the expandable HTTP Headers section below the search results, you can now see the `X-MSEdge-ClientID` header (among others) and verify that it's the same for each request.

## Next steps

Is your question about a missing feature or functionality? Consider requesting or voting for it on our [User Voice web site](https://cognitive.uservoice.com/).
Is your question about a missing feature or functionality? Consider requesting or voting for it on the [UserVoice web site](https://cognitive.uservoice.com/).

## See also

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: C# Quickstart for Azure Cognitive Services, Bing Spell Check API | Microsoft Docs
title: C# Quickstart for Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get information and code samples to help you quickly get started using the Bing Spell Check API in Microsoft Cognitive Services on Azure.
services: cognitive-services
documentationcenter: ''
author: v-jaswel
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 09/14/2017
ms.author: v-jaswel
---
Expand Down Expand Up @@ -218,7 +218,7 @@ A successful response is returned in JSON, as shown in the following example:
> [!div class="nextstepaction"]
> [Bing Spell Check tutorial](../tutorials/spellcheck.md)
## See also
## See also

[Bing Spell Check overview](../proof-text.md)
[API v7](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
- [Bing Spell Check overview](../proof-text.md)
- [Bing Spell Check API v7 Reference](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
12 changes: 6 additions & 6 deletions articles/cognitive-services/Bing-Spell-Check/quickstarts/java.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: Java Quickstart for Azure Cognitive Services, Bing Spell Check API | Microsoft Docs
title: Java Quickstart for Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get information and code samples to help you quickly get started using the Bing Spell Check API in Microsoft Cognitive Services on Azure.
services: cognitive-services
documentationcenter: ''
author: v-jaswel
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 09/14/2017
ms.author: v-jaswel
---
# Quickstart for Bing Spell Check API with Java
<a name="HOLTop"></a>

This article shows you how to use the [Bing Spell Check API](https://azure.microsoft.com/services/cognitive-services/spell-check/) with Java. The Spell Check API returns a list of words it does not recognize along with suggested replacements. Typically, you would submit text to this API and then either make the suggested replacements in the text or show them to the user of your application so they can decide whether to make the replacements. This article shows how to send a request that contains the text "Hollo, wrld!". The suggested replacements will be "Hello" and "world".
This article shows you how to use the [Bing Spell Check API](https://azure.microsoft.com/services/cognitive-services/spell-check/) with Java. The Spell Check API returns a list of words it does not recognize along with suggested replacements. Typically, you would submit text to this API and then either make the suggested replacements in the text or show them to the user of your application so they can decide whether to make the replacements. This article shows how to send a request that contains the text "Hollo, wrld!". The suggested replacements will be "Hello" and "world."

## Prerequisites

Expand Down Expand Up @@ -127,7 +127,7 @@ A successful response is returned in JSON, as shown in the following example:
> [!div class="nextstepaction"]
> [Bing Spell Check tutorial](../tutorials/spellcheck.md)
## See also
## See also

[Bing Spell Check overview](../proof-text.md)
[API v7](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
- [Bing Spell Check overview](../proof-text.md)
- [Bing Spell Check API v7 Reference](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: Node.JS Quickstart for Azure Cognitive Services, Bing Spell Check API | Microsoft Docs
title: Node.js Quickstart for Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get information and code samples to help you quickly get started using the Bing Spell Check API in Microsoft Cognitive Services on Azure.
services: cognitive-services
documentationcenter: ''
author: v-jaswel
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 09/14/2017
ms.author: v-jaswel
---
# Quickstart for Bing Spell Check API with Node.JS
# Quickstart for Bing Spell Check API with Node.js
<a name="HOLTop"></a>

This article shows you how to use the [Bing Spell Check API](https://azure.microsoft.com/services/cognitive-services/spell-check/) with Node.JS. The Spell Check API returns a list of words it does not recognize along with suggested replacements. Typically, you would submit text to this API and then either make the suggested replacements in the text or show them to the user of your application so they can decide whether to make the replacements. This article shows how to send a request that contains the text "Hollo, wrld!". The suggested replacements will be "Hello" and "world".
This article shows you how to use the [Bing Spell Check API](https://azure.microsoft.com/services/cognitive-services/spell-check/) with Node.js. The Spell Check API returns a list of words it does not recognize along with suggested replacements. Typically, you would submit text to this API and then either make the suggested replacements in the text or show them to the user of your application so they can decide whether to make the replacements. This article shows how to send a request that contains the text "Hollo, wrld!". The suggested replacements will be "Hello" and "world."

## Prerequisites

Expand All @@ -23,7 +23,7 @@ You must have a [Cognitive Services API account](https://docs.microsoft.com/azur

## Get Spell Check results

1. Create a new Node.JS project in your favorite IDE.
1. Create a new Node.js project in your favorite IDE.
2. Add the code provided below.
3. Replace the `subscriptionKey` value with an access key valid for your subscription.
4. Run the program.
Expand Down Expand Up @@ -128,7 +128,7 @@ A successful response is returned in JSON, as shown in the following example:
> [!div class="nextstepaction"]
> [Bing Spell Check tutorial](../tutorials/spellcheck.md)
## See also
## See also

[Bing Spell Check overview](../proof-text.md)
[API v7](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
- [Bing Spell Check overview](../proof-text.md)
- [Bing Spell Check API v7 Reference](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
10 changes: 5 additions & 5 deletions articles/cognitive-services/Bing-Spell-Check/quickstarts/php.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: PHP Quickstart for Azure Cognitive Services, Bing Spell Check API | Microsoft Docs
title: PHP Quickstart for Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get information and code samples to help you quickly get started using the Bing Spell Check API in Microsoft Cognitive Services on Azure.
services: cognitive-services
documentationcenter: ''
author: v-jaswel
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 09/14/2017
ms.author: v-jaswel
---
Expand Down Expand Up @@ -130,7 +130,7 @@ A successful response is returned in JSON, as shown in the following example:
> [!div class="nextstepaction"]
> [Bing Spell Check tutorial](../tutorials/spellcheck.md)
## See also
## See also

[Bing Spell Check overview](../proof-text.md)
[API v7](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
- [Bing Spell Check overview](../proof-text.md)
- [Bing Spell Check API v7 Reference](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Python Quickstart for Azure Cognitive Services, Bing Spell Check API | Microsoft Docs
title: Python Quickstart for Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get information and code samples to help you quickly get started using the Bing Spell Check API in Microsoft Cognitive Services on Azure.
services: cognitive-services
documentationcenter: ''
author: v-jaswel
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 09/14/2017
ms.author: v-jaswel
---
Expand Down Expand Up @@ -107,7 +107,7 @@ A successful response is returned in JSON, as shown in the following example:
> [!div class="nextstepaction"]
> [Bing Spell Check tutorial](../tutorials/spellcheck.md)
## See also
## See also

[Bing Spell Check overview](../proof-text.md)
[API v7](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
- [Bing Spell Check overview](../proof-text.md)
- [Bing Spell Check API v7 Reference](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
10 changes: 5 additions & 5 deletions articles/cognitive-services/Bing-Spell-Check/quickstarts/ruby.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Ruby Quickstart for Azure Cognitive Services, Bing Spell Check API | Microsoft Docs
title: Ruby Quickstart for Bing Spell Check API - Azure Cognitive Services | Microsoft Docs
description: Get information and code samples to help you quickly get started using the Bing Spell Check API in Microsoft Cognitive Services on Azure.
services: cognitive-services
documentationcenter: ''
author: v-jaswel
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 09/14/2017
ms.author: v-jaswel
---
Expand Down Expand Up @@ -115,7 +115,7 @@ A successful response is returned in JSON, as shown in the following example:
> [!div class="nextstepaction"]
> [Bing Spell Check tutorial](../tutorials/spellcheck.md)
## See also
## See also

[Bing Spell Check overview](../proof-text.md)
[API v7](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
- [Bing Spell Check overview](../proof-text.md)
- [Bing Spell Check API v7 Reference](https://docs.microsoft.com/rest/api/cognitiveservices/bing-spell-check-api-v7-reference)
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
---
title: Spell Check SDK C# quickstart | Microsoft Docs
title: Spell Check SDK C# quickstart - Azure Cognitive Services | Microsoft Docs
description: Setup for Spell Check SDK console application
titleSuffix: Azure cognitive services setup Spell check search SDK C# console application
services: cognitive-services
author: mikedodaro
manager: rosh
ms.service: cognitive-services
ms.component: bing-spell-check
ms.topic: article
ms.topic: quickstart
ms.date: 01/30/2018
ms.author: v-gedod
---
# Spell Check SDK C# Quickstart

# Spell Check SDK C# quickstart
The Bing Spell Check SDK contains the functionality of the REST API for spell check.
The Bing Spell Check SDK contains the functionality of the REST API for spell check.

## Application dependencies

To set up a console application using the Bing Spell Check SDK, browse to the `Manage NuGet Packages` option from the Solution Explorer in Visual Studio. Add the `Microsoft.Azure.CognitiveServices.SpellCheck` package.
To set up a console application using the Bing Spell Check SDK, browse to the `Manage NuGet Packages` option from the Solution Explorer in Visual Studio. Add the `Microsoft.Azure.CognitiveServices.SpellCheck` package.

Installing the [SpellCheck SDK package](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.SpellCheck/1.2.0) also installs dependencies, including:

* Microsoft.Rest.ClientRuntime
* Microsoft.Rest.ClientRuntime.AZure
* Newtonsoft.Json

## Spell check client

To create an instance of the `SpellCheckAPI` client, add using directive:
```
using Microsoft.Azure.CognitiveServices.SpellCheck;

```cs
using Microsoft.Azure.CognitiveServices.SpellCheck;
```

Then, instantiate the client:
```
var client = new SpellCheckAPI(new ApiKeyServiceClientCredentials("YOUR-ACCESS-KEY"));

```cs
var client = new SpellCheckAPI(new ApiKeyServiceClientCredentials("YOUR-ACCESS-KEY"));
```

Use the client to check spelling:
```

```cs
var result = client.SpellCheckerWithHttpMessagesAsync(text: "Bill Gatas", mode: "proof").Result;
Console.WriteLine("Correction for Query# \"bill gatas\"");
```

Parse the results:
```

```cs
// SpellCheck Results
if (result?.Body.FlaggedTokens?.Count > 0)
{
Expand Down Expand Up @@ -74,12 +79,13 @@ if (result?.Body.FlaggedTokens?.Count > 0)
{
Console.WriteLine("Didn't see any SpellCheck results..");
}
```

## Complete console application

The following console application executes the previous code:
```

```cs
using System;
using System.Linq;
using Microsoft.Azure.CognitiveServices.SpellCheck;
Expand Down Expand Up @@ -137,7 +143,7 @@ namespace SpellCheckSDK
Console.WriteLine("Any key to exit...");
Console.ReadKey();
}

// This will trigger an error response from the API.
public static void SpellCheckError(string subscriptionKey)
{
Expand Down

0 comments on commit 2984bce

Please sign in to comment.