Skip to content

Commit

Permalink
Microsoft Cognitive Services SDK Release - April 2016
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectOxford authored and Project Oxford SDK committed Apr 9, 2016
1 parent 327b37f commit 1038659
Show file tree
Hide file tree
Showing 36 changed files with 5,594 additions and 5,406 deletions.
9 changes: 1 addition & 8 deletions Emotion/Android/README.md
Expand Up @@ -61,14 +61,7 @@ requires two different subscriptions.
string from the first step. If you cannot find the file "strings.xml", it is
in folder "Sample\app\src\main\res\values\string.xml".

4. In Android Studio -\> "Project" panel -\> "Android" view, open file
"app/res/values/strings.xml", and find the line
"Please\_add\_the\_face\_subscription\_key\_here;". Replace the
"Please\_add\_the\_face\_subscription\_key\_here" value with your Face subscription key
string from the first step. If you cannot find the file "strings.xml", it is
in folder "Sample\app\src\main\res\values\string.xml".

5. In Android Studio, select menu "Build \> Make Project" to build the sample,
4. In Android Studio, select menu "Build \> Make Project" to build the sample,
and "Run" to launch this sample app.

<img src="SampleScreenshots/SampleRunning1.png" width="30%"/>
Expand Down
187 changes: 118 additions & 69 deletions Emotion/Python/Jupyter Notebook/Emotion Analysis Example.ipynb

Large diffs are not rendered by default.

203 changes: 130 additions & 73 deletions Face/Python/Jupyter Notebook/Face Detection Example.ipynb

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions LinguisticAnalysis/Windows/ClientLibrary/ClientException.cs
@@ -1,60 +1,60 @@
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Net;

namespace Microsoft.ProjectOxford.Linguistics
{
/// <summary>
/// The Exception will be shown to client.
/// </summary>
public class ClientException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="ClientException"/> class.
/// </summary>
/// <param name="error">The error entity.</param>
/// <param name="httpStatus">The http status.</param>
public ClientException(ClientError error, HttpStatusCode httpStatus)
{
this.Error = error;
this.HttpStatus = httpStatus;
}

/// <summary>
/// Gets http status of http response.
/// </summary>
/// <value>
/// The HTTP status.
/// </value>
public HttpStatusCode HttpStatus { get; private set; }

/// <summary>
/// Gets or sets the httpError message.
/// </summary>
/// <value>
/// The error.
/// </value>
public ClientError Error { get; set; }
}
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Net;

namespace Microsoft.ProjectOxford.Linguistics
{
/// <summary>
/// The Exception will be shown to client.
/// </summary>
public class ClientException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="ClientException"/> class.
/// </summary>
/// <param name="error">The error entity.</param>
/// <param name="httpStatus">The http status.</param>
public ClientException(ClientError error, HttpStatusCode httpStatus)
{
this.Error = error;
this.HttpStatus = httpStatus;
}

/// <summary>
/// Gets http status of http response.
/// </summary>
/// <value>
/// The HTTP status.
/// </value>
public HttpStatusCode HttpStatus { get; private set; }

/// <summary>
/// Gets or sets the httpError message.
/// </summary>
/// <value>
/// The error.
/// </value>
public ClientError Error { get; set; }
}
}
@@ -1,47 +1,47 @@
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;

namespace Microsoft.ProjectOxford.Linguistics.Contract
{
/// <summary>
/// Represents a single batch of text input to the service for analysis
/// </summary>
public class AnalyzeTextRequest
{
/// <summary>
/// Two letter ISO language code, e.g. "en" for "English"
/// </summary>
public string Language { get; set; }

/// <summary>
/// List of IDs of the analyers to be used on the given input text; see Analyzer for more information.
/// </summary>
public Guid[] AnalyzerIds { get; set; }

/// <summary>
/// The raw input text to be analyzed.
/// </summary>
public string Text { get; set; }
}
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;

namespace Microsoft.ProjectOxford.Linguistics.Contract
{
/// <summary>
/// Represents a single batch of text input to the service for analysis
/// </summary>
public class AnalyzeTextRequest
{
/// <summary>
/// Two letter ISO language code, e.g. "en" for "English"
/// </summary>
public string Language { get; set; }

/// <summary>
/// List of IDs of the analyers to be used on the given input text; see Analyzer for more information.
/// </summary>
public Guid[] AnalyzerIds { get; set; }

/// <summary>
/// The raw input text to be analyzed.
/// </summary>
public string Text { get; set; }
}
}
@@ -1,42 +1,42 @@
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;

namespace Microsoft.ProjectOxford.Linguistics.Contract
{
/// <summary>
/// This is the result of analysis from one analyzer.
/// </summary>
public class AnalyzeTextResult
{
/// <summary>
/// The unique ID of the analyzer; see Analyzer for more information.
/// </summary>
public Guid AnalyzerId { get; set; }

/// <summary>
/// The resulting analysis, encoded as JSON. See the documentation for the relevant analyzer kind for more information on formatting.
/// </summary>
public string Result { get; set; }
}
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;

namespace Microsoft.ProjectOxford.Linguistics.Contract
{
/// <summary>
/// This is the result of analysis from one analyzer.
/// </summary>
public class AnalyzeTextResult
{
/// <summary>
/// The unique ID of the analyzer; see Analyzer for more information.
/// </summary>
public Guid AnalyzerId { get; set; }

/// <summary>
/// The resulting analysis, encoded as JSON. See the documentation for the relevant analyzer kind for more information on formatting.
/// </summary>
public string Result { get; set; }
}
}

0 comments on commit 1038659

Please sign in to comment.