Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit 1038659

Browse files
ProjectOxfordProject Oxford SDK
authored andcommitted
Microsoft Cognitive Services SDK Release - April 2016
1 parent 327b37f commit 1038659

36 files changed

+5594
-5406
lines changed

Emotion/Android/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,7 @@ requires two different subscriptions.
6161
string from the first step. If you cannot find the file "strings.xml", it is
6262
in folder "Sample\app\src\main\res\values\string.xml".
6363

64-
4. In Android Studio -\> "Project" panel -\> "Android" view, open file
65-
"app/res/values/strings.xml", and find the line
66-
"Please\_add\_the\_face\_subscription\_key\_here;". Replace the
67-
"Please\_add\_the\_face\_subscription\_key\_here" value with your Face subscription key
68-
string from the first step. If you cannot find the file "strings.xml", it is
69-
in folder "Sample\app\src\main\res\values\string.xml".
70-
71-
5. In Android Studio, select menu "Build \> Make Project" to build the sample,
64+
4. In Android Studio, select menu "Build \> Make Project" to build the sample,
7265
and "Run" to launch this sample app.
7366

7467
<img src="SampleScreenshots/SampleRunning1.png" width="30%"/>

Emotion/Python/Jupyter Notebook/Emotion Analysis Example.ipynb

Lines changed: 118 additions & 69 deletions
Large diffs are not rendered by default.

Face/Python/Jupyter Notebook/Face Detection Example.ipynb

