Learn R Programming

arealDB (version 0.3.9)

translateTerms: Translate terms

Description

Translate terms based on fuzzy matching.

Usage

translateTerms(
  terms,
  index = NULL,
  source = NULL,
  strict = FALSE,
  fuzzy_terms = NULL,
  fuzzy_dist = 5,
  limit = NULL,
  inline = TRUE,
  verbose = TRUE
)

Arguments

terms

[character(.)] terms to be translated.

index

[character(1)] name of a table that contains translations.

source

[named list(1)] the table or geometry ID from which the terms have been taken. List must be named with either tabID or geoID to denote where the ID comes from.

strict

[logical(1)] shall the translation be limited to fuzzy_terms, or shall also those terms be available that have been defined as 'original' in a translation table.

fuzzy_terms

[vector(.)] additional target terms with which a fuzzy match should be carried out.

fuzzy_dist

[integerish(1)] the maximum edit-distance for which terms of fuzzy-matching should be suggested as match.

limit

[character(.)] a set of terms to which the translation should be limited.

inline

[logical(1)] whether or not to edit translations inline in R (only possible in linux), or in the 'translating.csv' in your database root directory.

verbose

[logical(1)] be verbose about what is happening (default TRUE).

Value

A table of translated terms.

Details

This is basically a sophisticated matching algorithm, that adds new entries to the respective index.