| Title: | A Multilingual Glossary |
|---|---|
| Description: | A glossary of data science terms in multiple languages and usable from multiple languages. |
| Authors: | Greg Wilson [aut, cre] (ORCID: <https://orcid.org/0000-0001-8659-8979>), Francois Michonneau [aut] (ORCID: <https://orcid.org/0000-0002-9092-966X>), Ian Flores Siaca [aut] (ORCID: <https://orcid.org/0000-0002-7573-0708>), Zhian N. Kamvar [aut] (ORCID: <https://orcid.org/0000-0003-1458-7108>) |
| Maintainer: | Greg Wilson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2 |
| Built: | 2026-05-18 05:54:49 UTC |
| Source: | https://github.com/carpentries/glosario-r |
glosario provides the infrastructure to create and read multilingual
glossaries. By default, glosario providesaccess to a community-curated
glossary hosted by The Carpentries.
Look up definition of term.
define(key, lang = "en", glossary = NULL, show_lang = FALSE)define(key, lang = "en", glossary = NULL, show_lang = FALSE)
key |
lookup key |
lang |
language for the definition |
glossary |
a glossary object |
show_lang |
should the ISO639-1 2-letter code be displayed with the definition? |
string containing definition
Generate anchor tag for a given term in HTML
gdef(term, text)gdef(term, text)
term |
Look-up key |
text |
Text to display |
string containing link
Retrive a YAML-formatted glossary from the web or locally.
get_glossary( url = "https://raw.githubusercontent.com/carpentries/glosario/master/glossary.yml", cache = tempdir() )get_glossary( url = "https://raw.githubusercontent.com/carpentries/glosario/master/glossary.yml", cache = tempdir() )
url |
the url, path for the glossary or the OWNER/REPO for a GitHub repository that hosts a glossary. |
cache |
the local path to cache the glossary (default: |
The specification of the file is available from https://github.com/carpentries/glosario/#readme
If <OWNER/REPO> is provided to the url argument, the successful
conversion into an URL that will resolve to a glossary assumes that the
glossary is called glossary.yml in the repository and it lives in the
branch master.x
a glossary (as an R6 object)
A dataset of the ISO 639-1 and ISO 639-2 language codes and their names in English, French, and German.
iso639iso639
A tibble with 507 rows and 7 columns:
iso639_1 the 2-letter code for the language
iso639_2 the 3-letter code for the language (the content of this column
is the same as the column iso639_2_terminology)
iso639_2_bibliography the 3-letter code for the language using the
"Bibliographic version" (also known as ISO639-2/B).
iso639_2_terminology the 3-letter code for the language using the
"Terminology version" (also known as ISO639-2/T).
english_name the English name of the language
french_name the French name for the language
german_name the German name for the language
There are 21 languages that have different codes in the ISO639-2/B and
ISO639-2/T codes. In general the T codes are prefered and the B codes
are provided for compatibility.
http://www.loc.gov/standards/iso639-2/php/code_list.php retrieved on 2020-06-19
List all the glosario terms in an RMd
list_glosario_terms(title = NULL, type = "definitions")list_glosario_terms(title = NULL, type = "definitions")
title |
The table title |
type |
One of 'definitions' or 'reqs' |
Validate Documents using Glosario Definitions
validate_document(file_path)validate_document(file_path)
file_path |
path to the file to be validated |
In case the document is not valid the function will return a warning for each term not defined and raise a final error listing the total number of terms not matched.