The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: Access the 'languagelayer' API
Version: 1.2.4
Maintainer: Colin FAY <contact@colinfay.me>
Description: Improve your text analysis with languagelayer https://languagelayer.com, a powerful language detection API.
URL: https://github.com/ColinFay/languagelayer
BugReports: https://github.com/ColinFay/languagelayer/issues
License: MIT + file LICENSE
LazyData: TRUE
Imports: httr, jsonlite, attempt, curl, utils
RoxygenNote: 6.1.0
Suggests: testthat, knitr, rmarkdown, covr
ByteCompile: true
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2019-02-12 08:13:43 UTC; colin
Author: Colin FAY [aut, cre]
Repository: CRAN
Date/Publication: 2019-02-12 10:03:19 UTC

Get language

Description

Detect language from a character string.

Usage

get_lang(query, api_key = NULL)

Arguments

query

the character string you want to detect the language from.

api_key

your API key.

Details

Takes a character string, returns a data.frame with the available values.

Value

Returns a data.frame with the detected languages, in descending order of probability. Values are : language_code, language_name, probability (length of the provided query text and how well it is identified as a language), percentage (confidence margin between multiple matches), and reliable_result (whether or not the API is completely confident about the main match).

Note

Before running a function of this package for the first time, you need to get your API key.

Examples

## Not run: 
get_lang(query = "I really really love R and that's a good thing, right?", api_key = "apikey")

## End(Not run)

Get supported languages

Description

Get all current available languages on the languagelayer API.

Usage

get_supported_lang(api_key = NULL)

Arguments

api_key

Your API key.

Details

Returns a data.frame with the available languages.

Value

Returns a data.frame with language_code and language_name.

Note

Before running a function of this package for the first time, you need to get your API key.

Examples

## Not run: 
get_supported_lang(api_key = "yourapikey")

## End(Not run)

languagelayeR

Description

Access the 'languagelayer' API.

Details

For more info browseVignettes("languagelayeR").

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.