Introduction to Linguee API"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)

Introduction

The polyglotr package provides convenient functions to access the Linguee API and retrieve translations, examples, and external sources. This vignette demonstrates the usage of three key functions: linguee_external_sources(), linguee_translation_examples(), and linguee_word_translation().

library(polyglotr)

External Sources

The linguee_external_sources() function retrieves external sources using the Linguee Translation API. Here's an example usage:

external_sources <- linguee_external_sources("hello", src = "en", dst = "de")

print(external_sources)

Translation Examples

The linguee_translation_examples() function provides translation examples using the Linguee Translation API. Here's an example usage:

translation_examples <- linguee_translation_examples("hello", src = "en", dst = "de")

print(translation_examples)

Word Translation

The linguee_word_translation() function translates a word using the Linguee Translation API. Here's an example usage:

word_translation <- linguee_word_translation("hello", source_language = "en", target_language = "de")

print(word_translation)


Try the polyglotr package in your browser

Any scripts or data that you put into this service are public.

polyglotr documentation built on Sept. 11, 2024, 6:35 p.m.