Lines changed: 130 additions & 73 deletions
Large diffs are not rendered by default.
Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
//
2-
// MIT License:
3-
// Permission is hereby granted, free of charge, to any person obtaining
4-
// a copy of this software and associated documentation files (the
5-
// "Software"), to deal in the Software without restriction, including
6-
// without limitation the rights to use, copy, modify, merge, publish,
7-
// distribute, sublicense, and/or sell copies of the Software, and to
8-
// permit persons to whom the Software is furnished to do so, subject to
9-
// the following conditions:
10-
//
11-
// The above copyright notice and this permission notice shall be
12-
// included in all copies or substantial portions of the Software.
13-
//
14-
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
15-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17-
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18-
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19-
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20-
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21-
//
22-
23-
using System;
24-
using System.Net;
25-
26-
namespace Microsoft.ProjectOxford.Linguistics
27-
{
28-
/// <summary>
29-
/// The Exception will be shown to client.
30-
/// </summary>
31-
public class ClientException : Exception
32-
{
33-
/// <summary>
34-
/// Initializes a new instance of the <see cref="ClientException"/> class.
35-
/// </summary>
36-
/// <param name="error">The error entity.</param>
37-
/// <param name="httpStatus">The http status.</param>
38-
public ClientException(ClientError error, HttpStatusCode httpStatus)
39-
{
40-
this.Error = error;
41-
this.HttpStatus = httpStatus;
42-
}
43-
44-
/// <summary>
45-
/// Gets http status of http response.
46-
/// </summary>
47-
/// <value>
48-
/// The HTTP status.
49-
/// </value>
50-
public HttpStatusCode HttpStatus { get; private set; }
51-
52-
/// <summary>
53-
/// Gets or sets the httpError message.
54-
/// </summary>
55-
/// <value>
56-
/// The error.
57-
/// </value>
58-
public ClientError Error { get; set; }
59-
}
1+
//
2+
// MIT License:
3+
// Permission is hereby granted, free of charge, to any person obtaining
4+
// a copy of this software and associated documentation files (the
5+
// "Software"), to deal in the Software without restriction, including
6+
// without limitation the rights to use, copy, modify, merge, publish,
7+
// distribute, sublicense, and/or sell copies of the Software, and to
8+
// permit persons to whom the Software is furnished to do so, subject to
9+
// the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be
12+
// included in all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
15+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
//
22+
23+
using System;
24+
using System.Net;
25+
26+
namespace Microsoft.ProjectOxford.Linguistics
27+
{
28+
/// <summary>
29+
/// The Exception will be shown to client.
30+
/// </summary>
31+
public class ClientException : Exception
32+
{
33+
/// <summary>
34+
/// Initializes a new instance of the <see cref="ClientException"/> class.
35+
/// </summary>
36+
/// <param name="error">The error entity.</param>
37+
/// <param name="httpStatus">The http status.</param>
38+
public ClientException(ClientError error, HttpStatusCode httpStatus)
39+
{
40+
this.Error = error;
41+
this.HttpStatus = httpStatus;
42+
}
43+
44+
/// <summary>
45+
/// Gets http status of http response.
46+
/// </summary>
47+
/// <value>
48+
/// The HTTP status.
49+
/// </value>
50+
public HttpStatusCode HttpStatus { get; private set; }
51+
52+
/// <summary>
53+
/// Gets or sets the httpError message.
54+
/// </summary>
55+
/// <value>
56+
/// The error.
57+
/// </value>
58+
public ClientError Error { get; set; }
59+
}
6060
}
Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
//
2-
// MIT License:
3-
// Permission is hereby granted, free of charge, to any person obtaining
4-
// a copy of this software and associated documentation files (the
5-
// "Software"), to deal in the Software without restriction, including
6-
// without limitation the rights to use, copy, modify, merge, publish,
7-
// distribute, sublicense, and/or sell copies of the Software, and to
8-
// permit persons to whom the Software is furnished to do so, subject to
9-
// the following conditions:
10-
//
11-
// The above copyright notice and this permission notice shall be
12-
// included in all copies or substantial portions of the Software.
13-
//
14-
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
15-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17-
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18-
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19-
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20-
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21-
//
22-
23-
using System;
24-
25-
namespace Microsoft.ProjectOxford.Linguistics.Contract
26-
{
27-
/// <summary>
28-
/// Represents a single batch of text input to the service for analysis
29-
/// </summary>
30-
public class AnalyzeTextRequest
31-
{
32-
/// <summary>
33-
/// Two letter ISO language code, e.g. "en" for "English"
34-
/// </summary>
35-
public string Language { get; set; }
36-
37-
/// <summary>
38-
/// List of IDs of the analyers to be used on the given input text; see Analyzer for more information.
39-
/// </summary>
40-
public Guid[] AnalyzerIds { get; set; }
41-
42-
/// <summary>
43-
/// The raw input text to be analyzed.
44-
/// </summary>
45-
public string Text { get; set; }
46-
}
1+
//
2+
// MIT License:
3+
// Permission is hereby granted, free of charge, to any person obtaining
4+
// a copy of this software and associated documentation files (the
5+
// "Software"), to deal in the Software without restriction, including
6+
// without limitation the rights to use, copy, modify, merge, publish,
7+
// distribute, sublicense, and/or sell copies of the Software, and to
8+
// permit persons to whom the Software is furnished to do so, subject to
9+
// the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be
12+
// included in all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
15+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
//
22+
23+
using System;
24+
25+
namespace Microsoft.ProjectOxford.Linguistics.Contract
26+
{
27+
/// <summary>
28+
/// Represents a single batch of text input to the service for analysis
29+
/// </summary>
30+
public class AnalyzeTextRequest
31+
{
32+
/// <summary>
33+
/// Two letter ISO language code, e.g. "en" for "English"
34+
/// </summary>
35+
public string Language { get; set; }
36+
37+
/// <summary>
38+
/// List of IDs of the analyers to be used on the given input text; see Analyzer for more information.
39+
/// </summary>
40+
public Guid[] AnalyzerIds { get; set; }
41+
42+
/// <summary>
43+
/// The raw input text to be analyzed.
44+
/// </summary>
45+
public string Text { get; set; }
46+
}
4747
}
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
//
2-
// MIT License:
3-
// Permission is hereby granted, free of charge, to any person obtaining
4-
// a copy of this software and associated documentation files (the
5-
// "Software"), to deal in the Software without restriction, including
6-
// without limitation the rights to use, copy, modify, merge, publish,
7-
// distribute, sublicense, and/or sell copies of the Software, and to
8-
// permit persons to whom the Software is furnished to do so, subject to
9-
// the following conditions:
10-
//
11-
// The above copyright notice and this permission notice shall be
12-
// included in all copies or substantial portions of the Software.
13-
//
14-
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
15-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17-
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18-
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19-
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20-
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21-
//
22-
23-
using System;
24-
25-
namespace Microsoft.ProjectOxford.Linguistics.Contract
26-
{
27-
/// <summary>
28-
/// This is the result of analysis from one analyzer.
29-
/// </summary>
30-
public class AnalyzeTextResult
31-
{
32-
/// <summary>
33-
/// The unique ID of the analyzer; see Analyzer for more information.
34-
/// </summary>
35-
public Guid AnalyzerId { get; set; }
36-
37-
/// <summary>
38-
/// The resulting analysis, encoded as JSON. See the documentation for the relevant analyzer kind for more information on formatting.
39-
/// </summary>
40-
public string Result { get; set; }
41-
}
1+
//
2+
// MIT License:
3+
// Permission is hereby granted, free of charge, to any person obtaining
4+
// a copy of this software and associated documentation files (the
5+
// "Software"), to deal in the Software without restriction, including
6+
// without limitation the rights to use, copy, modify, merge, publish,
7+
// distribute, sublicense, and/or sell copies of the Software, and to
8+
// permit persons to whom the Software is furnished to do so, subject to
9+
// the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be
12+
// included in all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
15+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
//
22+
23+
using System;
24+
25+
namespace Microsoft.ProjectOxford.Linguistics.Contract
26+
{
27+
/// <summary>
28+
/// This is the result of analysis from one analyzer.
29+
/// </summary>
30+
public class AnalyzeTextResult
31+
{
32+
/// <summary>
33+
/// The unique ID of the analyzer; see Analyzer for more information.
34+
/// </summary>
35+
public Guid AnalyzerId { get; set; }
36+
37+
/// <summary>
38+
/// The resulting analysis, encoded as JSON. See the documentation for the relevant analyzer kind for more information on formatting.
39+
/// </summary>
40+
public string Result { get; set; }
41+
}
4242
}

0 commit comments

Comments
 (0)