{"id":21113680,"url":"https://github.com/stefanieschneider/unstruwwel","last_synced_at":"2025-07-08T18:32:02.115Z","repository":{"id":56935299,"uuid":"194132230","full_name":"stefanieschneider/unstruwwel","owner":"stefanieschneider","description":"Detect and Parse Historic Dates in R","archived":false,"fork":false,"pushed_at":"2025-01-28T07:04:39.000Z","size":812,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-09T12:29:54.463Z","etag":null,"topics":["dates","nlp","parser","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanieschneider.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-27T16:51:24.000Z","updated_at":"2025-03-24T11:42:04.000Z","dependencies_parsed_at":"2025-01-27T08:31:28.610Z","dependency_job_id":null,"html_url":"https://github.com/stefanieschneider/unstruwwel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stefanieschneider/unstruwwel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanieschneider%2Funstruwwel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanieschneider%2Funstruwwel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanieschneider%2Funstruwwel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanieschneider%2Funstruwwel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanieschneider","download_url":"https://codeload.github.com/stefanieschneider/unstruwwel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanieschneider%2Funstruwwel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264323957,"owners_count":23590773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dates","nlp","parser","r"],"created_at":"2024-11-20T01:58:01.670Z","updated_at":"2025-07-08T18:31:58.232Z","avatar_url":"https://github.com/stefanieschneider.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n\tcollapse = TRUE,\n\tcomment = \"#\u003e\",\n\tfig.path = \"man/figures/README-\",\n\tout.width = \"100%\"\n)\n\noptions(width = \"100\")\n\nrequire(unstruwwel)\nrequire(magrittr)\n```\n\n# unstruwwel \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"120\" /\u003e\n\n[![Lifecycle badge](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4451796.svg)](https://doi.org/10.5281/zenodo.4451796)\n[![CRAN badge](http://www.r-pkg.org/badges/version/unstruwwel)](https://cran.r-project.org/package=unstruwwel)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/stefanieschneider/unstruwwel?branch=master\u0026svg=true)](https://ci.appveyor.com/project/stefanieschneider/unstruwwel)\n[![Coverage status](https://codecov.io/github/stefanieschneider/unstruwwel/coverage.svg?branch=master)](https://app.codecov.io/github/stefanieschneider/unstruwwel?branch=master)\n\n## Overview\n\nThis R package provides means to detect and parse historic dates, e.g., to ISO 8601:2-2019. It automatically converts language-specific verbal information, e.g., “circa 1st half of the 19th century,” into its standardized numerical counterparts, e.g., “1801-01-01\\~/1850-12-31\\~.” The package follows the recommendations of the MIDAS (Marburger Informations-, Dokumentations- und Administrations-System), see, e.g., https://doi.org/10.11588/artdok.00003770. It internally uses [lubridate](https://github.com/tidyverse/lubridate). The name of the package is inspired by Heinrich Hoffmann’s rhymed story “[Struwwelpeter](http://www.gutenberg.org/files/12116/12116-h/12116-h.htm#Shock-headed_Peter)”, which goes as follows:\n\n\u003e Just look at him! there he stands,\nwith his nasty hair and hands.\nSee! his nails are never cut;\nthey are grimed as black as soot;\nand the sloven, I declare,\nnever once has combed his hair;\nanything to me is sweeter\nthan to see Shock-headed Peter.\n\nFor the German-language original text, see the online digital library [Wikisource](https://de.wikisource.org/wiki/Der_Struwwelpeter/Struwwelpeter).\n\n## Installation\n\nYou can install the released version of unstruwwel from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"unstruwwel\")\n```\n\nTo install the development version from [GitHub](https://github.com/stefanieschneider/unstruwwel) use:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"stefanieschneider/unstruwwel\")\n```\n\n## Usage\n\nThe unstruwwel package contains only one function, `unstruwwel()`, that does all the *magic* language-specific standardization. `unstruwwel()` returns a named list, where each element is the result of applying the function to the corresponding element in the input vector.\n\n### English-language examples\n```{r example_en, message=FALSE, warning=FALSE}\ndates \u003c- c(\n  \"5th century b.c.\", \"unknown\", \"late 16th century\", \"mid-12th century\",\n  \"mid-1880s\", \"June 1963\", \"August 11, 1958\", \"ca. 1920\", \"before 1856\"\n)\n\n# returns valid ISO 8601:2-2019 dates\nunlist(unstruwwel(dates, \"en\", scheme = \"iso-format\"), use.names = FALSE)\n\n# returns a numerical interval of length 2 \nunstruwwel(dates, language = \"en\", scheme = \"time-span\") %\u003e%\n  tibble::as_tibble() %\u003e%\n  dplyr::mutate(id = dplyr::row_number()) %\u003e% \n  tidyr::gather(key = id) %\u003e%\n  tidyr::unnest_wider(value, names_sep = \"_\") %\u003e% \n  dplyr::rename_all(dplyr::funs(c(\"text\", \"start\", \"end\")))\n```\n\n### German-language examples\n```{r example_de, message=FALSE, warning=FALSE}\ndates \u003c- c(\n  \"letztes Drittel 15. und 1. Hälfte 16. Jahrhundert\", \"undatiert\", \"1460?\",\n  \"wohl nach 1923\", \"spätestens 1750er Jahre\", \"1897 (Guss vmtl. vor 1906)\"\n)\n\n# returns valid ISO 8601:2-2019 dates\nunlist(unstruwwel(dates, \"de\", scheme = \"iso-format\"), use.names = FALSE)\n\n# returns a numerical interval of length 2 \nunstruwwel(dates, language = \"de\", scheme = \"time-span\") %\u003e%\n  tibble::as_tibble() %\u003e%\n  dplyr::mutate(id = dplyr::row_number()) %\u003e% \n  tidyr::gather(key = id) %\u003e%\n  tidyr::unnest_wider(value, names_sep = \"_\") %\u003e% \n  dplyr::rename_all(dplyr::funs(c(\"text\", \"start\", \"end\")))\n```\n\n## Contributing\n\nPlease report issues, feature requests, and questions to the [GitHub issue tracker](https://github.com/stefanieschneider/unstruwwel/issues). We have a [Contributor Code of Conduct](https://github.com/stefanieschneider/unstruwwel/blob/master/CODE_OF_CONDUCT.md). By participating in unstruwwel you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanieschneider%2Funstruwwel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanieschneider%2Funstruwwel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanieschneider%2Funstruwwel/lists"}