{"id":28387855,"url":"https://github.com/cloudyr/aws.comprehend","last_synced_at":"2025-10-09T15:13:28.454Z","repository":{"id":56936460,"uuid":"124287441","full_name":"cloudyr/aws.comprehend","owner":"cloudyr","description":"AWS Comprehend Client","archived":false,"fork":false,"pushed_at":"2023-05-31T17:07:53.000Z","size":113,"stargazers_count":12,"open_issues_count":7,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-02T14:20:15.553Z","etag":null,"topics":["aws","aws-comprehend","cloudyr","nlp","r","r-package"],"latest_commit_sha":null,"homepage":"https://cran.r-project.org/package=aws.comprehend","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudyr.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-07T19:59:01.000Z","updated_at":"2024-02-19T05:52:43.000Z","dependencies_parsed_at":"2022-08-21T06:20:46.292Z","dependency_job_id":null,"html_url":"https://github.com/cloudyr/aws.comprehend","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cloudyr/aws.comprehend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyr%2Faws.comprehend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyr%2Faws.comprehend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyr%2Faws.comprehend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyr%2Faws.comprehend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudyr","download_url":"https://codeload.github.com/cloudyr/aws.comprehend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudyr%2Faws.comprehend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276538247,"owners_count":25659930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-comprehend","cloudyr","nlp","r","r-package"],"created_at":"2025-05-30T19:35:49.335Z","updated_at":"2025-09-23T07:34:48.077Z","avatar_url":"https://github.com/cloudyr.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Comprehend Client Package\n\n\n[![CRAN](https://www.r-pkg.org/badges/version/aws.comprehend)](https://cran.r-project.org/package=aws.comprehend)\n![Downloads](https://cranlogs.r-pkg.org/badges/aws.comprehend)\n[![Travis Build Status](https://travis-ci.org/cloudyr/aws.comprehend.png?branch=master)](https://travis-ci.org/cloudyr/aws.comprehend)\n[![codecov.io](https://codecov.io/github/cloudyr/aws.comprehend/coverage.svg?branch=master)](https://codecov.io/github/cloudyr/aws.comprehend?branch=master)\n\n\n**aws.comprehend** is a package for natural language processing.\n\n## Code Examples\n\n\nAll of the functions (except `detect_medical_*`) accept either a single character string or a character vector. Note that AWS currently limits batch queries to 25 documents, so character vectors should have 25 elements maximum.\n\nThe default language is English (`\"en\"`) but this is easily changed using the `language` argument.\n\n\n```{r set-options, echo=FALSE, cache=FALSE}\n# to prevent data.frame wrapping in the outputs below\noptions(width = 150)\n```\n\n### Sentiment analysis\n\n```{r}\nlibrary(\"aws.comprehend\")\n\ndetect_sentiment(\"I have never been happier. This is the best day ever.\")\n\n# Sentiment analysis in Spanish\ndetect_sentiment(\"¡Hoy estoy feliz!\", language = \"es\")\n```\n\n### Language detection\n\n```{r}\n# simple language detection\ndetect_language(\"This is a test sentence in English\")\n\n# multi-lingual language detection\ndetect_language(\"A: ¡Hola! ¿Como está, usted? B: Bien, merci. Et toi?\")\n```\n\n### Named Entity Recognition\n\n```{r}\ntxt \u003c- c(\"Amazon provides web services.\", \"Jeff is their leader.\")\ndetect_entities(txt)\n```\n\n### Key Phrase Detection\n\n```{r}\ntxt \u003c- c(\"Amazon provides web services.\", \"Jeff is their leader.\")\ndetect_phrases(txt)\n```\n\n### Syntax Analysis\n\n```{r}\ndetect_syntax(\"The quick fox jumps over the lazy dog.\")\n```\n\n### Medical Entity and Personal Health Information (PHI) Detection\n\n```{r}\n# medical entity detection\nmedical_txt \u003c- \"Pt is 40yo mother, highschool teacher. HPI : Sleeping trouble on present dosage of Clonidine.\"\ndetect_medical_entities(medical_txt)\n\n# Protected Health Information (PHI) detection\ndetect_medical_phi(medical_txt)\n```\n\n\n## Setting up credentials\n\nTo use the package, you will need an AWS account and to enter your credentials into R. Your keypair can be generated on the [IAM Management Console](https://aws.amazon.com/) under the heading *Access Keys*. Note that you only have access to your secret key once. After it is generated, you need to save it in a secure location. New keypairs can be generated at any time if yours has been lost, stolen, or forgotten. The [**aws.iam** package](https://github.com/cloudyr/aws.iam) profiles tools for working with IAM, including creating roles, users, groups, and credentials programmatically; it is not needed to *use* IAM credentials.\n\nA detailed description of how credentials can be specified is provided at: https://github.com/cloudyr/aws.signature/. The easiest way is to simply set environment variables on the command line prior to starting R or via an `Renviron.site` or `.Renviron` file, which are used to set environment variables in R during startup (see `? Startup`). They can be also set within R:\n\n```R\nSys.setenv(\"AWS_ACCESS_KEY_ID\" = \"mykey\",\n           \"AWS_SECRET_ACCESS_KEY\" = \"mysecretkey\",\n           \"AWS_DEFAULT_REGION\" = \"us-east-1\",\n           \"AWS_SESSION_TOKEN\" = \"mytoken\")\n```\n\n\n## Installation\n\nYou can install this package from CRAN or, to install the latest development version, from the cloudyr drat repository:\n\n```R\n# Install from CRAN\ninstall.packages(\"aws.comprehend\")\n\n# Latest version passing CI tests, from drat repo\ninstall.packages(\"aws.comprehend\", repos = c(getOption(\"repos\"), \"http://cloudyr.github.io/drat\"))\n```\n\nYou can also pull a potentially unstable version directly from GitHub, using the `remotes` package:\n\n```R\nremotes::install_github(\"cloudyr/aws.comprehend\")\n```\n\n\n---\n[![cloudyr project logo](https://i.imgur.com/JHS98Y7.png)](https://github.com/cloudyr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudyr%2Faws.comprehend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudyr%2Faws.comprehend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudyr%2Faws.comprehend/lists"}