readPDF(tm)
readPDF()所属R语言包:tm
Read In a PDF Document
在一个PDF文件阅读
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Return a function which reads in a portable document format (PDF) document extracting both its text and its meta data.
返回一个函数,它在提取它的文字和其元数据的可移植文档格式(PDF)文件中读取。
用法----------Usage----------
readPDF(PdftotextOptions = "", ...)
参数----------Arguments----------
参数:PdftotextOptions
Options passed over to pdftotext.
选项传递到pdftotext。
参数:...
Arguments for the generator function.
对生成器函数的参数。
Details
详细信息----------Details----------
Formally this function is a function generator, i.e., it returns a function (which reads in a text document) with a well-defined signature, but can access passed over arguments (e.g., options to pdftotext) via lexical scoping.
从形式上看,这个函数是一个函数发生器,也就是说,它返回一个函数(在一个文本文件中读取)与一个明确的签名,但可以访问传递过来的参数(例如,选项到pdftotext)通过词法范围。
Note that this PDF reader needs the tool pdftotext installed and accessible on your system, available as command line utility in the Poppler PDF rendering library (see http://poppler.freedesktop.org/).
请注意,此PDF阅读器需要的工具pdftotext安装和访问您的系统,可作为命令行实用程序中的poppler的PDF渲染库(见http://poppler.freedesktop.org/)的。
值----------Value----------
A function with the signature elem, language, id:
Afunction的签名elem, language, id:
参数:elem
A list with the named element uri of type character which must hold a valid file name.
Alist的命名元素的uri类型character必须持有有效的文件名。
参数:language
A character vector giving the text's language.
Acharacter矢量提供的文本的语言。
参数:id
A character vector representing a unique identification string for the returned text document.
Acharacter向量,代表一个独特的标识字符串,返回的文本文件。
The function returns a PlainTextDocument representing the text and meta data in content.
该函数返回一个PlainTextDocumentcontent的文本和元数据。
(作者)----------Author(s)----------
Ingo Feinerer
参见----------See Also----------
getReaders to list available reader functions.
getReaders列出可用的阅读器功能。
实例----------Examples----------
if(file.exists(Sys.which("pdftotext"))) {
pdf <- readPDF(PdftotextOptions = "-layout")(elem = list(uri = vignette("tm")$pdf),
language = "en",
id = "id1")
pdf[1:13]
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|