altmetric/identifiers

与各种学术标识符的提取、验证和规范化相关的实用程序集合。

v0.10.1 2018-04-09 14:28 UTC

This package is not auto-updated.

Last update: 2024-09-24 17:59:37 UTC


README

与各种学术标识符的提取、验证和规范化相关的实用程序集合。

当前版本 0.10.1
支持的PHP版本 5.4, 5.5, 5.6, 7

安装

$ composer require altmetric/identifiers

支持的标识符

支持列表如下

API文档

public AdsBibcode::extract(string $str): array

use Altmetric\Identifiers\AdsBibcode;

$bibcodes = AdsBibcode::extract('ADS: 1974AJ.....79..819H');
//=> ['1974AJ.....79..819H']

从给定字符串中返回ADS bibcodes数组。如果没有找到匹配项,则返回空数组。

public ArxivId::extract(string $str): array

use Altmetric\Identifiers\ArxivId;

$arxivIds = ArxivId::extract("math.GT/0309136\narXiv:1501.00001v2");
//=> ['math.GT/0309136', '1501.00001v2']

从给定字符串中返回arXiv IDs数组。如果没有找到匹配项,则返回空数组。

public Doi::extract(string $str): array

use Altmetric\Identifiers\Doi;

$dois = Doi::extract('doi:10.1049/el.2013.3006')
//=> ['10.1049/el.2013.3006']

从给定字符串中返回DOIs数组(包括ISBN-As)。如果没有找到匹配项,则返回空数组。

public Handle::extract(string $str): array

use Altmetric\Identifiers\Handle;

$handles = Handle::extract('http://hdl.handle.net/10149/596901')
//=> ['10149/596901']

从给定字符串中返回Handles数组。如果没有找到匹配项,则返回空数组。

public Isbn::extract(string $str): array

use Altmetric\Identifiers\Isbn;

$isbns = Isbn::extract("ISBN: 9780805069099\nISBN: 2-7594-0269-X");
//=> ['9780805069099', '9782759402694']

从给定字符串中返回ISBN-13s数组。将ISBN-As和ISBN-10s自动转换为ISBN-13s,如果没有找到匹配项,则返回空数组。

public NationalClinicalTrialId::extract(string $str): array

use Altmetric\Identifiers\NationalClinicalTrialId;

$nctIds = NationalClinicalTrialId::extract('Trial ID: NCT00000106');
//=> ['NCT00000106']

从给定字符串中返回国家临床试验IDs数组。如果没有找到匹配项,则返回空数组。

public OrcidId::extract(string $str): array

use Altmetric\Identifiers\OrcidId;

$orcidIds = OrcidId::extract('orcid.org/0000-0002-0088-0058');
//=> ['0000-0002-0088-0058']

从给定字符串中返回ORCID标识符数组。如果没有找到匹配项,则返回空数组。

public PubmedId::extract(string $str): array

use Altmetric\Identifiers\PubmedId;

$pubmedIds = PubmedId::extract("23193287\n14599470\nhttps://www.ncbi.nlm.nih.gov/pubmed/123\npmid:456\ninfo:pmid/789");
//=> ['23193287', '14599470', '123', '456', '789']

从给定字符串中返回PubMed IDs数组。如果没有找到匹配项,则返回空数组。

public RepecId::extract(string $str): array

use Altmetric\Identifiers\RepecId;

$repecIds = RepecId::extract("RePEc:wbk:wbpubs:2266\nRePEc:inn:wpaper:2016-03");
//=> ['RePEc:wbk:wbpubs:2266', 'RePEc:inn:wpaper:2016-03']

从给定字符串中返回RePEc标识符数组。如果没有找到匹配项,则返回空数组。

public Urn::extract(string $str): array

use Altmetric\Identifiers\Urn;

$urns = Urn::extract("urn:foo:bar\nURN:FOO:BA%2CZ");
//=> ['urn:foo:bar', 'urn:foo:BA%2cZ']

从给定字符串中返回URNs数组。如果没有找到匹配项,则返回空数组。

public Uri::extract(string $str): array

use Altmetric\Identifiers\Uri;

$uris = Uri::extract("http://www.altmetric.com:80/foo?bar#1");
//=> ['http://www.altmetric.com:80/foo?bar#1']

从给定字符串中返回URIs数组。如果没有找到匹配项,则返回空数组。

Ruby版本

我们还维护此库的Ruby版本

致谢

许可证

版权 © 2016-2017 Altmetric LLP

MIT许可证下分发。