numberize
Convert words to numbers in English, French and Spanish
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.5%) to scientific vocabulary
Keywords
r-package
r-programming
Last synced: 6 months ago
·
JSON representation
·
Repository
Convert words to numbers in English, French and Spanish
Basic Info
- Host: GitHub
- Owner: epiverse-trace
- License: other
- Language: R
- Default Branch: main
- Homepage: https://epiverse-trace.github.io/numberize/
- Size: 20.8 MB
Statistics
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 2
- Releases: 2
Topics
r-package
r-programming
Created over 2 years ago
· Last pushed 8 months ago
Metadata Files
Readme
Changelog
License
Citation
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = file.path(c("man", "figures", "README-")),
out.width = "100%"
)
```
# _{{ packagename }}_
[](https://opensource.org/license/mit)
[](https://github.com/{{ gh_repo }}/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/{{ gh_repo }}?branch=main)
[](https://www.reconverse.org/lifecycle.html#{{ recon }})
_{{ packagename }}_ is an R package to convert numbers written as English, French or Spanish words from `"zero"` to `"nine hundred and ninety nine trillion, nine hundred and ninety nine billion, nine hundred and ninety nine million, nine hundred and ninety nine thousand, nine hundred and ninety nine"` to positive integer values.
_{{ packagename }}_ is developed at the [{{ department }}]({{ department_url }}) at the {{ institution }} as part of the [Epiverse-TRACE program](https://data.org/initiatives/epiverse/).
## Installation
The package can be installed from CRAN using
```r
install.packages("{{packagename}}")
```
### Development version
You can install the development version of _{{ packagename }}_ from
[GitHub](https://github.com/) with:
```{r eval = FALSE}
pak::pak("{{ gh_repo }}")
```
## Example
These examples illustrate the current functionality.
```{r eval=TRUE}
library("numberize")
# numberize a French string
numberize("zéro", lang = "fr")
# numberize a Spanish string
numberize("Siete mil quinientos cuarenta y cinco", lang = "es")
# numberize the English string "nine hundred and ninety-nine trillion, nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine" # nolint: line_length_linter.
formatC(numberize("nine hundred and ninety-nine trillion, nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine"), big.mark = ",", format = "fg") # nolint: line_length_linter.
# some edge cases
numberize("veintiún", lang = "es")
numberize("veintiuno", lang = "es")
# convert a vector of written values
numberize(
text = c(17, "dix", "soixante-cinq", "deux mille vingt-quatre", NA),
lang = "fr"
)
```
## Related packages and Limitations
- [`{numberwang}`](https://github.com/coolbutuseless/numberwang) converts numbers to words and vice versa. Limitation: English only, not on CRAN.
- [`{nombre}`](https://CRAN.R-project.org/package=nombre) converts numerics into words. Limitation: English only, no word to number conversion.
- [`{english}`](https://CRAN.R-project.org/package=english) converts numerics into words. Limitation: English only, no word to number conversion.
- [`{spanish}`](https://CRAN.R-project.org/package=spanish) converts numbers to words and vice versa. Limitation: Spanish only.
_{{ packagename }}_ is released as a standalone package in the hope that it will be useful to the R community at large. _{{ packagename }}_ was created in response to data cleaning requirements in [{cleanepi}](https://github.com/epiverse-trace/cleanepi).
### Lifecycle
This package is currently {{ recon }}, as defined by the [RECON software
lifecycle](https://www.reconverse.org/lifecycle.html).
### Contributions
Contributions are welcome via [pull requests](https://github.com/{{ gh_repo }}/pulls).
### Code of Conduct
Please note that the _{{ packagename }}_ project is released with a
[Contributor Code of Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.
Owner
- Name: Epiverse-TRACE
- Login: epiverse-trace
- Kind: organization
- Website: https://epiverse.org
- Repositories: 17
- Profile: https://github.com/epiverse-trace
Citation (CITATION.cff)
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
cff-version: 1.2.0
message: 'To cite package "numberize" in publications use:'
type: software
license: MIT
title: 'numberize: Convert Words to Numbers in Multiple Languages'
version: 1.0.1
doi: 10.32614/CRAN.package.numberize
abstract: Converts written out numbers into their equivalent numbers. Supports numbers
written out in English, French, or Spanish.
authors:
- family-names: Gruson
given-names: Hugo
email: hugo.gruson+R@normalesup.org
orcid: https://orcid.org/0000-0002-4094-1476
- family-names: Ahadzie
given-names: Bankole
email: bankole.ahadzie@lshtm.ac.uk
repository: https://CRAN.R-project.org/package=numberize
repository-code: https://github.com/epiverse-trace/numberize
url: https://github.com/epiverse-trace/numberize
contact:
- family-names: Ahadzie
given-names: Bankole
email: bankole.ahadzie@lshtm.ac.uk
keywords:
- r-package
- r-programming
references:
- type: software
title: 'R: A Language and Environment for Statistical Computing'
notes: Depends
url: https://www.R-project.org/
authors:
- name: R Core Team
institution:
name: R Foundation for Statistical Computing
address: Vienna, Austria
year: '2024'
version: '>= 3.5.0'
- type: software
title: spelling
abstract: 'spelling: Tools for Spell Checking in R'
notes: Suggests
url: https://ropensci.r-universe.dev/spelling
repository: https://CRAN.R-project.org/package=spelling
authors:
- family-names: Ooms
given-names: Jeroen
email: jeroenooms@gmail.com
orcid: https://orcid.org/0000-0002-4035-0289
- family-names: Hester
given-names: Jim
email: james.hester@rstudio.com
year: '2024'
doi: 10.32614/CRAN.package.spelling
- type: software
title: testthat
abstract: 'testthat: Unit Testing for R'
notes: Suggests
url: https://testthat.r-lib.org
repository: https://CRAN.R-project.org/package=testthat
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
year: '2024'
doi: 10.32614/CRAN.package.testthat
version: '>= 3.0.0'
GitHub Events
Total
- Create event: 5
- Issues event: 4
- Release event: 1
- Watch event: 1
- Delete event: 4
- Issue comment event: 8
- Push event: 19
- Pull request review comment event: 1
- Pull request review event: 7
- Pull request event: 7
- Fork event: 2
Last Year
- Create event: 5
- Issues event: 4
- Release event: 1
- Watch event: 1
- Delete event: 4
- Issue comment event: 8
- Push event: 19
- Pull request review comment event: 1
- Pull request review event: 7
- Pull request event: 7
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 7
- Total pull requests: 17
- Average time to close issues: about 2 months
- Average time to close pull requests: about 1 month
- Total issue authors: 4
- Total pull request authors: 5
- Average comments per issue: 1.86
- Average comments per pull request: 1.18
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 8
- Average time to close issues: about 1 month
- Average time to close pull requests: 4 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 3.33
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bahadzie (3)
- odysseu (2)
- Bisaloo (1)
- joshwlambert (1)
Pull Request Authors
- bahadzie (17)
- Bisaloo (4)
- chartgerink (2)
- odysseu (2)
- Karim-Mane (2)
Top Labels
Issue Labels
Pull Request Labels
bug (2)
Packages
- Total packages: 1
-
Total downloads:
- cran 562 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: numberize
Convert Words to Numbers in Multiple Languages
- Homepage: https://github.com/epiverse-trace/numberize
- Documentation: http://cran.r-project.org/web/packages/numberize/numberize.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.2
published 11 months ago
Rankings
Dependent packages count: 28.7%
Dependent repos count: 35.4%
Average: 50.0%
Downloads: 86.0%
Maintainers (1)
Last synced:
6 months ago