Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions lib/services/cognitiveServicesTextAnalytics/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft

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.
The MIT License (MIT)
Copyright (c) 2019 Microsoft
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.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
class DetectedLanguage {
/**
* Create a DetectedLanguage.
* @member {string} [name] Long name of a detected language (e.g. English,
* @property {string} [name] Long name of a detected language (e.g. English,
* French).
* @member {string} [iso6391Name] A two letter representation of the detected
* language according to the ISO 639-1 standard (e.g. en, fr).
* @member {number} [score] A confidence score between 0 and 1. Scores close
* to 1 indicate 100% certainty that the identified language is true.
* @property {string} [iso6391Name] A two letter representation of the
* detected language according to the ISO 639-1 standard (e.g. en, fr).
* @property {number} [score] A confidence score between 0 and 1. Scores
* close to 1 indicate 100% certainty that the identified language is true.
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Class representing a DocumentStatistics.
*/
class DocumentStatistics {
/**
* Create a DocumentStatistics.
* @property {number} [charactersCount] Number of text elements recognized in
* the document.
* @property {number} [transactionsCount] Number of transactions for the
* document.
*/
constructor() {
}

/**
* Defines the metadata of DocumentStatistics
*
* @returns {object} metadata of DocumentStatistics
*
*/
mapper() {
return {
required: false,
serializedName: 'DocumentStatistics',
type: {
name: 'Composite',
className: 'DocumentStatistics',
modelProperties: {
charactersCount: {
required: false,
serializedName: 'charactersCount',
type: {
name: 'Number'
}
},
transactionsCount: {
required: false,
serializedName: 'transactionsCount',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = DocumentStatistics;
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,21 @@
class EntitiesBatchResult {
/**
* Create a EntitiesBatchResult.
* @member {array} [documents]
* @member {array} [errors]
* @property {array} [documents] Response by document
* @property {array} [errors] Errors and Warnings by document
* @property {object} [statistics] (Optional) if showStats=true was specified
* in the request this field will contain information about the request
* payload.
* @property {number} [statistics.documentsCount] Number of documents
* submitted in the request.
* @property {number} [statistics.validDocumentsCount] Number of valid
* documents. This excludes empty, over-size limit or non-supported languages
* documents.
* @property {number} [statistics.erroneousDocumentsCount] Number of invalid
* documents. This includes empty, over-size limit or non-supported languages
* documents.
* @property {number} [statistics.transactionsCount] Number of transactions
* for the request.
*/
constructor() {
}
Expand Down Expand Up @@ -67,6 +80,15 @@ class EntitiesBatchResult {
}
}
}
},
statistics: {
required: false,
readOnly: true,
serializedName: 'statistics',
type: {
name: 'Composite',
className: 'RequestStatistics'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
class EntitiesBatchResultItem {
/**
* Create a EntitiesBatchResultItem.
* @member {string} [id] Unique document identifier.
* @member {array} [entities] Recognized entities in the document.
* @property {string} [id] Unique, non-empty document identifier.
* @property {array} [entities] Recognized entities in the document.
* @property {object} [statistics] (Optional) if showStats=true was specified
* in the request this field will contain information about the document
* payload.
* @property {number} [statistics.charactersCount] Number of text elements
* recognized in the document.
* @property {number} [statistics.transactionsCount] Number of transactions
* for the document.
*/
constructor() {
}
Expand All @@ -38,7 +45,6 @@ class EntitiesBatchResultItem {
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
Expand All @@ -59,6 +65,14 @@ class EntitiesBatchResultItem {
}
}
}
},
statistics: {
required: false,
serializedName: 'statistics',
type: {
name: 'Composite',
className: 'DocumentStatistics'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@
class EntityRecord {
/**
* Create a EntityRecord.
* @member {string} [name] Entity formal name.
* @member {array} [matches] List of instances this entity appears in the
* @property {string} [name] Entity formal name.
* @property {array} [matches] List of instances this entity appears in the
* text.
* @member {string} [wikipediaLanguage] Wikipedia language for which the
* @property {string} [wikipediaLanguage] Wikipedia language for which the
* WikipediaId and WikipediaUrl refers to.
* @member {string} [wikipediaId] Wikipedia unique identifier of the
* @property {string} [wikipediaId] Wikipedia unique identifier of the
* recognized entity.
* @member {string} [wikipediaUrl] URL for the entity's English Wikipedia
* page.
* @member {string} [bingId] Bing unique identifier of the recognized entity.
* Use in conjunction with the Bing Entity Search API to fetch additional
* relevant information.
* @property {string} [wikipediaUrl] URL for the entity's Wikipedia page.
* @property {string} [bingId] Bing unique identifier of the recognized
* entity. Use in conjunction with the Bing Entity Search API to fetch
* additional relevant information.
* @property {string} [type] Entity type from Named Entity Recognition model
* @property {string} [subType] Entity sub type from Named Entity Recognition
* model
*/
constructor() {
}
Expand Down Expand Up @@ -55,7 +57,6 @@ class EntityRecord {
},
matches: {
required: false,
readOnly: true,
serializedName: 'matches',
type: {
name: 'Sequence',
Expand Down Expand Up @@ -97,6 +98,20 @@ class EntityRecord {
type: {
name: 'String'
}
},
type: {
required: false,
serializedName: 'type',
type: {
name: 'String'
}
},
subType: {
required: false,
serializedName: 'subType',
type: {
name: 'String'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
class ErrorRecord {
/**
* Create a ErrorRecord.
* @member {string} [id] Input document unique identifier the error refers
* @property {string} [id] Input document unique identifier the error refers
* to.
* @member {string} [message] Error message.
* @property {string} [message] Error message.
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
class ErrorResponse {
/**
* Create a ErrorResponse.
* @member {string} [code]
* @member {string} [message]
* @member {string} [target]
* @member {object} [innerError]
* @member {string} [innerError.code]
* @member {string} [innerError.message]
* @member {object} [innerError.innerError]
* @property {string} [code]
* @property {string} [message]
* @property {string} [target]
* @property {object} [innerError]
* @property {string} [innerError.code]
* @property {string} [innerError.message]
* @property {object} [innerError.innerError]
*/
constructor() {
}
Expand Down
Loading