Package 'languagelayeR'

Title: Access the 'languagelayer' API
Description: Improve your text analysis with languagelayer <https://languagelayer.com>, a powerful language detection API.
Authors: Colin FAY [aut, cre]
Maintainer: Colin FAY <[email protected]>
License: MIT + file LICENSE
Version: 1.2.4
Built: 2024-11-03 03:50:12 UTC
Source: https://github.com/colinfay/languagelayer

Help Index


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").