且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

给定引用表的反向查找数字对象标识符?

更新时间:2022-05-15 22:46:23

这里有两个选择

CSV上传

我发现了另一种有前途的解决方案,在实践中效果不如

Here are two options

CSV upload

I have found another promising solution that does not work as well in practice as in

CrossRef允许您直接上传链接的csv,然后在此处执行文本查询: http://www.cros-s-ref.org/stqUpload/

CrossRef allows you to upload the linked csv directly, and then performs a text query here: http://www.cros-s-ref.org/stqUpload/

但是,在250个查询中,只有18个(〜7%)返回了doi.

However, only 18 of the 250 queries (~7%) returned a doi.

根据Brian Diggs的回答,在此尝试完成了95%的工作-编写基于xml的查询,它仍然存在一些错误,需要使用sed进行一些删除.但是,最大的问题是提交查询时我的会话超时".

Based on the answer by Brian Diggs, here an attempt that does 95% of the work - toward writing the xml-based query, it still has a few bugs that require some deletion using sed. But the biggest problem that my "session timed out" when the query was submitted.

xml语法包括使用模糊匹配的选项.

the xml syntax includes an option to use fuzzy matching.

doiquery.xml包含@Brians答案中的模板文本; citations.csv链接在上方.

the doiquery.xml contains the template text in @Brians answer; the citations.csv is linked above.

library(XML)
doiquery.xml <- xmlTreeParse('doiquery.xml')

query <- doiquery.xml$doc$children$query_batch[["body"]]

citations <- read.csv("citations.csv")

new.query <- function(citation, query = query){
  xmlValue(query[["author"]]) <- as.character(citation$author)
  xmlValue(query[["year"]]) <- as.character(citation$year)
  xmlValue(query[["article_title"]][["text"]]) <- citation$title
  xmlValue(query[["journal_title"]]) <- citation$journal
  return(query)
}


for (i in 1:nrow(citations)){
  q <- addChildren(q, add.query(citations[i,]))
}
axml <- addChildren(doiquery.xml$doc$children$query_batch, q )

saveXML(axml, file = 'foo.xml')

CSV到XML转换器

Creativyst软件提供了基于Web的 CSV到XML 一个>转换器.

步骤:

  1. 在ElementID的字段中输入列名,
  2. DocID字段中的
  3. 文档"
  4. RowID字段中的查询"
  5. 将csv复制/粘贴到输入CSV文件"中.
  6. 点击转化
  1. Enter columnames in ElementID's field,
  2. "document" in DocID field
  3. "query" in RowID field
  4. Copy / paste csv in "Input CSV file".
  5. Click Convert

此外,请参阅以下相关问题:要解析的Shell脚本CSV转换为XML查询?

Also, see this related question: Shell script to parse CSV to an XML query?