EVOLUTION-MANAGER
Edit File: stri_trans_general.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: General Text Transforms, Including Transliteration</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for stri_trans_general {stringi}"><tr><td>stri_trans_general {stringi}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>General Text Transforms, Including Transliteration</h2> <h3>Description</h3> <p><span class="pkg">ICU</span> General transforms provide different ways for processing Unicode text. They are useful in handling a variety of different tasks, including: </p> <ul> <li><p> Upper Case, Lower Case, Title Case, Full/Halfwidth conversions, </p> </li> <li><p> Normalization, </p> </li> <li><p> Hex and Character Name conversions, </p> </li> <li><p> Script to Script conversion/transliteration. </p> </li></ul> <h3>Usage</h3> <pre> stri_trans_general(str, id) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>str</code></td> <td> <p>character vector</p> </td></tr> <tr valign="top"><td><code>id</code></td> <td> <p>a single string with transform identifier, see <code><a href="stri_trans_list.html">stri_trans_list</a></code></p> </td></tr> </table> <h3>Details</h3> <p><span class="pkg">ICU</span> Transforms were mainly designed to transliterate characters from one script to another (for example, from Greek to Latin, or Japanese Katakana to Latin). However, these services are also capable of handling a much broader range of tasks. In particular, the Transforms include pre-built transformations for case conversions, for normalization conversions, for the removal of given characters, and also for a variety of language and script transliterations. Transforms can be chained together to perform a series of operations and each step of the process can use a UnicodeSet to restrict the characters that are affected. </p> <p>To get the list of available transforms, call <code><a href="stri_trans_list.html">stri_trans_list</a></code>. </p> <p>Note that transliterators are often combined in sequence to achieve a desired transformation. This is analogous to the composition of mathematical functions. For example, given a script that converts lowercase ASCII characters from Latin script to Katakana script, it is convenient to first (1) separate input base characters and accents, and then (2) convert uppercase to lowercase. To achieve this, a compound transform can be specified as follows: <code>NFKD; Lower; Latin-Katakana;</code> </p> <h3>Value</h3> <p>Returns a character vector. </p> <h3>References</h3> <p><em>General Transforms</em> – ICU User Guide, <a href="http://userguide.icu-project.org/transforms/general">http://userguide.icu-project.org/transforms/general</a> </p> <h3>See Also</h3> <p>Other transform: <code><a href="stri_trans_char.html">stri_trans_char</a>()</code>, <code><a href="stri_trans_list.html">stri_trans_list</a>()</code>, <code><a href="stri_trans_nf.html">stri_trans_nfc</a>()</code>, <code><a href="stri_trans_casemap.html">stri_trans_tolower</a>()</code> </p> <h3>Examples</h3> <pre> stri_trans_general("gro\u00df", "latin-ascii") stri_trans_general("stringi", "latin-greek") stri_trans_general("stringi", "latin-cyrillic") stri_trans_general("stringi", "upper") # see stri_trans_toupper stri_trans_general("\u0104", "nfd; lower") # compound id; see stri_trans_nfd stri_trans_general("tato nie wraca ranki wieczory", "pl-pl_FONIPA") stri_trans_general("\u2620", "any-name") # character name stri_trans_general("\\N{latin small letter a}", "name-any") # decode name stri_trans_general("\u2620", "hex") # to hex </pre> <hr /><div style="text-align: center;">[Package <em>stringi</em> version 1.4.6 <a href="00Index.html">Index</a>]</div> </body></html>