mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 14:41:51 +02:00
(v1.3.0.9018) language corrections
This commit is contained in:
@ -82,7 +82,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9016</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9018</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -249,6 +249,7 @@
|
||||
allow_uncertain = <span class='fl'>TRUE</span>,
|
||||
reference_df = <span class='fu'><a href='mo_source.html'>get_mo_source</a></span>(),
|
||||
ignore_pattern = <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span>(<span class='st'>"AMR_ignore_pattern"</span>),
|
||||
language = <span class='fu'><a href='translate.html'>get_locale</a></span>(),
|
||||
<span class='kw'>...</span>
|
||||
)
|
||||
|
||||
@ -289,6 +290,10 @@
|
||||
<th>ignore_pattern</th>
|
||||
<td><p>a regular expression (case-insensitive) of which all matches in <code>x</code> must return <code>NA</code>. This can be convenient to exclude known non-relevant input and can also be set with the option <code>AMR_ignore_pattern</code>, e.g. <code><a href='https://rdrr.io/r/base/options.html'>options(AMR_ignore_pattern = "(not reported|contaminated flora)")</a></code>.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>language</th>
|
||||
<td><p>language to translate text like "no growth", which defaults to the system language (see <code><a href='translate.html'>get_locale()</a></code>)</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>...</th>
|
||||
<td><p>other parameters passed on to functions</p></td>
|
||||
@ -347,7 +352,7 @@
|
||||
</ul>
|
||||
|
||||
<p>There are three helper functions that can be run after using the <code>as.mo()</code> function:</p><ul>
|
||||
<li><p>Use <code>mo_uncertainties()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> that prints in a pretty format with all taxonomic names that were guessed. The output contains a score that is based on the human pathogenic prevalence and the <a href='https://en.wikipedia.org/wiki/Levenshtein_distance'>Levenshtein distance</a> between the full taxonomic name and the user input.</p></li>
|
||||
<li><p>Use <code>mo_uncertainties()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> that prints in a pretty format with all taxonomic names that were guessed. The output contains a score that is based on the human pathogenic prevalence and the <a href='https://en.wikipedia.org/wiki/Levenshtein_distance'>Levenshtein distance</a> between the user input and the full taxonomic name.</p></li>
|
||||
<li><p>Use <code>mo_failures()</code> to get a <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> <code><a href='https://rdrr.io/r/base/vector.html'>vector</a></code> with all values that could not be coerced to a valid value.</p></li>
|
||||
<li><p>Use <code>mo_renamed()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with all values that could be coerced based on old, previously accepted taxonomic names.</p></li>
|
||||
</ul>
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9017</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9018</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9016</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9018</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -270,23 +270,23 @@
|
||||
|
||||
<span class='fu'>mo_gramstain</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_snomed</span>(<span class='kw'>x</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_snomed</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_ref</span>(<span class='kw'>x</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_ref</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_authors</span>(<span class='kw'>x</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_authors</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_year</span>(<span class='kw'>x</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_year</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_rank</span>(<span class='kw'>x</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_rank</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_taxonomy</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_synonyms</span>(<span class='kw'>x</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_synonyms</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_info</span>(<span class='kw'>x</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_url</span>(<span class='kw'>x</span>, open = <span class='fl'>FALSE</span>, <span class='kw'>...</span>)
|
||||
<span class='fu'>mo_url</span>(<span class='kw'>x</span>, open = <span class='fl'>FALSE</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)
|
||||
|
||||
<span class='fu'>mo_property</span>(<span class='kw'>x</span>, property = <span class='st'>"fullname"</span>, language = <span class='fu'><a href='translate.html'>get_locale</a></span>(), <span class='kw'>...</span>)</pre>
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9016</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9018</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -247,10 +247,18 @@
|
||||
|
||||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||||
|
||||
<p>Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: <a href='https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv'>https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv</a>. This file will be read by all functions where a translated output can be desired, like all <code><a href='mo_property.html'>mo_property()</a></code> functions (<code><a href='mo_property.html'>mo_name()</a></code>, <code><a href='mo_property.html'>mo_gramstain()</a></code>, <code><a href='mo_property.html'>mo_type()</a></code>, etc.).</p>
|
||||
<p>Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: <a href='https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv'>https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv</a>. This file will be read by all functions where a translated output can be desired, like all <code><a href='mo_property.html'>mo_property()</a></code> functions (<code><a href='mo_property.html'>mo_name()</a></code>, <code><a href='mo_property.html'>mo_gramstain()</a></code>, <code><a href='mo_property.html'>mo_type()</a></code>, etc.) and <code><a href='ab_property.html'>ab_property()</a></code> functions (<code><a href='ab_property.html'>ab_name()</a></code>, <code><a href='ab_property.html'>ab_group()</a></code> etc.).</p>
|
||||
<p>Currently supported languages are: Dutch, English, French, German, Italian, Portuguese, Spanish. Please note that currently not all these languages have translations available for all antimicrobial agents and colloquial microorganism names.</p>
|
||||
<p>Please suggest your own translations <a href='https://github.com/msberends/AMR/issues/new?title=Translations'>by creating a new issue on our repository</a>.</p>
|
||||
<p>The system language will be used at default (as returned by <code><a href='https://rdrr.io/r/base/locales.html'>Sys.getlocale()</a></code>), if that language is supported. The language to be used can be overwritten by setting the option <code>AMR_locale</code>, e.g. <code><a href='https://rdrr.io/r/base/options.html'>options(AMR_locale = "de")</a></code>.</p>
|
||||
<p>Please suggest your own translations <a href='https://github.com/msberends/AMR/issues/new?title=Translations'>by creating a new issue on our repository</a>.</p><h3>Changing the default language</h3>
|
||||
|
||||
|
||||
<p>The system language will be used at default (as returned by Sys.getenv("LANG") or, if <code>LANG</code> is not set, <code><a href='https://rdrr.io/r/base/locales.html'>Sys.getlocale()</a></code>), if that language is supported. But the language to be used can be overwritten in two ways and will be checked in this order:</p><ol>
|
||||
<li><p>Setting the R option <code>AMR_locale</code>, e.g. by running <code><a href='https://rdrr.io/r/base/options.html'>options(AMR_locale = "de")</a></code></p></li>
|
||||
<li><p>Setting the system variable <code>LANGUAGE</code> or <code>LANG</code>, e.g. by adding <code>LANGUAGE="de_DE.utf8"</code> to your <code>.Renviron</code> file in your home directory</p></li>
|
||||
</ol>
|
||||
|
||||
<p>So if the R option <code>AMR_locale</code> is set, the system variables <code>LANGUAGE</code> and <code>LANG</code> will be ignored.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable lifecycle</h2>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user