Test cases / pdf

deft pdf to-text

Extract text

4 runs on real files, 9 tests on generated files, not shown. 0 failed.

Fixed cases

Generated files, compared with ground truth by tools other than deft.

text in a non-embedded CJK font is readPassed

deft pdf to-text japanese.pdf -o out.txt

Input

japanese.pdf 1.4 KB · 1 page
Page 1

Output

out.txt 16 B
あいうえお
What it printed
ok pdf.to-text japanese.pdf -> out.txt  6 characters  0.05s
Automatic checks (1)
  • text: contains = ["あいうえお"], file = "out.txt"

a scan of several pages points to pdf ocrPassed

It must print deft pdf ocr.

deft pdf to-text memo.pdf -o out.txt

Input

memo.pdf 444.5 KB · 4 pages
Page 1Page 2Page 3

Output

out.txt 10 B

No preview for this format. Open the file to read it.

What it printed
ok pdf.to-text memo.pdf -> out.txt  10 characters  0.00s
warning: no text found: the PDF has no text layer and may be a scan; deft pdf ocr reads it

squeezed word spaces of justified text stay spacesPassed

deft pdf to-text hal.pdf --pages 1 -o out.txt

Input

hal.pdf 997.8 KB · 23 pages
Page 1Page 2Page 3

Output

out.txt 1.2 KB
HAL Id: hal-04895812
https://hal.science/hal-04895812v1
Submitted on 18 Jan 2025
HAL is a multi-disciplinary open access archive
for the deposit and dissemination of scientific re-
search documents, whether they are published or not.
The documents may come from teaching and research
institutions in France or abroad, or from public or pri-
vate research centers.
L’archive ouverte pluridisciplinaire HAL, est des-
tinée au dépôt et à la diffusion de documents scien-
tifiques de niveau recherche, publiés ou non, émanant
des établissements d’enseignement et de recherche
français ou étrangers, des laboratoires publics ou
privés.
Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
“图片定位游戏” 在汉语选修课中的应用及其对应用外语专业汉
语教学的启发与思考
Xia Li
To cite this version:
Xia Li. “图片定位游戏” 在汉语选修课中的应用及其对应用外语专业汉语教学的启发与思考. Re-
vue Internationale des Langues Etrangères Appliquées , 2024, Les serious games et le développement des
compétences linguistiques, interculturelles et managériales : enjeux, cas d’application et perspectives, 3. ⟨hal-
04895812⟩
What it printed
ok pdf.to-text hal.pdf -> out.txt  1064 characters  0.01s
Automatic checks (1)
  • text: contains = ["The documents may come from teaching and research", "L’archive ouverte pluridisciplinaire HAL"], file = "out.txt"

Real-file tasks

Real files and a plain-language job, from the agent benchmark. These are the reference answers, not an agent run.

Extract text for readingPassed

Extract all the text of paper.pdf into paper.txt.

deft pdf to-text paper.pdf -o paper.txt

Input

paper.pdf 992.5 KB · 14 pages
Page 1Page 2Page 3

Output

paper.txt 81.1 KB
Trace-based Just-in-Time Type Specialization for Dynamic
Languages
Andreas Gal∗+, Brendan Eich∗, Mike Shaver∗, David Anderson∗, David Mandelin∗,
Mohammad R. Haghighat$, Blake Kaplan∗, Graydon Hoare∗, Boris Zbarsky∗, Jason Orendorff∗,
Jesse Ruderman∗, Edwin Smith#, Rick Reitmaier#, Michael Bebenita+, Mason Chang+#, Michael Franz+
Mozilla Corporation∗
{gal,brendan,shaver,danderson,dmandelin,mrbkap,graydon,bz,jorendorff,jruderman}@mozilla.com
Adobe Corporation#
{edwsmith,rreitmai}@adobe.com
Intel Corporation$
{mohammad.r.haghighat}@intel.com
University of California, Irvine+
{mbebenit,changm,franz}@uci.edu
Abstract
Dynamic languages such as JavaScript are more difficult to com-
pile than statically typed ones. Since no concrete type information
is available, traditional compilers need to emit generic code that can
handle all possible type combinations at runtime. We present an al-
ternative compilation technique for dynamically-typed languages
that identifies frequently executed loop traces at run-time and then
generates machine code on the fly that is specialized for the ac-
tual dynamic types occurring on each path through the loop. Our
method provides cheap inter-procedural type specialization, and an
elegant and efficient way of incrementally compiling lazily discov-
ered alternative paths through nested loops. We have implemented
a dynamic compiler for JavaScript based on our technique and we
have measured speedups of 10x and more for certain benchmark
programs.
Categories and Subject Descriptors D.3.4 [Programming Lan-
guages]: Processors — Incremental compilers, code generation.
General Terms Design, Experimentation, Measurement, Perfor-
mance.
Keywords JavaScript, just-in-time compilation, trace trees.
1. Introduction
Dynamic languages such as JavaScript, Python, and Ruby, are pop-
ular since they are expressive, accessible to non-experts, and make
deployment as easy as distributing a source file. They are used for
small scripts as well as for complex applications. JavaScript, for
example, is the de facto standard for client-side web programming
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for profit or commercial advantage and that copies bear this notice and the full citation
on the first page. To copy otherwise, to republish, to post on servers or to redistribute
to lists, requires prior specific permission and/or a fee.
PLDI’09, June 15–20, 2009, Dublin, Ireland.
Copyright c© 2009 ACM 978-1-60558-392-1/09/06. . . $5.00
and is used for the application logic of browser-based productivity
applications such as Google Mail, Google Docs and Zimbra Col-
laboration Suite. In this domain, in order to provide a fluid user
experience and enable a new generation of applications, virtual ma-
chines must provide a low startup time and high performance.
Compilers for statically typed languages rely on type informa-
tion to gene
… 79840 more characters
Automatic checks (2)
  • min_bytes: file = "paper.txt", bytes = 30000
  • text: file = "paper.txt", contains = ["Trace-based", "JavaScript"]