UNPKG

@azure/ai-text-analytics

Version:
17 lines 646 B
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { makeTextAnalyticsSuccessResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult"; /** * @internal */ export function makeDetectLanguageResult(response) { const { id, warnings, statistics, detectedLanguage } = response; return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { primaryLanguage: detectedLanguage }); } /** * @internal */ export function makeDetectLanguageErrorResult(id, error) { return makeTextAnalyticsErrorResult(id, error); } //# sourceMappingURL=detectLanguageResult.js.map