parseids

Parse identifiers (e.g., DOIs)

https://github.com/sckott/parseids

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

doi identifier pid r r-package rstats scholarly-metadata
Last synced: 6 months ago · JSON representation

Repository

Parse identifiers (e.g., DOIs)

Basic Info
Statistics
  • Stars: 9
  • Watchers: 3
  • Forks: 0
  • Open Issues: 3
  • Releases: 0
Topics
doi identifier pid r r-package rstats scholarly-metadata
Created about 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Code of conduct Codemeta

README.Rmd

parseids
========

```{r echo=FALSE}
knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE,
  warning = FALSE
)
```

[![Build Status](https://travis-ci.org/ropenscilabs/parseids.svg?branch=master)](https://travis-ci.org/ropenscilabs/parseids)


Parsers for Digital Object Identifiers (DOIs) and Other Identifiers

Uses the R pkg [piton](https://github.com/Ironholds/piton) which gives access to the C++ PEG implementation [PEGTL](https://github.com/taocpp/PEGTL).

## Documentation for various identifiers

### DOI

* 
* 

## Example rules

Capture any letter

```
struct name
  : plus< alpha >
{};
```

Capture any digit

```
struct numbers
  : plus< digit >
{};
```

## Grammar

Rules are combined to form a grammar, 

e.g., string must match `name`, then have one comma, then one space, 
then match `numbers`.

```
struct grammar
  : must< name, one< ',' >, space, numbers, eof >
{};
```

Which is then applied to parsing user input strings

## parseids API

```{r echo=FALSE, results='asis'}
cat(paste(" -", paste(getNamespaceExports("parseids"), collapse = "\n - ")))
```

## Install

```{r eval=FALSE}
devtools::install_github("ropenscilabs/parseids")
```

```{r}
library("parseids")
```


## pull out DOIs from text strings

```{r}
pid_dois("Foo 10.1094/PHYTO-04-17-0144-R")
```

```{r}
pid_dois(c("Foo 10.1094/PHYTO-04-17-0144-R", "adsfljadfa dflj fjas fljasf 10.1094/PHYTO-04-17-0144-R"))
```

## DOI prefixes

```{r}
pid_dois_prefixes(c("10.1094/PHYTO-04-17-0144-R", "10.5150/cmcm.2011.086"))
```

## DOI suffixes

```{r}
pid_dois_suffixes(c("10.1094/PHYTO-04-17-0144-R", "10.5150/cmcm.2011.086"))
```

## timing

```{r}
dois_long <- unlist(replicate(100, dois, simplify = FALSE), TRUE)
length(dois_long)
```

```{r}
library(microbenchmark)
microbenchmark::microbenchmark(
  pid_dois = pid_dois(dois_long),
  prefixes = pid_dois_prefixes(dois_long),
  suffixes = pid_dois_suffixes(dois_long),
  times = 10
)
```


## Meta

* Please [report any issues or bugs](https://github.com/ropenscilabs/parseids/issues).
* License: MIT
* Get citation information for `parseids`: `citation(package = 'parseids')`
* Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

[![rofooter](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org)

Owner

  • Name: Scott Chamberlain
  • Login: sckott
  • Kind: user
  • Location: Oregon
  • Company: Fred Hutch Data Science Lab/Office of the Chief Data Officer

Software Engineer @ Fred Hutch

CodeMeta (codemeta.json)

{
  "@context": [
    "http://purl.org/codemeta/2.0",
    "http://schema.org"
  ],
  "@type": "SoftwareSourceCode",
  "identifier": "parseids",
  "description": "PEG (Parsing Expression Grammar) parsing for DOIs\n    and other identifiers.",
  "name": "parseids: Parsers for Digital Object Identifiers (DOIs) and Other Identifiers",
  "codeRepository": "https://github.com/ropenscilabs/parseids",
  "issueTracker": "https://github.com/ropenscilabs/parseids/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.0.1.9100",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "version": "3.4.3",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 3.4.3 Patched (2018-01-01 r74017)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Scott",
      "familyName": "Chamberlain",
      "email": "myrmecocystus+r@gmail.com"
    }
  ],
  "maintainer": {
    "@type": "Person",
    "givenName": "Scott",
    "familyName": "Chamberlain",
    "email": "myrmecocystus+r@gmail.com"
  },
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    }
  ],
  "softwareRequirements": [
    {
      "@type": "SoftwareApplication",
      "identifier": "Rcpp",
      "name": "Rcpp",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "piton",
      "name": "piton",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Central R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      }
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": "2.10"
    }
  ],
  "contIntegration": "https://travis-ci.org/ropenscilabs/parseids",
  "readme": "https://github.com/ropenscilabs/parseids/blob/master/README.md",
  "fileSize": "152.176KB"
}

GitHub Events

Total
  • Watch event: 2
  • Delete event: 1
  • Create event: 1
Last Year
  • Watch event: 2
  • Delete event: 1
  • Create event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 13
  • Total Committers: 1
  • Avg Commits per committer: 13.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Scott Chamberlain m****s@g****m 13

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 11 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.75
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sckott (4)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • Rcpp * imports
  • piton * imports
  • testthat * suggests