UNPKG

@azure/ai-language-text

Version:

An isomorphic client library for the text analysis features in the Azure Cognitive Language Service.

1,309 lines (1,208 loc) 107 kB
/** * [Azure Cognitive Language Services](https://docs.microsoft.com/azure/cognitive-services/language-service/overview) * is a suite of natural language processing (NLP) skills built with * best-in-class Microsoft machine learning algorithms used to analyze * unstructured text for actions such as sentiment analysis, key phrase * extraction, and language detection. * * @packageDocumentation */ 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 { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; import { TokenCredential } from '@azure/core-auth'; /** Options for an Abstractive Summarization action. */ export declare interface AbstractiveSummarizationAction { /** The approximate number of sentences to be part of the summary. */ sentenceCount?: number; /** * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}. * * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** Options for an abstractive summarization batch action. */ export declare interface AbstractiveSummarizationBatchAction extends AnalyzeBatchActionCommon, AbstractiveSummarizationAction { /** * The kind of the action. */ kind: "AbstractiveSummarization"; } /** * The result of an abstractive summarization batch action. */ export declare type AbstractiveSummarizationBatchResult = ActionMetadata & BatchActionResult<AbstractiveSummarizationResult, "AbstractiveSummarization">; /** * An error result from the abstractive summarization action on a single document. */ export declare type AbstractiveSummarizationErrorResult = TextAnalysisErrorResult; /** * The result of the abstractive summarization action on a single document. */ export declare type AbstractiveSummarizationResult = AbstractiveSummarizationSuccessResult | AbstractiveSummarizationErrorResult; /** * The result of the abstractive summarization action on a single document, * containing a collection of the summaries identified for that document. */ export declare interface AbstractiveSummarizationSuccessResult extends TextAnalysisSuccessResult { /** * A list of summaries of the input document. */ readonly summaries: AbstractiveSummary[]; } /** An object representing a single summary with context for given document. */ export declare interface AbstractiveSummary { /** The text of the summary. */ text: string; /** The context list of the summary. */ contexts: SummaryContext[]; } /** Configuration common to all actions. */ export declare interface ActionCommon { /** * If set to true, you opt-out of having your text input logged for troubleshooting. By default, Cognitive Language Service logs your input text for 48 hours, solely to allow for troubleshooting issues. Setting this parameter to true, disables in logging and may limit our ability to remediate issues that occur. * * Default is false. */ disableServiceLogs?: boolean; } /** Configuration common to all actions that use custom models. */ export declare interface ActionCustom extends ActionCommon { /** The project name for the model to be used by the action. */ projectName: string; /** The deployment name for the model to be used by the action. */ deploymentName: string; } /** * Action metadata. */ export declare interface ActionMetadata { /** * The model version used to perform the action. */ readonly modelVersion: string; } /** Configuration common to all actions that use prebuilt models. */ export declare interface ActionPrebuilt extends ActionCommon { /** The version of the model to be used by the action. */ modelVersion?: string; } /** * Type of actions supported by the {@link TextAnalysisClient.analyze} method. */ export declare type AnalyzeActionName = keyof typeof AnalyzeActionNames; /** * Type of actions supported by the {@link TextAnalysisClient.analyze} method. */ export declare const AnalyzeActionNames: { readonly EntityLinking: "EntityLinking"; readonly EntityRecognition: "EntityRecognition"; readonly KeyPhraseExtraction: "KeyPhraseExtraction"; readonly PiiEntityRecognition: "PiiEntityRecognition"; readonly LanguageDetection: "LanguageDetection"; readonly SentimentAnalysis: "SentimentAnalysis"; }; /** * The type of parameters for every action in ${@link AnalyzeActionNames}. */ export declare type AnalyzeActionParameters<ActionName extends AnalyzeActionName> = { EntityLinking: EntityLinkingAction; EntityRecognition: EntityRecognitionAction; PiiEntityRecognition: PiiEntityRecognitionAction; KeyPhraseExtraction: KeyPhraseExtractionAction; SentimentAnalysis: SentimentAnalysisAction; LanguageDetection: LanguageDetectionAction; }[ActionName]; /** * Batch of actions. */ export declare type AnalyzeBatchAction = EntityLinkingBatchAction | EntityRecognitionBatchAction | KeyPhraseExtractionBatchAction | PiiEntityRecognitionBatchAction | HealthcareBatchAction | SentimentAnalysisBatchAction | ExtractiveSummarizationBatchAction | AbstractiveSummarizationBatchAction | CustomEntityRecognitionBatchAction | CustomSingleLabelClassificationBatchAction | CustomMultiLabelClassificationBatchAction; /** * Options common to all batch actions. */ export declare interface AnalyzeBatchActionCommon { /** * The name of the action. */ actionName?: string; } /** * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method. */ export declare type AnalyzeBatchActionName = keyof typeof AnalyzeBatchActionNames; /** * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method. */ export declare const AnalyzeBatchActionNames: { readonly SentimentAnalysis: "SentimentAnalysis"; readonly EntityRecognition: "EntityRecognition"; readonly PiiEntityRecognition: "PiiEntityRecognition"; readonly KeyPhraseExtraction: "KeyPhraseExtraction"; readonly EntityLinking: "EntityLinking"; readonly Healthcare: "Healthcare"; readonly ExtractiveSummarization: "ExtractiveSummarization"; readonly AbstractiveSummarization: "AbstractiveSummarization"; readonly CustomEntityRecognition: "CustomEntityRecognition"; readonly CustomSingleLabelClassification: "CustomSingleLabelClassification"; readonly CustomMultiLabelClassification: "CustomMultiLabelClassification"; }; /** * The metadata for long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}. */ export declare interface AnalyzeBatchOperationMetadata { /** * The date and time the operation was created. */ readonly createdOn: Date; /** * The date and time when the operation results will expire on the server. */ readonly expiresOn?: Date; /** * The operation id. */ readonly id: string; /** * The time the operation status was last updated. */ readonly modifiedOn: Date; /** * Number of successfully completed actions. */ readonly actionSucceededCount: number; /** * Number of failed actions. */ readonly actionFailedCount: number; /** * Number of actions still in progress. */ readonly actionInProgressCount: number; /** * The operation's display name. */ readonly displayName?: string; } /** * The state of the begin analyze polling operation. */ export declare interface AnalyzeBatchOperationState extends OperationState<PagedAnalyzeBatchResult>, AnalyzeBatchOperationMetadata { } /** * A poller that polls long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}. */ export declare type AnalyzeBatchPoller = PollerLike<AnalyzeBatchOperationState, PagedAnalyzeBatchResult>; /** * Results of a batch of actions. */ export declare type AnalyzeBatchResult = EntityLinkingBatchResult | EntityRecognitionBatchResult | KeyPhraseExtractionBatchResult | PiiEntityRecognitionBatchResult | SentimentAnalysisBatchResult | HealthcareBatchResult | ExtractiveSummarizationBatchResult | AbstractiveSummarizationBatchResult | CustomEntityRecognitionBatchResult | CustomSingleLabelClassificationBatchResult | CustomMultiLabelClassificationBatchResult; /** * The type of results of every action in ${@link AnalyzeActionNames}. */ export declare type AnalyzeResult<ActionName extends AnalyzeActionName> = { EntityLinking: EntityLinkingResult[]; EntityRecognition: EntityRecognitionResult[]; PiiEntityRecognition: PiiEntityRecognitionResult[]; KeyPhraseExtraction: KeyPhraseExtractionResult[]; SentimentAnalysis: SentimentAnalysisResult[]; LanguageDetection: LanguageDetectionResult[]; }[ActionName]; /** An object that 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 { /** Assessment sentiment in the sentence. */ sentiment: TokenSentimentLabel; /** Assessment sentiment confidence scores in the sentence. */ confidenceScores: TargetConfidenceScores; /** 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; } export { AzureKeyCredential } /** * The error of an analyze batch action. */ export declare interface BatchActionErrorResult<Kind extends AnalyzeBatchActionName> extends BatchActionState<Kind> { /** * When this action was completed by the service. */ readonly failedOn: Date; /** * The Error for this action result. */ readonly error: TextAnalysisError; } /** * The result of a batched action. */ export declare type BatchActionResult<T, Kind extends AnalyzeBatchActionName> = BatchActionSuccessResult<T, Kind> | BatchActionErrorResult<Kind>; /** The State of a batched action */ export declare interface BatchActionState<Kind extends AnalyzeBatchActionName> { /** * The kind of the action results. */ readonly kind: Kind; /** * The name of the action. */ readonly actionName?: string; /** * Action statistics. */ readonly statistics?: TextDocumentBatchStatistics; } /** * The state of a succeeded batched action. */ export declare interface BatchActionSuccessResult<T, Kind extends AnalyzeBatchActionName> extends BatchActionState<Kind> { /** * The list of document results. */ readonly results: T[]; /** * When this action was completed by the service. */ readonly completedOn: Date; /** * Discriminant to determine if that this is an error result. */ readonly error?: undefined; } /** * Options for the begin analyze actions operation. */ export declare interface BeginAnalyzeBatchOptions extends TextAnalysisOperationOptions { /** * Time delay between poll requests, in milliseconds. */ updateIntervalInMs?: number; /** * The operation's display name. */ displayName?: string; } /** A classification result from a custom classify document single category action */ export declare interface ClassificationCategory { /** Classification type. */ category: string; /** Confidence score between 0 and 1 of the recognized class. */ confidenceScore: number; } /** * Custom action metadata. */ export declare interface CustomActionMetadata { /** * The name of the project used to perform the action. */ readonly projectName: string; /** * The name of the deployment used to perform the action. */ readonly deploymentName: string; } /** Supported parameters for a Custom Entities task. */ export declare interface CustomEntityRecognitionAction extends ActionCustom { /** * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}. * * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** Options for a custom entity recognition batch action. */ export declare interface CustomEntityRecognitionBatchAction extends AnalyzeBatchActionCommon, CustomEntityRecognitionAction { /** * The kind of the action. */ kind: "CustomEntityRecognition"; } /** * The result of a custom entity recognition batch action. */ export declare type CustomEntityRecognitionBatchResult = CustomActionMetadata & BatchActionResult<CustomEntityRecognitionResult, "CustomEntityRecognition">; /** * An error result from the custom entity recognition action on a single document. */ export declare type CustomEntityRecognitionErrorResult = TextAnalysisErrorResult; /** * The result of the custom entity recognition action on a single document. */ export declare type CustomEntityRecognitionResult = CustomEntityRecognitionSuccessResult | CustomEntityRecognitionErrorResult; /** * The result of the custom entity recognition action on a single document, * containing a collection of the entities identified in that document. */ export declare interface CustomEntityRecognitionSuccessResult extends TextAnalysisSuccessResult { /** * The collection of entities identified in the input document. */ readonly entities: Entity[]; } /** Options for a multi-label classification custom action */ export declare interface CustomMultiLabelClassificationAction extends ActionCustom { } /** Options for a custom multi-label classification batch action. */ export declare interface CustomMultiLabelClassificationBatchAction extends AnalyzeBatchActionCommon, CustomMultiLabelClassificationAction { /** * The kind of the action. */ kind: "CustomMultiLabelClassification"; } /** * The result of a custom multi-label classification batch action. */ export declare type CustomMultiLabelClassificationBatchResult = CustomActionMetadata & BatchActionResult<CustomMultiLabelClassificationResult, "CustomMultiLabelClassification">; /** * An error result from the multi-label classification action on a multi document. */ export declare type CustomMultiLabelClassificationErrorResult = TextAnalysisErrorResult; /** * The result of the multi-label classification action on a multi document. */ export declare type CustomMultiLabelClassificationResult = CustomMultiLabelClassificationSuccessResult | CustomMultiLabelClassificationErrorResult; /** * The result of a successful multi-label classification action on a multi document, * containing the result of the classification. */ export declare interface CustomMultiLabelClassificationSuccessResult extends TextAnalysisSuccessResult { /** * The collection of classifications in the input document. */ readonly classifications: ClassificationCategory[]; } /** Options for a single-label classification custom action */ export declare interface CustomSingleLabelClassificationAction extends ActionCustom { } /** Options for a custom single-label classification batch action. */ export declare interface CustomSingleLabelClassificationBatchAction extends AnalyzeBatchActionCommon, CustomSingleLabelClassificationAction { /** * The kind of the action. */ kind: "CustomSingleLabelClassification"; } /** * The result of a custom single-label classification batch action. */ export declare type CustomSingleLabelClassificationBatchResult = CustomActionMetadata & BatchActionResult<CustomSingleLabelClassificationResult, "CustomSingleLabelClassification">; /** * An error result from the single-label classification action on a single document. */ export declare type CustomSingleLabelClassificationErrorResult = TextAnalysisErrorResult; /** * The result of the single-label classification action on a single document. */ export declare type CustomSingleLabelClassificationResult = CustomSingleLabelClassificationSuccessResult | CustomSingleLabelClassificationErrorResult; /** * The result of a successful single-label classification action on a single document, * containing the result of the classification. */ export declare interface CustomSingleLabelClassificationSuccessResult extends TextAnalysisSuccessResult { /** * The collection of classifications in the input document. */ readonly classifications: ClassificationCategory[]; } /** Information about the language of a document as identified by the Language 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; } /** Defines values for DocumentSentimentLabel. */ export declare type DocumentSentimentLabel = "positive" | "neutral" | "negative" | "mixed"; /** Represents a warning encountered while processing a document. */ export declare interface DocumentWarning { /** Error code. */ code: WarningCode; /** Warning message. */ message: string; } /** A word or phrase identified as an entity that is categorized within a taxonomy of types. The set of categories recognized by the Language service is described at https://docs.microsoft.com/azure/cognitive-services/language-service/named-entity-recognition/concepts/named-entity-categories . */ 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; } /** Defines values for EntityAssociation. */ export declare type EntityAssociation = "subject" | "other"; /** Defines values for EntityCertainty. */ export declare type EntityCertainty = "positive" | "positivePossible" | "neutralPossible" | "negativePossible" | "negative"; /** Defines values for EntityConditionality. */ 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; } /** Options for an entity linking action. */ export declare interface EntityLinkingAction extends ActionPrebuilt { /** * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}. * * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** Options for an entity linking batch action. */ export declare interface EntityLinkingBatchAction extends AnalyzeBatchActionCommon, EntityLinkingAction { /** * The kind of the action. */ kind: "EntityLinking"; } /** * The result of an entity linking batch action. */ export declare type EntityLinkingBatchResult = ActionMetadata & BatchActionResult<EntityLinkingResult, "EntityLinking">; /** * An error result from an entity linking action on a single document. */ export declare type EntityLinkingErrorResult = TextAnalysisErrorResult; /** * The result of an entity linking action on a single document. */ export declare type EntityLinkingResult = EntityLinkingSuccessResult | EntityLinkingErrorResult; /** * The result of a entity linking action on a single document, containing a * collection of the {@link LinkedEntity} objects identified in that document. */ export declare interface EntityLinkingSuccessResult extends TextAnalysisSuccessResult { /** * The collection of entities identified in the input document. */ readonly entities: LinkedEntity[]; } /** Options for an entity recognition action. */ export declare interface EntityRecognitionAction extends ActionPrebuilt { /** * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}. * * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** Options for an entity recognition batch action. */ export declare interface EntityRecognitionBatchAction extends AnalyzeBatchActionCommon, EntityRecognitionAction { /** * The kind of the action. */ kind: "EntityRecognition"; } /** * The result of an entity recognition batch action. */ export declare type EntityRecognitionBatchResult = ActionMetadata & BatchActionResult<EntityRecognitionResult, "EntityRecognition">; /** * An error result from an entity recognition action on a single document. */ export declare type EntityRecognitionErrorResult = TextAnalysisErrorResult; /** * The result of an entity recognition action on a single document. */ export declare type EntityRecognitionResult = EntityRecognitionSuccessResult | EntityRecognitionErrorResult; /** * The result of an entity recognition action on a single document, containing * a collection of {@link Entity} objects identified in that document. */ export declare interface EntityRecognitionSuccessResult extends TextAnalysisSuccessResult { /** * The collection of entities identified in the input document. */ readonly entities: Entity[]; } /** Supported parameters for an Extractive Summarization task. */ export declare interface ExtractiveSummarizationAction extends ActionPrebuilt { /** The max number of sentences to be part of the summary. */ maxSentenceCount?: number; /** The sorting criteria to use for the results of Extractive Summarization. */ orderBy?: ExtractiveSummarizationOrderingCriteria; /** * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}. * * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** Options for an extractive summarization batch action. */ export declare interface ExtractiveSummarizationBatchAction extends AnalyzeBatchActionCommon, ExtractiveSummarizationAction { /** * The kind of the action. */ kind: "ExtractiveSummarization"; } /** * The result of an extractive summarization batch action. */ export declare type ExtractiveSummarizationBatchResult = ActionMetadata & BatchActionResult<ExtractiveSummarizationResult, "ExtractiveSummarization">; /** * An error result from the extractive summarization action on a single document. */ export declare type ExtractiveSummarizationErrorResult = TextAnalysisErrorResult; /** * Defines values for ExtractiveSummarizationOrderingCriteria. \ * {@link KnownExtractiveSummarizationOrderingCriteria} can be used interchangeably with ExtractiveSummarizationOrderingCriteria, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Offset**: Indicates that results should be sorted in order of appearance in the text. \ * **Rank**: Indicates that results should be sorted in order of importance (i.e. rank score) according to the model. */ export declare type ExtractiveSummarizationOrderingCriteria = string; /** * The result of the extractive summarization action on a single document. */ export declare type ExtractiveSummarizationResult = ExtractiveSummarizationSuccessResult | ExtractiveSummarizationErrorResult; /** * The result of the extractive summarization action on a single document, * containing a collection of the summary identified in that document. */ export declare interface ExtractiveSummarizationSuccessResult extends TextAnalysisSuccessResult { /** * A list of sentences composing a summary of the input document. */ readonly sentences: SummarySentence[]; } /** Supported parameters for a Healthcare task. */ export declare interface HealthcareAction extends ActionPrebuilt { /** * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}. * * The default is the JavaScript's default which is "Utf16CodeUnit". */ stringIndexType?: StringIndexType; } /** An object that describes metadata about the healthcare entity such as whether it is hypothetical or conditional. */ export declare interface HealthcareAssertion { /** 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; } /** Options for a healthcare batch action. */ export declare interface HealthcareBatchAction extends AnalyzeBatchActionCommon, HealthcareAction { /** * The kind of the action. */ kind: "Healthcare"; } /** * The result of a healthcare batch action. */ export declare type HealthcareBatchResult = ActionMetadata & BatchActionResult<HealthcareResult, "Healthcare">; /** * 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". */ readonly normalizedText?: string; /** * Whether the entity is negated. */ readonly assertion?: HealthcareAssertion; /** * Entity references in known data sources. */ readonly 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** */ readonly 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 * **BodyStructure** \ * **Age** \ * **Gender** \ * **Ethnicity** \ * **ExaminationName** \ * **Date** \ * **Direction** \ * **Frequency** \ * **MeasurementValue** \ * **MeasurementUnit** \ * **RelationalOperator** \ * **Time** \ * **Course** \ * **GeneOrProtein** \ * **Variant** \ * **Expression** \ * **MutationType** \ * **AdministrativeEvent** \ * **CareEnvironment** \ * **HealthcareProfession** \ * **Diagnosis** \ * **SymptomOrSign** \ * **ConditionQualifier** \ * **ConditionScale** \ * **MedicationClass** \ * **MedicationName** \ * **Dosage** \ * **MedicationForm** \ * **MedicationRoute** \ * **FamilyRelation** \ * **TreatmentName** \ * **Allergen** \ * **Employment** \ * **LivingStatus** \ * **SubstanceUse** \ * **SubstanceUseAmount** */ export declare type HealthcareEntityCategory = string; /** * A relationship between two or more healthcare entities. */ export declare interface HealthcareEntityRelation { /** * The type of the healthcare relation. */ readonly relationType: RelationType; /** * The list of healthcare entities and their roles in the healthcare relation. */ readonly roles: HealthcareEntityRelationRole[]; /** * The confidence score between 0 and 1 of the extracted relation. */ readonly confidenceScore?: number; } /** * A healthcare entity that plays a specific role in a relation. */ export declare interface HealthcareEntityRelationRole { /** * A healthcare entity */ readonly entity: HealthcareEntity; /** * The role of the healthcare entity in a particular relation. */ readonly name: HealthcareEntityRelationRoleType; } /** * The type of different roles a healthcare entity can play in a relation. */ export declare type HealthcareEntityRelationRoleType = string; /** * An error result from the healthcare analysis action on a single document. */ export declare type HealthcareErrorResult = TextAnalysisErrorResult; /** * The result of the healthcare analysis action on a single document. */ export declare type HealthcareResult = HealthcareSuccessResult | HealthcareErrorResult; /** * The results of a successful healthcare analysis action for a single document. */ export declare interface HealthcareSuccessResult extends TextAnalysisSuccessResult { /** * Healthcare entities. */ readonly entities: HealthcareEntity[]; /** * Relations between healthcare entities. */ readonly entityRelations: HealthcareEntityRelation[]; } /** Options for a key phrase recognition action. */ export declare interface KeyPhraseExtractionAction extends ActionPrebuilt { } /** Options for an key phrase extraction batch action. */ export declare interface KeyPhraseExtractionBatchAction extends AnalyzeBatchActionCommon, KeyPhraseExtractionAction { /** * The kind of the action. */ kind: "KeyPhraseExtraction"; } /** * The result of a key phrase extraction batch action. */ export declare type KeyPhraseExtractionBatchResult = ActionMetadata & BatchActionResult<KeyPhraseExtractionResult, "KeyPhraseExtraction">; /** * An error result from a key phrase extraction action on a single document. */ export declare type KeyPhraseExtractionErrorResult = TextAnalysisErrorResult; /** * The result of a sentiment analysis action on a single document. */ export declare type KeyPhraseExtractionResult = KeyPhraseExtractionSuccessResult | KeyPhraseExtractionErrorResult; /** * The result of a key phrase extraction action on a single document, * containing a collection of the key phrases identified in that document. */ export declare interface KeyPhraseExtractionSuccessResult extends TextAnalysisSuccessResult { /** * A list of representative words or phrases. The number of key phrases * returned is proportional to the number of words in the input document. */ readonly keyPhrases: string[]; } /** Known values of {@link ErrorCode} that the service accepts. */ export declare enum KnownErrorCode { /** InvalidRequest */ InvalidRequest = "InvalidRequest", /** InvalidArgument */ InvalidArgument = "InvalidArgument", /** Unauthorized */ Unauthorized = "Unauthorized", /** Forbidden */ Forbidden = "Forbidden", /** NotFound */ NotFound = "NotFound", /** ProjectNotFound */ ProjectNotFound = "ProjectNotFound", /** OperationNotFound */ OperationNotFound = "OperationNotFound", /** AzureCognitiveSearchNotFound */ AzureCognitiveSearchNotFound = "AzureCognitiveSearchNotFound", /** AzureCognitiveSearchIndexNotFound */ AzureCognitiveSearchIndexNotFound = "AzureCognitiveSearchIndexNotFound", /** TooManyRequests */ TooManyRequests = "TooManyRequests", /** AzureCognitiveSearchThrottling */ AzureCognitiveSearchThrottling = "AzureCognitiveSearchThrottling", /** AzureCognitiveSearchIndexLimitReached */ AzureCognitiveSearchIndexLimitReached = "AzureCognitiveSearchIndexLimitReached", /** InternalServerError */ InternalServerError = "InternalServerError", /** ServiceUnavailable */ ServiceUnavailable = "ServiceUnavailable", /** Timeout */ Timeout = "Timeout", /** QuotaExceeded */ QuotaExceeded = "QuotaExceeded", /** Conflict */ Conflict = "Conflict", /** Warning */ Warning = "Warning" } /** Known values of {@link ExtractiveSummarizationOrderingCriteria} that the service accepts. */ export declare enum KnownExtractiveSummarizationOrderingCriteria { /** Indicates that results should be sorted in order of appearance in the text. */ Offset = "Offset", /** Indicates that results should be sorted in order of importance (i.e. rank score) according to the model. */ Rank = "Rank" } /** Known values of {@link HealthcareEntityCategory} that the service accepts. */ export declare enum KnownHealthcareEntityCategory { /** BodyStructure */ BodyStructure = "BodyStructure", /** Age */ Age = "Age", /** Gender */ Gender = "Gender", /** Ethnicity */ Ethnicity = "Ethnicity", /** ExaminationName */ ExaminationName = "ExaminationName", /** Date */ Date = "Date", /** Direction */ Direction = "Direction", /** Frequency */ Frequency = "Frequency", /** MeasurementValue */ MeasurementValue = "MeasurementValue", /** MeasurementUnit */ MeasurementUnit = "MeasurementUnit", /** RelationalOperator */ RelationalOperator = "RelationalOperator", /** Time */ Time = "Time", /** Course */ Course = "Course", /** GeneOrProtein */ GeneOrProtein = "GeneOrProtein", /** Variant */ Variant = "Variant", /** Expression */ Expression = "Expression", /** MutationType */ MutationType = "MutationType", /** AdministrativeEvent */ AdministrativeEvent = "AdministrativeEvent", /** CareEnvironment */ CareEnvironment = "CareEnvironment", /** HealthcareProfession */ HealthcareProfession = "HealthcareProfession", /** Diagnosis */ Diagnosis = "Diagnosis", /** SymptomOrSign */ SymptomOrSign = "SymptomOrSign", /** ConditionQualifier */ ConditionQualifier = "ConditionQualifier", /** ConditionScale */ ConditionScale = "ConditionScale", /** MedicationClass */ MedicationClass = "MedicationClass", /** MedicationName */ MedicationName = "MedicationName", /** Dosage */ Dosage = "Dosage", /** MedicationForm */ MedicationForm = "MedicationForm", /** MedicationRoute */ MedicationRoute = "MedicationRoute", /** FamilyRelation */ FamilyRelation = "FamilyRelation", /** TreatmentName */ TreatmentName = "TreatmentName", /** Allergen */ Allergen = "Allergen", /** Employment */ Employment = "Employment", /** LivingStatus */ LivingStatus = "LivingStatus", /** SubstanceUse */ SubstanceUse = "SubstanceUse", /** SubstanceUseAmount */ SubstanceUseAmount = "SubstanceUseAmount" } /** Known values of {@link InnerErrorCode} that the service accepts. */ export declare enum KnownInnerErrorCode { /** InvalidRequest */ InvalidRequest = "InvalidRequest", /** InvalidParameterValue */ InvalidParameterValue = "InvalidParameterValue", /** KnowledgeBaseNotFound */ KnowledgeBaseNotFound = "KnowledgeBaseNotFound", /** AzureCognitiveSearchNotFound */ AzureCognitiveSearchNotFound = "AzureCognitiveSearchNotFound", /** AzureCognitiveSearchThrottling */ AzureCognitiveSearchThrottling = "AzureCognitiveSearchThrottling", /** ExtractionFailure */ ExtractionFailure = "ExtractionFailure", /** InvalidRequestBodyFormat */ InvalidRequestBodyFormat = "InvalidRequestBodyFormat", /** EmptyRequest */ EmptyRequest = "EmptyRequest", /** MissingInputDocuments */ MissingInputDocuments = "MissingInputDocuments", /** InvalidDocument */ InvalidDocument = "InvalidDocument", /** ModelVersionIncorrect */ ModelVersionIncorrect = "ModelVersionIncorrect", /** InvalidDocumentBatch */ InvalidDocumentBatch = "InvalidDocumentBatch", /** UnsupportedLanguageCode */ UnsupportedLanguageCode = "UnsupportedLanguageCode", /** InvalidCountryHint */ InvalidCountryHint = "InvalidCountryHint" } /** Known values of {@link PiiEntityCategory} that the service accepts. */ export declare enum KnownPiiEntityCategory { /** ABARoutingNumber */ ABARoutingNumber = "ABARoutingNumber", /** ARNationalIdentityNumber */ ARNationalIdentityNumber = "ARNationalIdentityNumber", /** AUBankAccountNumber */ AUBankAccountNumber = "AUBankAccountNumber", /** AUDriversLicenseNumber */ AUDriversLicenseNumber = "AUDriversLicenseNumber", /** AUMedicalAccountNumber */ AUMedicalAccountNumber = "AUMedicalAccountNumber", /** AUPassportNumber */ AUPassportNumber = "AUPassportNumber", /** AUTaxFileNumber */ AUTaxFileNumber = "AUTaxFileNumber", /** AUBusinessNumber */ AUBusinessNumber = "AUBusinessNumber", /** AUCompanyNumber */ AUCompanyNumber = "AUCompanyNumber", /** ATIdentityCard */ ATIdentityCard = "ATIdentityCard", /** ATTaxIdentificationNumber */ ATTaxIdentificationNumber = "ATTaxIdentificationNumber", /** ATValueAddedTaxNumber */ ATValueAddedTaxNumber = "ATValueAddedTaxNumber", /** AzureDocumentDBAuthKey */ AzureDocumentDBAuthKey = "AzureDocumentDBAuthKey", /** AzureIaasDatabaseConnectionAndSQLString */ AzureIaasDatabaseConnectionAndSQLString = "AzureIAASDatabaseConnectionAndSQLString", /** AzureIoTConnectionString */ AzureIoTConnectionString = "AzureIoTConnectionString", /** AzurePublishSettingPassword */ AzurePublishSettingPassword = "AzurePublishSettingPassword", /** AzureRedisCacheString */ AzureRedisCacheString = "AzureRedisCacheString", /** AzureSAS */ AzureSAS = "AzureSAS", /** AzureServiceBusString */ AzureServiceBusString = "AzureServiceBusString", /** AzureStorageAccountKey */ AzureStorageAccountKey = "AzureStorageAccountKey", /** AzureStorageAccountGeneric */ AzureStorageAccountGeneric = "AzureStorageAccountGeneric", /** BENationalNumber */ BENationalNumber = "BENationalNumber", /** BENationalNumberV2 */ BENationalNumberV2 = "BENationalNumberV2", /** BEValueAddedTaxNumber */ BEValueAddedTaxNumber = "BEValueAddedTaxNumber", /** BrcpfNumber */ BrcpfNumber = "BRCPFNumber", /** BRLegalEntityNumber */ BRLegalEntityNumber = "BRLegalEntityNumber", /** BRNationalIdrg */ BRNationalIdrg = "BRNationalIDRG", /** BGUniformCivilNumber */ BGUniformCivilNumber = "BGUniformCivilNumber", /** CABankAccountNumber */ CABankAccountNumber = "CABankAccountNumber", /** CADriversLicenseNumber */ CADriversLicenseNumber = "CADriversLicenseNumber", /** CAHealthServiceNumber */ CAHealthServiceNumber = "CAHealthServiceNumber", /** CAPassportNumber */ CAPassportNumber = "CAPassportNumber", /** CAPersonalHealthIdentification */ CAPersonalHealthIdentification = "CAPersonalHealthIdentification", /** CASocialInsuranceNumber */ CASocialInsuranceNumber = "CASocialInsuranceNumber", /** CLIdentityCardNumber */ CLIdentityCardNumber = "CLIdentityCardNumber", /** CNResidentIdentityCardNumber */ CNResidentIdentityCardNumber = "CNResidentIdentityCardNumber", /** CreditCardNumber */ CreditCardNumber = "CreditCardNumber", /** HRIdentityCardNumber */ HRIdentityCardNumber = "HRIdentityCardNumber", /** HRNationalIDNumber */ HRNationalIDNumber = "HRNationalIDNumber", /** HRPersonalIdentificationNumber */ HRPersonalIdentificationNumber = "HRPersonalIdentificationNumber", /** HRPersonalIdentificationOIBNumberV2 */ HRPersonalIdentificationOIBNumberV2 = "HRPersonalIdentificationOIBNumberV2", /** CYIdentityCard */ CYIdentityCard = "CYIdentityCard", /** CYTaxIdentificationNumber */ CYTaxIdentificationNumber = "CYTaxIdentificationNumber", /** CZPersonalIdentityNumber */ CZPersonalIdentityNumber = "CZPersonalIdentityNumber", /** CZPersonalIdentityV2 */ CZPersonalIdentityV2 = "CZPersonalIdentityV2", /** DKPersonalIdentificationNumber */ DKPersonalIdentificationNumber = "DKPersonalIdentificationNumber", /** DKPersonalIdentificationV2 */ DKPersonalIdentificationV2 = "DKPersonalIdentificationV2", /** DrugEnforcementAgencyNumber */ DrugEnforcementAgencyNumber = "DrugEnforcementAgencyNumber", /** EEPersonalIdentificationCode */ EEPersonalIdentificationCode = "EEPersonalIdentificationCode", /** EUDebitCardNumber */ EUDebitCardNumber = "EUDebitCardNumber", /** EUDriversLicenseNumber */ EUDriversLicenseNumber = "EUDriversLicenseNumber", /** EugpsCoordinates */ EugpsCoordinates = "EUGPSCoordinates", /** EUNationalIdentificationNumber */ EUNationalIdentificationNumber = "EUNationalIdentificationNumber", /** EUPassportNumber */ EUPassportNumber = "EUPassportNumber", /** EUSocialSecurityNumber */ EUSocialSecurityNumber = "EUSocialSecurityNumber", /** EUTaxIdentificationNumber */ EUTaxIdentificationNumber = "EUTaxIdentificationNumber", /** FIEuropeanHealthNumber */ FIEuropeanHealthNumber = "FIEuropeanHealthNumber", /** FINationalID */ FINationalID = "FINationalID", /** FINationalIDV2 */ FINationalIDV2 = "FINationalIDV2", /** FIPassportNumber */ FIPassportNumber = "FIPassportNumber", /** FRDriversLicenseNumber */ FRDriversLicenseNumber = "FRDriversLicenseNumber", /** FRHealthInsuranceNumber */ FRHealthInsuranceNumber = "FRHealthInsuranceNumber", /** FRNationalID */ FRNationalID = "FRNationalID", /** FRPassportNumber */ FRPassportNumber = "FRPassportNumber", /** FRSocialSecurityNumber */ FRSocialSecurityNumber = "FRSocialSecurityNumber", /** FRTaxIdentificationNumber */ FRTaxIdentificationNumber = "FRTaxIdentificationNumber", /** FRValueAddedTaxNumber */ FRValueAddedTaxNumber = "FRValueAddedTaxNumber", /** DEDriversLicenseNumber */ DEDriversLicenseNumber = "DEDriversLicenseNumber", /** DEPassportNumber */ DEPassportNumber = "DEPassportNumber", /** DEIdentityCardNumber */ DEIdentityCardNumber = "DEIdentityCardNumber", /** DETaxIdentificationNumber */ DETaxIdentificationNumber = "DETaxIdentificationNumber", /** DEValueAddedNumber */ DEValueAddedNumber = "DEValueAddedNumber", /** GRNationalIDCard */ GRNationalIDCard = "GRNationalIDCard", /** GRNationalIDV2 */ GRNationalIDV2 = "GRNationalIDV2", /** GRTaxIdentificationNumber */ GRTaxIdentificationNumber = "GRTaxIdentificationNumber", /** HKIdentityCardNumber */ HKIdentityCardNumber = "HKIdentityCardNumber", /** HUValueAddedNumber */ HUValueAddedNumber = "HUValueAddedNumber", /** HUPersonalIdentificationNumber */ HUPersonalIdentificationNumber = "HUPersonalIdentificationNumber", /** HUTaxIdentificationNumber */ HUTaxIdentificationNumber = "HUTaxIdentificationNumber", /** INPermanentAccount */ INPermanentAccount = "INPermanentAccount", /** INUniqueIdentificationNumber */ INUniqueIdentificationNumber = "INUniqueIdentificationNumber", /** IDIdentityCardNumber */ IDIdentityCardNumber = "IDIdentityCardNumber", /** InternationalBankingAccountNumber */ InternationalBankingAccountNumber = "InternationalBankingAccountNumber", /** IEPersonalPublicServiceNumber */ IEPersonalPublicServiceNumber = "IEPersonalPublicServiceNumber", /** IEPersonalPublicServiceNumberV2 */ IEPersonalPublicServiceNumberV2 = "IEPersonalPublicServiceNumberV2", /** ILBankAccountNumber */ ILBankAccountNumber = "ILBankAccountNumber", /** ILNationalID */ ILNationalID = "ILNationalID", /** ITDriversLicenseNumber */ ITDriversLicenseNumber = "ITDriversLicenseNumber", /** ITFiscalCode */ ITFiscalCode = "ITFiscalCode", /** ITValueAddedTaxNumber */ ITValueAddedTaxNumber = "ITValueAddedTaxNumber", /** JPBankAccountNumber */ JPBankAccountNumber = "JPBankAccountNumber", /** JPDriversLicenseNumber */ JPDriversLicenseNumber = "JPDriversLicenseNumber", /** JPPassportNumber */ JPPassportNumber = "JPPassportNumber", /** JPResidentRegistrationNumber */ JPResidentRegistrationNumber = "JPResidentRegistrationNumber", /** JPSocialInsuranceNumber */ JPSocialInsuranceNumber = "JPSocialInsuranceNumber", /** JPMyNumberCorporate */ JPMyNumberCorporate = "JPMyNumberCorporate", /** JPMyNumberPersonal */ JPMyNumberPersonal = "JPMyNumberPersonal", /** JPResidenceCardNumber */ JPResidenceCardNumber = "JPResidenceCardNumber", /** LVPersonalCode */ LVPersonalCode = "LVPersonalCode", /** LTPersonalCode */ LTPersonalCode = "LTPersonalCode", /** LUNationalIdentificationNumberNatural */ LUNationalIdentificationNumberNatural = "LUNationalIdentificationNumberNatural", /** LUNationalIdentificationNumberNonNatural */ LUNationalIdentificationNumberNonNatural = "LUNationalIdentificationNumberNonNatural", /** MYIdentityCardNumber */ MYIdentityCardNumber = "MYIdentityCardNumber", /** MTIdentityCardNumber */ MTIdentityCardNumber = "MTIdentityCardNumber", /** MTTaxIDNumber */ MTTaxIDNumber = "MTTaxIDNumber", /** NLCitizensServiceNumber */ NLCitizensServiceNumber = "NLCitizensServiceNumber", /** NLCitizensServiceNumberV2 */ NLCitizensServiceNumberV2 = "NLCitizensServiceNumberV2", /** NLTaxIdentificationNumber */ NLTaxIdentificationNumber = "NLTaxIdentificationNumber", /** NLValueAddedTaxNumber */ NLValueAddedTaxNumber = "NLValueAddedTaxNumber", /** NZBankAccountNumber */ NZBankAccountNumber = "NZBankAccountNumber", /** NZDriversLicenseNumber */ NZDriversLicenseNumber = "NZDriversLicenseNumber", /** NZInlandRevenueNumber */ NZInlandRevenueNumber = "NZInlandRevenueNumber", /** NZMinistryOfHealthNumber */ NZMinistryOfHealthNumber = "NZMinistryOfHealthNumber", /** NZSocialWelfareNumber */ NZSocialWelfareNumber = "NZSocialWelfareNumber", /** NOIdentityNumber */ NOIdentityNumber = "NOIdentityNumber", /** PHUnifiedMultiPurposeIDNumber */ PHUnifiedMultiPurposeIDNumber = "PHUnifiedMultiPurposeIDNumber", /** PLIdentityCard */ PLIdentityCard = "PLIdentityCard", /** PLNationalID */ PLNationalID = "PLNationalID", /** PLNationalIDV2 */ PLNationalIDV2 = "PLNationalIDV2", /** PLPassportNumber */ PLPassportNumber = "PLPassportNumber", /** PLTaxIdentificationNumber */ PLTaxIdentificationNumber = "PLTaxIdentificationNumber", /** PlregonNumber */ PlregonNumber = "PLREGONNumber", /** PTCitizenCardNumber */ PTCitizenCardNumber = "PTCitizenCardNumber", /** PTCitizenCardNumberV2 */ PTCitizenCardNumberV2 = "PTCitizenCardNumberV2", /** PTTaxIdentificationNumber */ PTTaxIdentificationNumber = "PTTaxIdentificationNumber", /** ROPersonalNumericalCode */ ROPersonalNumericalCode = "ROPersonalNumericalCode", /** RUPassportNumberDomestic */ RUPassportNumberDomestic = "RUPassportNumberDomestic", /** RUPassportNumberInternational */ RUPassportNumberInternational = "RUPassportNumberInternational