This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const P1 = [ | |
[0, 1, 1, 1], | |
[1, 1, 1, 0], | |
[1, 0, 0, 1], | |
[0, 1, 1, 1], | |
[1, 1, 1, 0], | |
[1, 0, 0, 1], | |
[0, 1, 1, 1], | |
[1, 1, 1, 0], | |
[1, 0, 0, 1], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources: | |
Resources: | |
DataLakeBucket: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: ${self:custom.dataLakeBucketName} | |
GlueDataLake: | |
Type: AWS::Glue::Database | |
Properties: | |
CatalogId: ${self:provider.environment.AWS_ACCOUNT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ComprehendClient, DetectDominantLanguageCommand, DetectEntitiesCommand } from '@aws-sdk/client-comprehend'; | |
import { Comprehend } from 'aws-sdk'; | |
const comprehendClientv3 = new ComprehendClient(Container.get(ConfigurationProviderService).comprehend); | |
const comprehendClientv2 = new Comprehend(Container.get(ConfigurationProviderService).comprehend); | |
const text = 'Bob lives in Seattle. He is a software engineer at Amazon.'; //the example text from aws docs | |
try{ | |
const result = await this.comprehendClientv2.detectDominantLanguage({Text: text}).promise(); | |
console.log('result v2', result); |