import { AzureKeyCredential } from '@azure/core-auth'; import { CommonClientOptions } from '@azure/core-client'; import { KeyCredential } from '@azure/core-auth'; import { OperationOptions } from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; import { TokenCredential } from '@azure/core-auth'; /** * An interface representing the state of an analysis poller operation. */ export declare interface AnalysisPollOperationState extends PollOperationState, OperationMetadata { } /** * The metadata for beginAnalyzeActions operations. */ export declare interface AnalyzeActionsOperationMetadata extends OperationMetadata { /** * Number of successfully completed actions. */ actionsSucceededCount: number; /** * Number of failed actions. */ actionsFailedCount: number; /** * Number of actions still in progress. */ actionsInProgressCount: number; /** * The operation's display name. */ displayName?: string; } /** * The state of the begin analyze polling operation. */ export declare interface AnalyzeActionsOperationState extends AnalysisPollOperationState, AnalyzeActionsOperationMetadata { } /** * Result type of the Begin Analyze Actions Long-Running-Operation (LRO). */ export declare type AnalyzeActionsPollerLike = PollerLike; /** * The results of an analyze Actions operation. */ export declare interface AnalyzeActionsResult { /** * Array of the results for each categorized entities recognition action. */ recognizeEntitiesResults: RecognizeCategorizedEntitiesActionResult[]; /** * Array of the results for each Pii entities recognition action. */ recognizePiiEntitiesResults: RecognizePiiEntitiesActionResult[]; /** * Array of the results for each key phrases extraction action. */ extractKeyPhrasesResults: ExtractKeyPhrasesActionResult[]; /** * Array of the results for each linked entities recognition action. */ recognizeLinkedEntitiesResults: RecognizeLinkedEntitiesActionResult[]; /** * Array of the results for each analyze sentiment action. */ analyzeSentimentResults: AnalyzeSentimentActionResult[]; } /** * An error result from the healthcare operation on a single document. */ export declare type AnalyzeHealthcareEntitiesErrorResult = TextAnalyticsErrorResult; /** * Result type of the Health Long-Running-Operation (LRO) */ export declare type AnalyzeHealthcareEntitiesPollerLike = PollerLike; /** * The result of the healthcare operation on a single document. */ export declare type AnalyzeHealthcareEntitiesResult = AnalyzeHealthcareEntitiesSuccessResult | AnalyzeHealthcareEntitiesErrorResult; /** * Array of {@link AnalyzeHealthcareEntitiesResult} */ export declare interface AnalyzeHealthcareEntitiesResultArray extends Array { } /** * The results of a successful healthcare operation for a single document. */ export declare interface AnalyzeHealthcareEntitiesSuccessResult extends TextAnalyticsSuccessResult { /** * Healthcare entities. */ entities: HealthcareEntity[]; /** * Relations between healthcare entities. */ entityRelations: HealthcareEntityRelation[]; } /** * The state of the begin analyze healthcare polling operation. */ export declare interface AnalyzeHealthcareOperationState extends AnalysisPollOperationState { } /** * Options for an analyze sentiment action. */ export declare interface AnalyzeSentimentAction extends TextAnalyticsAction { /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; /** * If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics * logs your input text for 48 hours, solely to allow for troubleshooting issues. Setting this parameter to true, * disables input logging and may limit our ability to remediate issues that occur. */ disableServiceLogs?: boolean; /** * Whether to mine the opinions of a sentence and conduct more granular * analysis around the aspects of a product or service (also known as * aspect-based sentiment analysis). If set to true, the returned * `SentenceSentiment` objects will have property `opinions` containing * the result of this analysis. * More information about the feature can be found here: {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis?tabs=version-3-1#opinion-mining} */ includeOpinionMining?: boolean; } /** * The error of an analyze sentiment action. */ export declare type AnalyzeSentimentActionErrorResult = TextAnalyticsActionErrorResult; /** * The result of an analyze sentiment action. */ export declare type AnalyzeSentimentActionResult = AnalyzeSentimentActionSuccessResult | AnalyzeSentimentActionErrorResult; /** * The results of a succeeded analyze sentiment action. */ export declare interface AnalyzeSentimentActionSuccessResult extends TextAnalyticsActionSuccessState { /** * Array of the results for each analyze sentiment action. */ results: AnalyzeSentimentResultArray; } /** * An error result from the analyze sentiment operation on a single document. */ export declare type AnalyzeSentimentErrorResult = TextAnalyticsErrorResult; /** * Options for the analyze sentiment operation. */ export declare interface AnalyzeSentimentOptions extends TextAnalyticsOperationOptions { /** * Whether to mine the opinions of a sentence and conduct more granular * analysis around the aspects of a product or service (also known as * aspect-based sentiment analysis). If set to true, the returned * `SentenceSentiment` objects will have property `opinions` containing * the result of this analysis. * More information about the feature can be found here: {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis?tabs=version-3-1#opinion-mining} */ includeOpinionMining?: boolean; /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** * The result of the analyze sentiment operation on a single document. */ export declare type AnalyzeSentimentResult = AnalyzeSentimentSuccessResult | AnalyzeSentimentErrorResult; /** * Array of `AnalyzeSentimentResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ export declare interface AnalyzeSentimentResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The result of the analyze sentiment operation on a single document, * containing the predicted sentiment for each sentence as well as for the full document. */ export declare interface AnalyzeSentimentSuccessResult extends TextAnalyticsSuccessResult { /** * Predicted sentiment for document. Possible values * include: 'positive', 'neutral', 'negative', 'mixed' */ sentiment: DocumentSentimentLabel; /** * Document level sentiment confidence scores between 0 and 1 for each sentiment class. */ confidenceScores: SentimentConfidenceScores; /** * The predicted sentiment for each sentence in the corresponding document. */ sentences: SentenceSentiment[]; } /** * AssessmentSentiment contains the predicted sentiment, confidence scores and * other information about an assessment of a target. For example, in the sentence * "The food is good", the assessment of the target 'food' is 'good'. */ export declare interface AssessmentSentiment extends SentenceAssessment { } export { AzureKeyCredential } /** * Options for the begin analyze actions operation. */ export declare interface BeginAnalyzeActionsOptions extends OperationOptions { /** * Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** * A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ resumeFrom?: string; /** * If set to true, response will contain input and document level statistics. */ includeStatistics?: boolean; /** * The operation's display name. */ displayName?: string; } /** * Options for the begin analyze healthcare entities operation. */ export declare interface BeginAnalyzeHealthcareEntitiesOptions extends TextAnalyticsOperationOptions { /** * Delay to wait until next poll, in milliseconds. */ stringIndexType?: StringIndexType; /** * Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** * A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ resumeFrom?: string; } /** * An entity from text analysis with information about its categorical * classification. */ export declare interface CategorizedEntity extends Entity { } /** Information about the language of a document as identified by the Text Analytics service. */ export declare interface DetectedLanguage { /** Long name of a detected language (e.g. English, French). */ name: string; /** A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). */ iso6391Name: string; /** A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. */ confidenceScore: number; } /** * An error result from the detect languge operation on a single document. */ export declare type DetectLanguageErrorResult = TextAnalyticsErrorResult; /** An input to the language detection operation. This object specifies a unique document id, as well as the full text of a document and a hint indicating the document's country of origin to assist the text analytics predictive model in detecting the document's language. */ export declare interface DetectLanguageInput { /** Unique, non-empty document identifier. */ id: string; text: string; countryHint?: string; } /** * Options for the detect languages operation. */ export declare interface DetectLanguageOptions extends TextAnalyticsOperationOptions { } /** * The result of the detect language operation on a single document. */ export declare type DetectLanguageResult = DetectLanguageSuccessResult | DetectLanguageErrorResult; /** * Array of `DetectLanguageResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ export declare interface DetectLanguageResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The result of the detect language operation on a single document, * containing a prediction of what language the document is written in. */ export declare interface DetectLanguageSuccessResult extends TextAnalyticsSuccessResult { /** * The top detected language by confidence score. */ readonly primaryLanguage: DetectedLanguage; } /** Defines values for DocumentSentimentLabel. */ export declare type DocumentSentimentLabel = "positive" | "neutral" | "negative" | "mixed"; /** A word or phrase identified as an entity that is categorized within a taxonomy of types. The set of categories recognized by the Text Analytics service is described at https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types . */ export declare interface Entity { /** Entity text as appears in the request. */ text: string; /** Entity type. */ category: string; /** (Optional) Entity sub type. */ subCategory?: string; /** Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. */ offset: number; /** Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. */ length: number; /** Confidence score between 0 and 1 of the extracted entity. */ confidenceScore: number; } export declare interface EntityAssertion { /** Describes any conditionality on the entity. */ conditionality?: EntityConditionality; /** Describes the entities certainty and polarity. */ certainty?: EntityCertainty; /** Describes if the entity is the subject of the text or if it describes someone else. */ association?: EntityAssociation; } /** Defines values for Association. */ export declare type EntityAssociation = "subject" | "other"; /** Defines values for Certainty. */ export declare type EntityCertainty = "positive" | "positivePossible" | "neutralPossible" | "negativePossible" | "negative"; /** Defines values for Conditionality. */ export declare type EntityConditionality = "hypothetical" | "conditional"; /** * A type representing a reference for the healthcare entity into a specific * entity catalog. */ export declare interface EntityDataSource { /** * Entity Catalog. Examples include: UMLS, CHV, MSH, etc. */ name: string; /** * Entity id in the given source catalog. */ entityId: string; } /** * An Error Code returned from the Text Analytics service. Possible * values include: * * For more information about the error, see the `message` property of the associated error. */ export declare type ErrorCode = ErrorCodeValue | InnerErrorCodeValue; /** * Defines values for ErrorCodeValue. \ * {@link KnownErrorCodeValue} can be used interchangeably with ErrorCodeValue, * this enum contains the known values that the service supports. * ### Known values supported by the service * **InvalidRequest** \ * **InvalidArgument** \ * **InternalServerError** \ * **ServiceUnavailable** \ * **NotFound** */ export declare type ErrorCodeValue = string; /** * Options for a key phrases recognition action. */ export declare interface ExtractKeyPhrasesAction extends TextAnalyticsAction { /** * If set to false, you opt-in to have your text input logged for troubleshooting. By default, Text Analytics * will not log your input text for pii entities recognition. Setting this parameter to false, * enables input logging. */ disableServiceLogs?: boolean; } /** * The error of a extract key phrases action. */ export declare type ExtractKeyPhrasesActionErrorResult = TextAnalyticsActionErrorResult; /** * The result of a extract key phrases action. */ export declare type ExtractKeyPhrasesActionResult = ExtractKeyPhrasesActionSuccessResult | ExtractKeyPhrasesActionErrorResult; /** * The results of a succeeded extract key phrases action. */ export declare interface ExtractKeyPhrasesActionSuccessResult extends TextAnalyticsActionSuccessState { /** * Array of the results for each extract key phrases action. */ results: ExtractKeyPhrasesResultArray; } /** * An error result from the extract key phrases operation on a single document. */ export declare type ExtractKeyPhrasesErrorResult = TextAnalyticsErrorResult; /** * Options for the extract key phrases operation. */ export declare interface ExtractKeyPhrasesOptions extends TextAnalyticsOperationOptions { } /** * The result of the extract key phrases operation on a single document. */ export declare type ExtractKeyPhrasesResult = ExtractKeyPhrasesSuccessResult | ExtractKeyPhrasesErrorResult; /** * Array of `ExtractKeyPhrasesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ export declare interface ExtractKeyPhrasesResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The result of the extract key phrases operation on a single document, * containing a collection of the key phrases identified in that document. */ export declare interface ExtractKeyPhrasesSuccessResult extends TextAnalyticsSuccessResult { /** * A list of representative words or phrases. The number of key phrases returned is proportional * to the number of words in the input document. */ keyPhrases: string[]; } /** * A healthcare entity represented as a node in a directed graph where the edges are * a particular type of relationship between the source and target nodes. */ export declare interface HealthcareEntity extends Entity { /** * Normalized name for the entity. For example, the normalized text for "histologically" is "histologic". */ normalizedText?: string; /** * Whether the entity is negated. */ assertion?: EntityAssertion; /** * Entity references in known data sources. */ dataSources: EntityDataSource[]; /** * Defines values for HealthcareEntityCategory. * {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory, * this enum contains the known values that the service supports. * ### Known values supported by the service * **BODY_STRUCTURE** * **AGE** * **GENDER** * **EXAMINATION_NAME** * **DATE** * **DIRECTION** * **FREQUENCY** * **MEASUREMENT_VALUE** * **MEASUREMENT_UNIT** * **RELATIONAL_OPERATOR** * **TIME** * **GENE_OR_PROTEIN** * **VARIANT** * **ADMINISTRATIVE_EVENT** * **CARE_ENVIRONMENT** * **HEALTHCARE_PROFESSION** * **DIAGNOSIS** * **SYMPTOM_OR_SIGN** * **CONDITION_QUALIFIER** * **MEDICATION_CLASS** * **MEDICATION_NAME** * **DOSAGE** * **MEDICATION_FORM** * **MEDICATION_ROUTE** * **FAMILY_RELATION** * **TREATMENT_NAME** */ category: HealthcareEntityCategory; } /** * Defines values for HealthcareEntityCategory. \ * {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory, * this enum contains the known values that the service supports. * ### Known values supported by the service * **BODY_STRUCTURE** \ * **AGE** \ * **GENDER** \ * **EXAMINATION_NAME** \ * **DATE** \ * **DIRECTION** \ * **FREQUENCY** \ * **MEASUREMENT_VALUE** \ * **MEASUREMENT_UNIT** \ * **RELATIONAL_OPERATOR** \ * **TIME** \ * **GENE_OR_PROTEIN** \ * **VARIANT** \ * **ADMINISTRATIVE_EVENT** \ * **CARE_ENVIRONMENT** \ * **HEALTHCARE_PROFESSION** \ * **DIAGNOSIS** \ * **SYMPTOM_OR_SIGN** \ * **CONDITION_QUALIFIER** \ * **MEDICATION_CLASS** \ * **MEDICATION_NAME** \ * **DOSAGE** \ * **MEDICATION_FORM** \ * **MEDICATION_ROUTE** \ * **FAMILY_RELATION** \ * **TREATMENT_NAME** */ export declare type HealthcareEntityCategory = string; /** * A relationship between two or more healthcare entities. */ export declare interface HealthcareEntityRelation { /** * The type of the healthcare relation. */ relationType: HealthcareEntityRelationType; /** * The list of healthcare entities and their roles in the healthcare relation. */ roles: HealthcareEntityRelationRole[]; } /** * A healthcare entity that plays a specific role in a relation. */ export declare interface HealthcareEntityRelationRole { /** * A healthcare entity */ entity: HealthcareEntity; /** * The role of the healthcare entity in a particular relation. */ name: HealthcareEntityRelationRoleType; } /** * The type of different roles a healthcare entity can play in a relation. */ export declare type HealthcareEntityRelationRoleType = string; /** * Defines values for RelationType. \ * {@link KnownRelationType} can be used interchangeably with RelationType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Abbreviation** \ * **DirectionOfBodyStructure** \ * **DirectionOfCondition** \ * **DirectionOfExamination** \ * **DirectionOfTreatment** \ * **DosageOfMedication** \ * **FormOfMedication** \ * **FrequencyOfMedication** \ * **FrequencyOfTreatment** \ * **QualifierOfCondition** \ * **RelationOfExamination** \ * **RouteOfMedication** \ * **TimeOfCondition** \ * **TimeOfEvent** \ * **TimeOfExamination** \ * **TimeOfMedication** \ * **TimeOfTreatment** \ * **UnitOfCondition** \ * **UnitOfExamination** \ * **ValueOfCondition** \ * **ValueOfExamination** */ export declare type HealthcareEntityRelationType = string; /** * Defines values for InnerErrorCodeValue. \ * {@link KnownInnerErrorCodeValue} can be used interchangeably with InnerErrorCodeValue, * this enum contains the known values that the service supports. * ### Known values supported by the service * **InvalidParameterValue** \ * **InvalidRequestBodyFormat** \ * **EmptyRequest** \ * **MissingInputRecords** \ * **InvalidDocument** \ * **ModelVersionIncorrect** \ * **InvalidDocumentBatch** \ * **UnsupportedLanguageCode** \ * **InvalidCountryHint** */ export declare type InnerErrorCodeValue = string; /** Known values of {@link HealthcareEntityCategory} that the service accepts. */ export declare const enum KnownHealthcareEntityCategory { BodyStructure = "BODY_STRUCTURE", AGE = "AGE", Gender = "GENDER", ExaminationName = "EXAMINATION_NAME", Date = "DATE", Direction = "DIRECTION", Frequency = "FREQUENCY", MeasurementValue = "MEASUREMENT_VALUE", MeasurementUnit = "MEASUREMENT_UNIT", RelationalOperator = "RELATIONAL_OPERATOR", Time = "TIME", GeneORProtein = "GENE_OR_PROTEIN", Variant = "VARIANT", AdministrativeEvent = "ADMINISTRATIVE_EVENT", CareEnvironment = "CARE_ENVIRONMENT", HealthcareProfession = "HEALTHCARE_PROFESSION", Diagnosis = "DIAGNOSIS", SymptomORSign = "SYMPTOM_OR_SIGN", ConditionQualifier = "CONDITION_QUALIFIER", MedicationClass = "MEDICATION_CLASS", MedicationName = "MEDICATION_NAME", Dosage = "DOSAGE", MedicationForm = "MEDICATION_FORM", MedicationRoute = "MEDICATION_ROUTE", FamilyRelation = "FAMILY_RELATION", TreatmentName = "TREATMENT_NAME" } /** Known values of {@link InnerErrorCodeValue} that the service accepts. */ export declare const enum KnownInnerErrorCodeValue { InvalidParameterValue = "InvalidParameterValue", InvalidRequestBodyFormat = "InvalidRequestBodyFormat", EmptyRequest = "EmptyRequest", MissingInputRecords = "MissingInputRecords", InvalidDocument = "InvalidDocument", ModelVersionIncorrect = "ModelVersionIncorrect", InvalidDocumentBatch = "InvalidDocumentBatch", UnsupportedLanguageCode = "UnsupportedLanguageCode", InvalidCountryHint = "InvalidCountryHint" } /** Known values of {@link WarningCode} that the service accepts. */ export declare const enum KnownWarningCode { LongWordsInDocument = "LongWordsInDocument", DocumentTruncated = "DocumentTruncated" } /** A word or phrase identified as a well-known entity within a database, including its formal (disambiguated) name and a link to the entity information within the source database. */ export declare interface LinkedEntity { /** Entity Linking formal name. */ name: string; /** List of instances this entity appears in the text. */ matches: Match[]; /** Language used in the data source. */ language: string; /** Unique identifier of the recognized entity from the data source. */ dataSourceEntityId?: string; /** URL for the entity's page from the data source. */ url: string; /** Data source used to extract entity linking, such as Wiki/Bing etc. */ dataSource: string; /** Bing Entity Search API unique identifier of the recognized entity. */ bingEntitySearchApiId?: string; } /** Details about the specific substring in a document that refers to a linked entity identified by the Text Analytics model. */ export declare interface Match { /** If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. */ confidenceScore: number; /** Entity text as appears in the request. */ text: string; /** Start position for the entity match text. */ offset: number; /** Length for the entity match text. */ length: number; } /** * Metadata information for an analysis poller operation. */ export declare interface OperationMetadata { /** * The date and time the operation was created. */ createdOn: Date; /** * The date and time when the operation results will expire on the server. */ expiresOn?: Date; /** * The operation id. */ operationId: string; /** * The time the operation status was last updated. */ lastModifiedOn: Date; /** * The current status of the operation. */ status: TextAnalyticsOperationStatus; } /** * A mined opinion object represents an opinion we've extracted from a sentence. * It consists of both a target that these assessments are about, and the actual * assessments themselves. */ export declare interface Opinion { /** * The target of a product/service that this assessment is about. */ target: TargetSentiment; /** * The actual assessments of the target. */ assessments: AssessmentSentiment[]; } /** * The results of an analyze actions operation represented as a paged iterator that * iterates over the results of the requested actions. */ export declare interface PagedAnalyzeActionsResult extends PagedAsyncIterableAnalyzeActionsResult { } /** * The results of a healthcare operation represented as a paged iterator that can * either iterate over the results on a document-by-document basis or, by * byPage(), can iterate over pages of documents. */ export declare interface PagedAnalyzeHealthcareEntitiesResult extends PagedAsyncIterableAnalyzeHealthcareEntitiesResult { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The results of an analyze Actions operation represented as a paged iterator that * iterates over the results of the requested actions. */ export declare type PagedAsyncIterableAnalyzeActionsResult = PagedAsyncIterableIterator; /** * The results of a healthcare operation represented as a paged iterator that can * either iterate over the results on a document-by-document basis or, by * byPage(), can iterate over pages of documents. */ export declare type PagedAsyncIterableAnalyzeHealthcareEntitiesResult = PagedAsyncIterableIterator; /** * An entity from PII recognition with information about the kind of PII * encountered. */ export declare interface PiiEntity extends Entity { } /** * Defines values for PiiCategory. \ * {@link KnownPiiCategory} can be used interchangeably with PiiCategory, * this enum contains the known values that the service supports. * ### Known values supported by the service * **ABARoutingNumber** \ * **ARNationalIdentityNumber** \ * **AUBankAccountNumber** \ * **AUDriversLicenseNumber** \ * **AUMedicalAccountNumber** \ * **AUPassportNumber** \ * **AUTaxFileNumber** \ * **AUBusinessNumber** \ * **AUCompanyNumber** \ * **ATIdentityCard** \ * **ATTaxIdentificationNumber** \ * **ATValueAddedTaxNumber** \ * **AzureDocumentDBAuthKey** \ * **AzureIAASDatabaseConnectionAndSQLString** \ * **AzureIoTConnectionString** \ * **AzurePublishSettingPassword** \ * **AzureRedisCacheString** \ * **AzureSAS** \ * **AzureServiceBusString** \ * **AzureStorageAccountKey** \ * **AzureStorageAccountGeneric** \ * **BENationalNumber** \ * **BENationalNumberV2** \ * **BEValueAddedTaxNumber** \ * **BRCPFNumber** \ * **BRLegalEntityNumber** \ * **BRNationalIDRG** \ * **BGUniformCivilNumber** \ * **CABankAccountNumber** \ * **CADriversLicenseNumber** \ * **CAHealthServiceNumber** \ * **CAPassportNumber** \ * **CAPersonalHealthIdentification** \ * **CASocialInsuranceNumber** \ * **CLIdentityCardNumber** \ * **CNResidentIdentityCardNumber** \ * **CreditCardNumber** \ * **HRIdentityCardNumber** \ * **HRNationalIDNumber** \ * **HRPersonalIdentificationNumber** \ * **HRPersonalIdentificationOIBNumberV2** \ * **CYIdentityCard** \ * **CYTaxIdentificationNumber** \ * **CZPersonalIdentityNumber** \ * **CZPersonalIdentityV2** \ * **DKPersonalIdentificationNumber** \ * **DKPersonalIdentificationV2** \ * **DrugEnforcementAgencyNumber** \ * **EEPersonalIdentificationCode** \ * **EUDebitCardNumber** \ * **EUDriversLicenseNumber** \ * **EUGPSCoordinates** \ * **EUNationalIdentificationNumber** \ * **EUPassportNumber** \ * **EUSocialSecurityNumber** \ * **EUTaxIdentificationNumber** \ * **FIEuropeanHealthNumber** \ * **FINationalID** \ * **FINationalIDV2** \ * **FIPassportNumber** \ * **FRDriversLicenseNumber** \ * **FRHealthInsuranceNumber** \ * **FRNationalID** \ * **FRPassportNumber** \ * **FRSocialSecurityNumber** \ * **FRTaxIdentificationNumber** \ * **FRValueAddedTaxNumber** \ * **DEDriversLicenseNumber** \ * **DEPassportNumber** \ * **DEIdentityCardNumber** \ * **DETaxIdentificationNumber** \ * **DEValueAddedNumber** \ * **GRNationalIDCard** \ * **GRNationalIDV2** \ * **GRTaxIdentificationNumber** \ * **HKIdentityCardNumber** \ * **HUValueAddedNumber** \ * **HUPersonalIdentificationNumber** \ * **HUTaxIdentificationNumber** \ * **INPermanentAccount** \ * **INUniqueIdentificationNumber** \ * **IDIdentityCardNumber** \ * **InternationalBankingAccountNumber** \ * **IEPersonalPublicServiceNumber** \ * **IEPersonalPublicServiceNumberV2** \ * **ILBankAccountNumber** \ * **ILNationalID** \ * **ITDriversLicenseNumber** \ * **ITFiscalCode** \ * **ITValueAddedTaxNumber** \ * **JPBankAccountNumber** \ * **JPDriversLicenseNumber** \ * **JPPassportNumber** \ * **JPResidentRegistrationNumber** \ * **JPSocialInsuranceNumber** \ * **JPMyNumberCorporate** \ * **JPMyNumberPersonal** \ * **JPResidenceCardNumber** \ * **LVPersonalCode** \ * **LTPersonalCode** \ * **LUNationalIdentificationNumberNatural** \ * **LUNationalIdentificationNumberNonNatural** \ * **MYIdentityCardNumber** \ * **MTIdentityCardNumber** \ * **MTTaxIDNumber** \ * **NLCitizensServiceNumber** \ * **NLCitizensServiceNumberV2** \ * **NLTaxIdentificationNumber** \ * **NLValueAddedTaxNumber** \ * **NZBankAccountNumber** \ * **NZDriversLicenseNumber** \ * **NZInlandRevenueNumber** \ * **NZMinistryOfHealthNumber** \ * **NZSocialWelfareNumber** \ * **NOIdentityNumber** \ * **PHUnifiedMultiPurposeIDNumber** \ * **PLIdentityCard** \ * **PLNationalID** \ * **PLNationalIDV2** \ * **PLPassportNumber** \ * **PLTaxIdentificationNumber** \ * **PLREGONNumber** \ * **PTCitizenCardNumber** \ * **PTCitizenCardNumberV2** \ * **PTTaxIdentificationNumber** \ * **ROPersonalNumericalCode** \ * **RUPassportNumberDomestic** \ * **RUPassportNumberInternational** \ * **SANationalID** \ * **SGNationalRegistrationIdentityCardNumber** \ * **SKPersonalNumber** \ * **SITaxIdentificationNumber** \ * **SIUniqueMasterCitizenNumber** \ * **ZAIdentificationNumber** \ * **KRResidentRegistrationNumber** \ * **ESDNI** \ * **ESSocialSecurityNumber** \ * **ESTaxIdentificationNumber** \ * **SQLServerConnectionString** \ * **SENationalID** \ * **SENationalIDV2** \ * **SEPassportNumber** \ * **SETaxIdentificationNumber** \ * **SWIFTCode** \ * **CHSocialSecurityNumber** \ * **TWNationalID** \ * **TWPassportNumber** \ * **TWResidentCertificate** \ * **THPopulationIdentificationCode** \ * **TRNationalIdentificationNumber** \ * **UKDriversLicenseNumber** \ * **UKElectoralRollNumber** \ * **UKNationalHealthNumber** \ * **UKNationalInsuranceNumber** \ * **UKUniqueTaxpayerNumber** \ * **USUKPassportNumber** \ * **USBankAccountNumber** \ * **USDriversLicenseNumber** \ * **USIndividualTaxpayerIdentification** \ * **USSocialSecurityNumber** \ * **UAPassportNumberDomestic** \ * **UAPassportNumberInternational** \ * **Organization** \ * **Email** \ * **URL** \ * **Age** \ * **PhoneNumber** \ * **IPAddress** \ * **Date** \ * **Person** \ * **Address** \ * **All** \ * **Default** */ export declare type PiiEntityCategory = string; /** * The types of PII domains the user can choose from. */ export declare enum PiiEntityDomain { /** * @see {@link https://aka.ms/tanerpii} for more information. */ PROTECTED_HEALTH_INFORMATION = "PHI" } /** * Options for an entities recognition action. */ export declare interface RecognizeCategorizedEntitiesAction extends TextAnalyticsAction { /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; /** * If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics * logs your input text for 48 hours, solely to allow for troubleshooting issues. Setting this parameter to true, * disables input logging and may limit our ability to remediate issues that occur. */ disableServiceLogs?: boolean; } /** * The error of a recognize categorized entities action. */ export declare type RecognizeCategorizedEntitiesActionErrorResult = TextAnalyticsActionErrorResult; /** * The result of a recognize categorized entities action. */ export declare type RecognizeCategorizedEntitiesActionResult = RecognizeCategorizedEntitiesActionSuccessResult | RecognizeCategorizedEntitiesActionErrorResult; /** * The results of a succeeded recognize categorized entities action. */ export declare interface RecognizeCategorizedEntitiesActionSuccessResult extends TextAnalyticsActionSuccessState { /** * Array of the results for each categorized entities recognition action. */ results: RecognizeCategorizedEntitiesResultArray; } /** * An error result from the recognize entities operation on a single document. */ export declare type RecognizeCategorizedEntitiesErrorResult = TextAnalyticsErrorResult; /** * Options for the recognize entities operation. */ export declare interface RecognizeCategorizedEntitiesOptions extends TextAnalyticsOperationOptions { /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** * The result of the recognize entities operation on a single document. */ export declare type RecognizeCategorizedEntitiesResult = RecognizeCategorizedEntitiesSuccessResult | RecognizeCategorizedEntitiesErrorResult; /** * Array of `RecognizeCategorizedEntitiesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ export declare interface RecognizeCategorizedEntitiesResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The result of the recognize entities operation on a single document, containing the collection of * `Entity` objects identified in that document. */ export declare interface RecognizeCategorizedEntitiesSuccessResult extends TextAnalyticsSuccessResult { /** * The collection of entities identified in the input document. */ readonly entities: CategorizedEntity[]; } /** * Options for an entities linking action. */ export declare interface RecognizeLinkedEntitiesAction extends TextAnalyticsAction { /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; /** * If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics * logs your input text for 48 hours, solely to allow for troubleshooting issues. Setting this parameter to true, * disables input logging and may limit our ability to remediate issues that occur. */ disableServiceLogs?: boolean; } /** * The error of a recognize linked entities action. */ export declare type RecognizeLinkedEntitiesActionErrorResult = TextAnalyticsActionErrorResult; /** * The result of a recognize linked entities action. */ export declare type RecognizeLinkedEntitiesActionResult = RecognizeLinkedEntitiesActionSuccessResult | RecognizeLinkedEntitiesActionErrorResult; /** * The results of a succeeded recognize linked entities action. */ export declare interface RecognizeLinkedEntitiesActionSuccessResult extends TextAnalyticsActionSuccessState { /** * Array of the results for each linked entities recognition action. */ results: RecognizeLinkedEntitiesResultArray; } /** * An error result from the recognize linked entities operation on a single document. */ export declare type RecognizeLinkedEntitiesErrorResult = TextAnalyticsErrorResult; /** * Options for the recognize linked entities operation. */ export declare interface RecognizeLinkedEntitiesOptions extends TextAnalyticsOperationOptions { /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** * The result of the recognize linked entities operation on a single document. */ export declare type RecognizeLinkedEntitiesResult = RecognizeLinkedEntitiesSuccessResult | RecognizeLinkedEntitiesErrorResult; /** * Array of `RecognizeLinkedEntitiesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ export declare interface RecognizeLinkedEntitiesResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The result of the recognize linked entities operation on a single document, * containing a collection of the `LinkedEntity` objects identified in that document. */ export declare interface RecognizeLinkedEntitiesSuccessResult extends TextAnalyticsSuccessResult { /** * The collection of entities identified in the input document. */ readonly entities: LinkedEntity[]; } /** * Options for a Pii entities recognition action. */ export declare interface RecognizePiiEntitiesAction extends TextAnalyticsAction { /** * Filters entities to ones only included in the specified domain (e.g., if * set to 'PHI', entities in the Protected Healthcare Information domain will * only be returned). @see {@link https://aka.ms/tanerpii} for more information. */ domainFilter?: PiiEntityDomain; /** * Filters entities to ones only included in the specified array of categories */ categoriesFilter?: PiiEntityCategory[]; /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; /** * If set to false, you opt-in to have your text input logged for troubleshooting. By default, Text Analytics * will not log your input text for pii entities recognition. Setting this parameter to false, * enables input logging. */ disableServiceLogs?: boolean; } /** * The error of a recognize pii entities action. */ export declare type RecognizePiiEntitiesActionErrorResult = TextAnalyticsActionErrorResult; /** * The result of a recognize pii entities action. */ export declare type RecognizePiiEntitiesActionResult = RecognizePiiEntitiesActionSuccessResult | RecognizePiiEntitiesActionErrorResult; /** * The results of a succeeded recognize pii entities action. */ export declare interface RecognizePiiEntitiesActionSuccessResult extends TextAnalyticsActionSuccessState { /** * Array of the results for each pii entities recognition action. */ results: RecognizePiiEntitiesResultArray; } /** * An error result from the recognize entities operation on a single document. */ export declare type RecognizePiiEntitiesErrorResult = TextAnalyticsErrorResult; /** * Options for the recognize PII entities operation. */ export declare interface RecognizePiiEntitiesOptions extends TextAnalyticsOperationOptions { /** * Filters entities to ones only included in the specified domain (e.g., if * set to 'PHI', entities in the Protected Healthcare Information domain will * only be returned). @see {@link https://aka.ms/tanerpii} for more information. */ domainFilter?: PiiEntityDomain; /** * Specifies the measurement unit used to calculate the offset and length properties. * Possible units are "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; /** * Filters entities to ones only included in the specified array of categories */ categoriesFilter?: PiiEntityCategory[]; } /** * The result of the recognize entities operation on a single document. */ export declare type RecognizePiiEntitiesResult = RecognizePiiEntitiesSuccessResult | RecognizePiiEntitiesErrorResult; /** * Collection of `RecognizePiiEntitiesResult` objects corresponding to a batch of input documents, and * annotated with information about the batch operation. */ export declare interface RecognizePiiEntitiesResultArray extends Array { /** * Statistics about the input document batch and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ statistics?: TextDocumentBatchStatistics; /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion: string; } /** * The result of the recognize entities operation on a single document, containing the collection of * `Entity` objects identified in that document. */ export declare interface RecognizePiiEntitiesSuccessResult extends TextAnalyticsSuccessResult { /** * The collection of entities identified in the input document. */ readonly entities: PiiEntity[]; /** * The text redacted. */ redactedText: string; } export declare interface SentenceAssessment { /** Assessment sentiment in the sentence. */ sentiment: TokenSentimentValue; /** Assessment sentiment confidence scores in the sentence. */ confidenceScores: TargetConfidenceScoreLabel; /** The assessment offset from the start of the sentence. */ offset: number; /** The length of the assessment. */ length: number; /** The assessment text detected. */ text: string; /** The indicator representing if the assessment is negated. */ isNegated: boolean; } /** * The predicted sentiment for a given span of text. For more information regarding text sentiment, see https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/how-tos/text-analytics-how-to-sentiment-analysis. */ export declare interface SentenceSentiment { /** * The sentence text. */ text: string; /** * The predicted Sentiment for the sentence. */ sentiment: SentenceSentimentLabel; /** * The sentiment confidence score between 0 and 1 for the sentence for all classes. */ confidenceScores: SentimentConfidenceScores; /** * The sentence text offset from the start of the document. */ offset: number; /** * The length of the sentence text. */ length: number; /** * The list of opinions mined from this sentence. For example in "The food is * good, but the service is bad", we would mine these two opinions "food is * good", "service is bad". Only returned if `includeOpinionMining` is set to * True in the call to `analyzeSentiment`. */ opinions: Opinion[]; } /** Defines values for SentenceSentimentLabel. */ export declare type SentenceSentimentLabel = "positive" | "neutral" | "negative"; /** Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. */ export declare interface SentimentConfidenceScores { positive: number; neutral: number; negative: number; } /** * Measurement units that can used to calculate the offset and length properties. */ export declare type StringIndexType = "TextElement_v8" | "UnicodeCodePoint" | "Utf16CodeUnit"; /** Represents the confidence scores across all sentiment classes: positive, neutral, negative. */ export declare interface TargetConfidenceScoreLabel { positive: number; negative: number; } /** * TargetSentiment contains the predicted sentiment, confidence scores and other * information about an target of a product. A target of a product/service is a * key component of that product/service. For example in "The food at Hotel Foo * is good", "food" is a target of "Hotel Foo". */ export declare interface TargetSentiment { /** * The sentiment confidence score between 0 and 1 for the target for * 'positive' and 'negative' labels. */ confidenceScores: TargetConfidenceScoreLabel; /** * The predicted Sentiment for the Target. Possible values include 'positive', * 'mixed', and 'negative'. */ sentiment: TokenSentimentValue; /** * The target text. */ text: string; /** * The Target text offset from the start of the sentence. */ offset: number; /** * The length of the Target text. */ length: number; } /** * The type of a text analytics action. */ export declare interface TextAnalyticsAction { /** * The version of the text analytics model used by this operation on this * batch of input documents. */ modelVersion?: string; /** * The preferred name for this action. */ actionName?: string; } /** * The error of an analyze batch action. */ export declare interface TextAnalyticsActionErrorResult { /** * When this action was completed by the service. */ readonly failedOn: Date; /** * The Error for this action result. */ readonly error: TextAnalyticsError; } /** * Description of collection of actions for the analyze API to perform on input documents. However, currently, the service can accept up to one action only per action type. */ export declare interface TextAnalyticsActions { /** * A collection of descriptions of entities recognition actions. However, currently, the service can accept up to one action only for `recognizeEntities`. */ recognizeEntitiesActions?: RecognizeCategorizedEntitiesAction[]; /** * A collection of descriptions of Pii entities recognition actions. However, currently, the service can accept up to one action only for `recognizePiiEntities`. */ recognizePiiEntitiesActions?: RecognizePiiEntitiesAction[]; /** * A collection of descriptions of key phrases recognition actions. However, currently, the service can accept up to one action only for `extractKeyPhrases`. */ extractKeyPhrasesActions?: ExtractKeyPhrasesAction[]; /** * A collection of descriptions of entities linking actions. However, currently, the service can accept up to one action only for `recognizeLinkedEntities`. */ recognizeLinkedEntitiesActions?: RecognizeLinkedEntitiesAction[]; /** * A collection of descriptions of sentiment analysis actions. However, currently, the service can accept up to one action only for `analyzeSentiment`. */ analyzeSentimentActions?: AnalyzeSentimentAction[]; } /** * The state of a succeeded action. */ export declare interface TextAnalyticsActionSuccessState { /** * When this action was completed by the service. */ readonly completedOn: Date; /** * Discriminant to determine if that this is an error result. */ readonly error?: undefined; } /** * Client class for interacting with Azure Text Analytics. */ export declare class TextAnalyticsClient { /** * The URL to the TextAnalytics endpoint */ readonly endpointUrl: string; /** * The default country hint to use. Defaults to "us". */ defaultCountryHint: string; /** * The default language to use. Defaults to "en". */ defaultLanguage: string; /* Excluded from this release type: client */ /** * Creates an instance of TextAnalyticsClient. * * Example usage: * ```ts * import { TextAnalyticsClient, AzureKeyCredential } from "@azure/ai-text-analytics"; * * const client = new TextAnalyticsClient( * "", * new AzureKeyCredential("") * ); * ``` * @param endpointUrl - The URL to the TextAnalytics endpoint * @param credential - Used to authenticate requests to the service. * @param options - Used to configure the TextAnalytics client. */ constructor(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: TextAnalyticsClientOptions); /** * Runs a predictive model to determine the language that the passed-in * input strings are written in, and returns, for each one, the detected * language as well as a score indicating the model's confidence that the * inferred language is correct. Scores close to 1 indicate high certainty in * the result. 120 languages are supported. * @param documents - A collection of input strings to analyze. * @param countryHint - Indicates the country of origin for all of * the input strings to assist the text analytics model in predicting * the language they are written in. If unspecified, this value will be * set to the default country hint in `TextAnalyticsClientOptions`. * If set to an empty string, or the string "none", the service will apply a * model where the country is explicitly unset. * The same country hint is applied to all strings in the input collection. * @param options - Optional parameters for the operation. */ detectLanguage(documents: string[], countryHint?: string, options?: DetectLanguageOptions): Promise; /** * Runs a predictive model to determine the language that the passed-in * input document are written in, and returns, for each one, the detected * language as well as a score indicating the model's confidence that the * inferred language is correct. Scores close to 1 indicate high certainty in * the result. 120 languages are supported. * @param documents - A collection of input documents to analyze. * @param options - Optional parameters for the operation. */ detectLanguage(documents: DetectLanguageInput[], options?: DetectLanguageOptions): Promise; /** * Runs a predictive model to identify a collection of named entities * in the passed-in input strings, and categorize those entities into types * such as person, location, or organization. For more information on * available categories, @see * {@link https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types}. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input strings to analyze. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the language is explicitly set to "None". * @param options - Optional parameters for the operation. */ recognizeEntities(documents: string[], language?: string, options?: RecognizeCategorizedEntitiesOptions): Promise; /** * Runs a predictive model to identify a collection of named entities * in the passed-in input documents, and categorize those entities into types * such as person, location, or organization. For more information on * available categories, @see * {@link https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/named-entity-types}. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input documents to analyze. * @param options - Optional parameters for the operation. */ recognizeEntities(documents: TextDocumentInput[], options?: RecognizeCategorizedEntitiesOptions): Promise; /** * Runs a predictive model to identify the positive, negative, neutral, or mixed * sentiment contained in the input strings, as well as scores indicating * the model's confidence in each of the predicted sentiments. Optionally it * can also identify targets in the text and assessments about it through * opinion mining. For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input strings to analyze. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the lanuage is explicitly set to "None". * @param options - Optional parameters that includes enabling opinion mining. */ analyzeSentiment(documents: string[], language?: string, options?: AnalyzeSentimentOptions): Promise; /** * Runs a predictive model to identify the positive, negative or neutral, or mixed * sentiment contained in the input documents, as well as scores indicating * the model's confidence in each of the predicted sentiments.Optionally it * can also identify targets in the text and assessments about it through * opinion mining. For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input documents to analyze. * @param options - Optional parameters that includes enabling opinion mining. */ analyzeSentiment(documents: TextDocumentInput[], options?: AnalyzeSentimentOptions): Promise; /** * Runs a model to identify a collection of significant phrases * found in the passed-in input strings. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input strings to analyze. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the language is explicitly set to "None". * @param options - Options for the operation. */ extractKeyPhrases(documents: string[], language?: string, options?: ExtractKeyPhrasesOptions): Promise; /** * Runs a model to identify a collection of significant phrases * found in the passed-in input documents. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input documents to analyze. * @param options - Options for the operation. */ extractKeyPhrases(documents: TextDocumentInput[], options?: ExtractKeyPhrasesOptions): Promise; /** * Runs a predictive model to identify a collection of entities containing * personally identifiable information found in the passed-in input strings, * and categorize those entities into types such as US social security * number, drivers license number, or credit card number. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support}. * @param inputs - The input strings to analyze. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the language is explicitly set to "None". * @param options - Options for the operation. */ recognizePiiEntities(inputs: string[], language?: string, options?: RecognizePiiEntitiesOptions): Promise; /** * Runs a predictive model to identify a collection of entities containing * personally identifiable information found in the passed-in input documents, * and categorize those entities into types such as US social security * number, drivers license number, or credit card number. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support}. * @param inputs - The input documents to analyze. * @param options - Optional parameters for the operation. */ recognizePiiEntities(inputs: TextDocumentInput[], options?: RecognizePiiEntitiesOptions): Promise; /** * Runs a predictive model to identify a collection of entities * found in the passed-in input strings, and include information linking the * entities to their corresponding entries in a well-known knowledge base. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input strings to analyze. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the language is explicitly set to "None". * @param options - Options for the operation. */ recognizeLinkedEntities(documents: string[], language?: string, options?: RecognizeLinkedEntitiesOptions): Promise; /** * Runs a predictive model to identify a collection of entities * found in the passed-in input documents, and include information linking the * entities to their corresponding entries in a well-known knowledge base. * For a list of languages supported by this operation, @see * {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}. * @param documents - The input documents to analyze. * @param options - Options for the operation. */ recognizeLinkedEntities(documents: TextDocumentInput[], options?: RecognizeLinkedEntitiesOptions): Promise; /** * Start a healthcare analysis operation to recognize healthcare related entities (drugs, conditions, * symptoms, etc) and their relations. * @param documents - Collection of documents to analyze. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the language is explicitly set to "None". * @param options - Options for the operation. */ beginAnalyzeHealthcareEntities(documents: string[], language?: string, options?: BeginAnalyzeHealthcareEntitiesOptions): Promise; /** * Start a healthcare analysis operation to recognize healthcare related entities (drugs, conditions, * symptoms, etc) and their relations. * @param documents - Collection of documents to analyze. * @param options - Options for the operation. */ beginAnalyzeHealthcareEntities(documents: TextDocumentInput[], options?: BeginAnalyzeHealthcareEntitiesOptions): Promise; /** * Submit a collection of text documents for analysis. Specify one or more unique actions to be executed. * @param documents - Collection of documents to analyze * @param actions - TextAnalyticsActions to execute. * @param language - The language that all the input strings are written in. If unspecified, this value will be set to the default language in `TextAnalyticsClientOptions`. If set to an empty string, the service will apply a model where the language is explicitly set to "None". * @param options - Options for the operation. */ beginAnalyzeActions(documents: string[], actions: TextAnalyticsActions, language?: string, options?: BeginAnalyzeActionsOptions): Promise; /** * Submit a collection of text documents for analysis. Specify one or more unique actions to be executed. * @param documents - Collection of documents to analyze * @param actions - TextAnalyticsActions to execute. * @param options - Options for the operation. */ beginAnalyzeActions(documents: TextDocumentInput[], actions: TextAnalyticsActions, options?: BeginAnalyzeActionsOptions): Promise; } /** * Client options used to configure TextAnalytics API requests. */ export declare interface TextAnalyticsClientOptions extends CommonClientOptions { /** * The default country hint to use. Defaults to "us". */ defaultCountryHint?: string; /** * The default language to use. Defaults to "en". */ defaultLanguage?: string; } /** * Type describing an error from the Text Analytics service. */ export declare interface TextAnalyticsError { /** * A code describing the kind of error produced */ readonly code: ErrorCode; /** * A message from the service explaining the error */ readonly message: string; /** * The target of the particular error (for example, the name of an invalid parameter) */ readonly target?: string; } /** * Base type for error results of text analytics operations corresponding to a * single document. */ export declare interface TextAnalyticsErrorResult { /** * Unique, non-empty document identifier. */ readonly id: string; /** * The Error for this document result. */ readonly error: TextAnalyticsError; } /** * Options common to all text analytics operations. */ export declare interface TextAnalyticsOperationOptions extends OperationOptions { /** * This value indicates which model will be used for scoring. If a model-version is * not specified, the API should default to the latest, non-preview version. * For supported model versions, see operation-specific documentation, for example: * https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis#model-versioning */ modelVersion?: string; /** * If set to true, response will contain input and document level statistics. */ includeStatistics?: boolean; /** * If set to true (the default for `beginAnalyzeHealthcareEntities` and `recognizePiiEntities`), * you opt-out of having your text input logged for troubleshooting. By default, Text Analytics * logs your input text for 48 hours, solely to allow for troubleshooting issues. Setting this * parameter to true, disables input logging and may limit our ability to remediate issues that * occur. */ disableServiceLogs?: boolean; } /** Defines values for State. */ export declare type TextAnalyticsOperationStatus = "notStarted" | "running" | "succeeded" | "failed" | "rejected" | "cancelled" | "cancelling"; /** * Base type for results of text analytics operations corresponding to a single * input document. */ export declare interface TextAnalyticsSuccessResult { /** * Unique, non-empty document identifier. */ readonly id: string; /** * Statistics about the input document and how it was processed * by the service. This property will have a value when includeStatistics is set to true * in the client call. */ readonly statistics?: TextDocumentStatistics; /** * An array of warning data corresponding to this document. * * If no warnings were returned, this array will be empty. */ readonly warnings: TextAnalyticsWarning[]; /** * Discriminant to determine if that this is an error result. */ readonly error?: undefined; } /** Represents a warning encountered while processing a document. */ export declare interface TextAnalyticsWarning { /** Error code. */ code: WarningCode; /** Warning message. */ message: string; } /** if includeStatistics=true was specified in the request this field will contain information about the request payload. */ export declare interface TextDocumentBatchStatistics { /** Number of documents submitted in the request. */ documentCount: number; /** Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. */ validDocumentCount: number; /** Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. */ erroneousDocumentCount: number; /** Number of transactions for the request. */ transactionCount: number; } /** An object representing an individual text document to be analyzed by the Text Analytics service. The document contains a unique document ID, the full text of the document, and the language of the document's text. */ export declare interface TextDocumentInput { /** A unique, non-empty document identifier. */ id: string; /** The input text to process. */ text: string; /** (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. */ language?: string; } /** if includeStatistics=true was specified in the request this field will contain information about the document payload. */ export declare interface TextDocumentStatistics { /** Number of text elements recognized in the document. */ characterCount: number; /** Number of transactions for the document. */ transactionCount: number; } /** Defines values for TokenSentimentValue. */ export declare type TokenSentimentValue = "positive" | "mixed" | "negative"; /** * Defines values for WarningCode. \ * {@link KnownWarningCode} can be used interchangeably with WarningCode, * this enum contains the known values that the service supports. * ### Known values supported by the service * **LongWordsInDocument** \ * **DocumentTruncated** */ export declare type WarningCode = string; export { }