<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>JSON on Producthunt daily</title>
        <link>https://producthunt.programnotes.cn/en/tags/json/</link>
        <description>Recent content in JSON on Producthunt daily</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Tue, 16 Sep 2025 15:28:32 +0800</lastBuildDate><atom:link href="https://producthunt.programnotes.cn/en/tags/json/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>simdjson</title>
        <link>https://producthunt.programnotes.cn/en/p/simdjson/</link>
        <pubDate>Tue, 16 Sep 2025 15:28:32 +0800</pubDate>
        
        <guid>https://producthunt.programnotes.cn/en/p/simdjson/</guid>
        <description>&lt;img src="https://images.unsplash.com/photo-1674007983449-1fa6e9a097c4?ixid=M3w0NjAwMjJ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3NTgwMDc2NTh8&amp;ixlib=rb-4.1.0" alt="Featured image of post simdjson" /&gt;&lt;h1 id=&#34;simdjsonsimdjson&#34;&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/simdjson/simdjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson/simdjson&lt;/a&gt;
&lt;/h1&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;LICENSE&#34; &gt;&lt;img src=&#34;https://img.shields.io/badge/License-Apache%202-blue.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
	
&gt;&lt;/a&gt; &lt;a class=&#34;link&#34; href=&#34;LICENSE-MIT&#34; &gt;&lt;img src=&#34;https://img.shields.io/badge/License-MIT-blue.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
	
&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://simdjson.github.io/simdjson/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;img src=&#34;https://img.shields.io/badge/docs-doxygen-green.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Doxygen Documentation&#34;
	
	
&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;simdjson--parsing-gigabytes-of-json-per-second&#34;&gt;simdjson : Parsing gigabytes of JSON per second
&lt;/h1&gt;&lt;img src=&#34;images/logo.png&#34; width=&#34;10%&#34; style=&#34;float: right&#34;&gt;
JSON is everywhere on the Internet. Servers spend a *lot* of time parsing it. We need a fresh
approach. The simdjson library uses commonly available SIMD instructions and microparallel algorithms
to parse JSON 4x  faster than RapidJSON and 25x faster than JSON for Modern C++.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fast:&lt;/strong&gt; Over 4x faster than commonly used production-grade JSON parsers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Record Breaking Features:&lt;/strong&gt; Minify JSON  at 6 GB/s, validate UTF-8  at 13 GB/s,  NDJSON at 3.5 GB/s.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy:&lt;/strong&gt; First-class, easy to use and carefully documented APIs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strict:&lt;/strong&gt; Full JSON and UTF-8 validation, lossless parsing. Performance with no compromises.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic:&lt;/strong&gt; Selects a CPU-tailored parser at runtime. No configuration needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reliable:&lt;/strong&gt; From memory allocation to error handling, simdjson&amp;rsquo;s design avoids surprises.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Peer Reviewed:&lt;/strong&gt; Our research appears in venues like VLDB Journal, Software: Practice and Experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This library is part of the &lt;a class=&#34;link&#34; href=&#34;https://awesomecpp.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Awesome Modern C++&lt;/a&gt; list.&lt;/p&gt;
&lt;h2 id=&#34;table-of-contents&#34;&gt;Table of Contents
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#real-world-usage&#34; &gt;Real-world usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#quick-start&#34; &gt;Quick Start&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#documentation&#34; &gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#godbolt&#34; &gt;Godbolt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#performance-results&#34; &gt;Performance results&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#packages&#34; &gt;Packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#bindings-and-ports-of-simdjson&#34; &gt;Bindings and Ports of simdjson&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#about-simdjson&#34; &gt;About simdjson&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#funding&#34; &gt;Funding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#contributing-to-simdjson&#34; &gt;Contributing to simdjson&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;#license&#34; &gt;License&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;real-world-usage&#34;&gt;Real-world usage
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://nodejs.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Node.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/ClickHouse/ClickHouse&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;ClickHouse&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://velox-lib.io&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Meta Velox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/google/paxml&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Google Pax&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/milvus-io/milvus&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;milvus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://questdb.io/blog/questdb-release-8-0-3/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;QuestDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/aras-p/ClangBuildAnalyzer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Clang Build Analyzer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Shopify/heap-profiler&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Shopify HeapProfiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/StarRocks/starrocks&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;StarRocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/microsoft/FishStore&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Microsoft FishStore&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/intel/pcm&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Intel PCM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Nozbe/WatermelonDB&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;WatermelonDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/apache/doris&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Apache Doris&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/dgraph-io/dgraph&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Dgraph&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/unum-cloud/ujrpc&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;UJRPC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/spnda/fastgltf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;fastgltf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/tenzir/vast&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;vast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/ada-url/ada&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;ada-url&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/adamritter/fastgron&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;fastgron&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://wasmedge.org&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;WasmEdge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/logicalclocks/rondb&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;RonDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/GreptimeTeam/greptimedb&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;GreptimeDB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are planning to use simdjson in a product, please work from one of our releases.&lt;/p&gt;
&lt;h2 id=&#34;quick-start&#34;&gt;Quick Start
&lt;/h2&gt;&lt;p&gt;The simdjson library is easily consumable with a single .h and .cpp file.&lt;/p&gt;
&lt;ol start=&#34;0&#34;&gt;
&lt;li&gt;
&lt;p&gt;Prerequisites: &lt;code&gt;g++&lt;/code&gt; (version 7 or better) or &lt;code&gt;clang++&lt;/code&gt; (version 6 or better), and a 64-bit
system with a command-line shell (e.g., Linux, macOS, freeBSD). We also support programming
environments like Visual Studio and Xcode, but different steps are needed. Users of clang++ may need to specify the C++ version (e.g., &lt;code&gt;c++ -std=c++17&lt;/code&gt;) since clang++ tends to default on C++98.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pull &lt;a class=&#34;link&#34; href=&#34;singleheader/simdjson.h&#34; &gt;simdjson.h&lt;/a&gt; and &lt;a class=&#34;link&#34; href=&#34;singleheader/simdjson.cpp&#34; &gt;simdjson.cpp&lt;/a&gt; into a
directory, along with the sample file &lt;a class=&#34;link&#34; href=&#34;jsonexamples/twitter.json&#34; &gt;twitter.json&lt;/a&gt;. You can download them with the &lt;code&gt;wget&lt;/code&gt; utility:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;wget https://raw.githubusercontent.com/simdjson/simdjson/master/singleheader/simdjson.h https://raw.githubusercontent.com/simdjson/simdjson/master/singleheader/simdjson.cpp https://raw.githubusercontent.com/simdjson/simdjson/master/jsonexamples/twitter.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create &lt;code&gt;quickstart.cpp&lt;/code&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c++&#34; data-lang=&#34;c++&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#include&lt;/span&gt; &lt;span class=&#34;cpf&#34;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#include&lt;/span&gt; &lt;span class=&#34;cpf&#34;&gt;&amp;#34;simdjson.h&amp;#34;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;simdjson&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;ondemand&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;parser&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;parser&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;padded_string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;json&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;padded_string&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;load&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;twitter.json&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;ondemand&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;document&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;tweets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;parser&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;iterate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;std&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;uint64_t&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;tweets&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search_metadata&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;count&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;])&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34; results.&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;std&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;endl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;&lt;code&gt;c++ -o quickstart quickstart.cpp simdjson.cpp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;./quickstart&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; 100 results.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;documentation&#34;&gt;Documentation
&lt;/h2&gt;&lt;p&gt;Usage documentation is available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;doc/basics.md&#34; &gt;Basics&lt;/a&gt; is an overview of how to use simdjson and its APIs.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;doc/builder.md&#34; &gt;Builder&lt;/a&gt; is an overview of how to efficiently write JSON strings using simdjson.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;doc/performance.md&#34; &gt;Performance&lt;/a&gt; shows some more advanced scenarios and how to tune for them.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;doc/implementation-selection.md&#34; &gt;Implementation Selection&lt;/a&gt; describes runtime CPU detection and
how you can work with it.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://simdjson.github.io/simdjson/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;API&lt;/a&gt; contains the automatically generated API documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;godbolt&#34;&gt;Godbolt
&lt;/h2&gt;&lt;p&gt;Some users may want to browse code along with the compiled assembly. You want to check out the following lists of examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://godbolt.org/z/K3Px64TqK&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;C++26 reflection example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://godbolt.org/z/7G5qE4sr9&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson examples with errors handled through exceptions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://godbolt.org/z/e9dWb9E4v&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson examples with errors without exceptions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;performance-results&#34;&gt;Performance results
&lt;/h2&gt;&lt;p&gt;The simdjson library uses three-quarters less instructions than state-of-the-art parser &lt;a class=&#34;link&#34; href=&#34;https://rapidjson.org&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;RapidJSON&lt;/a&gt;. To our knowledge, simdjson is the first fully-validating JSON parser
to run at &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Gigabyte&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;gigabytes per second&lt;/a&gt; (GB/s) on commodity processors. It can parse millions of JSON documents per second on a single core.&lt;/p&gt;
&lt;p&gt;The following figure represents parsing speed in GB/s for parsing various files
on an Intel Skylake processor (3.4 GHz) using the GNU GCC 10 compiler (with the -O3 flag).
We compare against the best and fastest C++ libraries on benchmarks that load and process the data.
The simdjson library offers full unicode (&lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/UTF-8&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;UTF-8&lt;/a&gt;) validation and exact
number parsing.&lt;/p&gt;
&lt;img src=&#34;doc/rome.png&#34; width=&#34;60%&#34;&gt;
&lt;p&gt;The simdjson library offers high speed whether it processes tiny files (e.g., 300 bytes)
or larger files (e.g., 3MB). The following plot presents parsing
speed for &lt;a class=&#34;link&#34; href=&#34;https://github.com/simdjson/simdjson_experiments_vldb2019/blob/master/experiments/growing/gen.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;synthetic files over various sizes generated with a script&lt;/a&gt; on a 3.4 GHz Skylake processor (GNU GCC 9, -O3).&lt;/p&gt;
&lt;img src=&#34;doc/growing.png&#34; width=&#34;60%&#34;&gt;
&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/simdjson/simdjson_experiments_vldb2019&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;All our experiments are reproducible&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For NDJSON files, we can exceed 3 GB/s with &lt;a class=&#34;link&#34; href=&#34;https://github.com/simdjson/simdjson/blob/master/doc/parse_many.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;our  multithreaded parsing functions&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;packages&#34;&gt;Packages
&lt;/h2&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://repology.org/project/simdjson/versions&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;img src=&#34;https://repology.org/badge/vertical-allrepos/simdjson.svg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Packaging status&#34;
	
	
&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;bindings-and-ports-of-simdjson&#34;&gt;Bindings and Ports of simdjson
&lt;/h2&gt;&lt;p&gt;We distinguish between &amp;ldquo;bindings&amp;rdquo; (which just wrap the C++ code) and a port to another programming language (which reimplements everything).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/michaeleisel/zippyjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;ZippyJSON&lt;/a&gt;: Swift bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/gerrymanoim/libpy_simdjson/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;libpy_simdjson&lt;/a&gt;: high-speed Python bindings for simdjson using &lt;a class=&#34;link&#34; href=&#34;https://github.com/quantopian/libpy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;libpy&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/TkTech/pysimdjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;pysimdjson&lt;/a&gt;: Python bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/TeskaLabs/cysimdjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;cysimdjson&lt;/a&gt;: high-speed Python bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/simd-lite&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson-rs&lt;/a&gt;: Rust port.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/SunDoge/simdjson-rust&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson-rust&lt;/a&gt;: Rust wrapper (bindings).&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/EgorBo/SimdJsonSharp&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;SimdJsonSharp&lt;/a&gt;: C# version for .NET Core (bindings and full port).&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/luizperes/simdjson_nodejs&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson_nodejs&lt;/a&gt;: Node.js bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/crazyxman/simdjson_php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson_php&lt;/a&gt;: PHP bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/saka1/simdjson_ruby&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson_ruby&lt;/a&gt;: Ruby bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/anilmaurya/fast_jsonparser&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;fast_jsonparser&lt;/a&gt;: Ruby bindings for the simdjson project.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/minio/simdjson-go&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson-go&lt;/a&gt;: Go port using Golang assembly.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/eddelbuettel/rcppsimdjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;rcppsimdjson&lt;/a&gt;: R bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/ChomperT/simdjson_erlang&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson_erlang&lt;/a&gt;: erlang bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/saleyn/simdjsone&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjsone&lt;/a&gt;: erlang bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/FourierTransformer/lua-simdjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;lua-simdjson&lt;/a&gt;: lua bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://hackage.haskell.org/package/hermes-json&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;hermes-json&lt;/a&gt;: haskell bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/EzequielRamis/zimdjson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;zimdjson&lt;/a&gt;: Zig port.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/travisstaloch/simdjzon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjzon&lt;/a&gt;: Zig port.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/rawleyfowler/JSON-simd&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;JSON-Simd&lt;/a&gt;: Raku bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://metacpan.org/pod/JSON::SIMD&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;JSON::SIMD&lt;/a&gt;: Perl bindings; fully-featured JSON module that uses simdjson for decoding.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/sainttttt/gemmaJSON&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;gemmaJSON&lt;/a&gt;: Nim JSON parser based on simdjson bindings.&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/simdjson/simdjson-java&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;simdjson-java&lt;/a&gt;: Java port.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;about-simdjson&#34;&gt;About simdjson
&lt;/h2&gt;&lt;p&gt;The simdjson library takes advantage of modern microarchitectures, parallelizing with SIMD vector
instructions, reducing branch misprediction, and reducing data dependency to take advantage of each
CPU&amp;rsquo;s multiple execution cores.&lt;/p&gt;
&lt;p&gt;Our default front-end is called On-Demand, and we wrote a paper about it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;John Keiser, Daniel Lemire, &lt;a class=&#34;link&#34; href=&#34;http://arxiv.org/abs/2312.17149&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;On-Demand JSON: A Better Way to Parse Documents?&lt;/a&gt;, Software: Practice and Experience 54 (6), 2024.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some people &lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/abs/1902.08318&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;enjoy reading the first (2019) simdjson paper&lt;/a&gt;: A description of the design
and implementation of simdjson is in our research article:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Geoff Langdale, Daniel Lemire, &lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/abs/1902.08318&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Parsing Gigabytes of JSON per Second&lt;/a&gt;, VLDB Journal 28 (6), 2019.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We have an in-depth paper focused on the UTF-8 validation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;John Keiser, Daniel Lemire, &lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/abs/2010.03090&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Validating UTF-8 In Less Than One Instruction Per Byte&lt;/a&gt;, Software: Practice &amp;amp; Experience 51 (5), 2021.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We also have an informal &lt;a class=&#34;link&#34; href=&#34;https://branchfree.org/2019/02/25/paper-parsing-gigabytes-of-json-per-second/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;blog post providing some background and context&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the video inclined, &lt;br /&gt;
&lt;a class=&#34;link&#34; href=&#34;http://www.youtube.com/watch?v=wlvKAT7SZIQ&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;img src=&#34;http://img.youtube.com/vi/wlvKAT7SZIQ/0.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;simdjson at QCon San Francisco 2019&#34;
	
	
&gt;&lt;/a&gt;&lt;br /&gt;
(It was the best voted talk, we&amp;rsquo;re kinda proud of it.)&lt;/p&gt;
&lt;h2 id=&#34;funding&#34;&gt;Funding
&lt;/h2&gt;&lt;p&gt;The work is supported by the Natural Sciences and Engineering Research Council of Canada under grants
RGPIN-2017-03910 and RGPIN-2024-03787.&lt;/p&gt;
&lt;h2 id=&#34;contributing-to-simdjson&#34;&gt;Contributing to simdjson
&lt;/h2&gt;&lt;p&gt;Head over to &lt;a class=&#34;link&#34; href=&#34;CONTRIBUTING.md&#34; &gt;CONTRIBUTING.md&lt;/a&gt; for information on contributing to simdjson, and
&lt;a class=&#34;link&#34; href=&#34;HACKING.md&#34; &gt;HACKING.md&lt;/a&gt; for information on source, building, and architecture/design.&lt;/p&gt;
&lt;h2 id=&#34;license&#34;&gt;License
&lt;/h2&gt;&lt;p&gt;This code is made available under the &lt;a class=&#34;link&#34; href=&#34;https://www.apache.org/licenses/LICENSE-2.0.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Apache License 2.0&lt;/a&gt; as well as under the MIT License. As a user, you can pick the license you prefer.&lt;/p&gt;
&lt;p&gt;Under Windows, we build some tools using the windows/dirent_portable.h file (which is outside our library code): it is under the liberal (business-friendly) MIT license.&lt;/p&gt;
&lt;p&gt;For compilers that do not support &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/C%2B%2B17&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;C++17&lt;/a&gt;, we bundle the string-view library which is published under the &lt;a class=&#34;link&#34; href=&#34;http://www.boost.org/LICENSE_1_0.txt&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Boost license&lt;/a&gt;. Like the Apache license, the Boost license is a permissive license allowing commercial redistribution.&lt;/p&gt;
&lt;p&gt;For efficient number serialization, we bundle Florian Loitsch&amp;rsquo;s implementation of the Grisu2 algorithm for binary to decimal floating-point numbers. The implementation was slightly modified by JSON for Modern C++ library. Both Florian Loitsch&amp;rsquo;s implementation and JSON for Modern C++ are provided under the MIT license.&lt;/p&gt;
&lt;p&gt;For runtime dispatching, we use some code from the PyTorch project licensed under 3-clause BSD.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>marker</title>
        <link>https://producthunt.programnotes.cn/en/p/marker/</link>
        <pubDate>Sat, 16 Aug 2025 15:27:34 +0800</pubDate>
        
        <guid>https://producthunt.programnotes.cn/en/p/marker/</guid>
        <description>&lt;img src="https://images.unsplash.com/photo-1572295833898-c3f020417552?ixid=M3w0NjAwMjJ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3NTUzMjkyMDF8&amp;ixlib=rb-4.1.0" alt="Featured image of post marker" /&gt;&lt;h1 id=&#34;datalab-tomarker&#34;&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/datalab-to/marker&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;datalab-to/marker&lt;/a&gt;
&lt;/h1&gt;&lt;h1 id=&#34;marker&#34;&gt;Marker
&lt;/h1&gt;&lt;p&gt;Marker converts documents to markdown, JSON, chunks, and HTML quickly and accurately.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Converts PDF, image, PPTX, DOCX, XLSX, HTML, EPUB files in all languages&lt;/li&gt;
&lt;li&gt;Formats tables, forms, equations, inline math, links, references, and code blocks&lt;/li&gt;
&lt;li&gt;Extracts and saves images&lt;/li&gt;
&lt;li&gt;Removes headers/footers/other artifacts&lt;/li&gt;
&lt;li&gt;Extensible with your own formatting and logic&lt;/li&gt;
&lt;li&gt;Does structured extraction, given a JSON schema (beta)&lt;/li&gt;
&lt;li&gt;Optionally boost accuracy with LLMs (and your own prompt)&lt;/li&gt;
&lt;li&gt;Works on GPU, CPU, or MPS&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;performance&#34;&gt;Performance
&lt;/h2&gt;&lt;img src=&#34;data/images/overall.png&#34; width=&#34;800px&#34;/&gt;
&lt;p&gt;Marker benchmarks favorably compared to cloud services like Llamaparse and Mathpix, as well as other open source tools.&lt;/p&gt;
&lt;p&gt;The above results are running single PDF pages serially.  Marker is significantly faster when running in batch mode, with a projected throughput of 25 pages/second on an H100.&lt;/p&gt;
&lt;p&gt;See &lt;a class=&#34;link&#34; href=&#34;#benchmarks&#34; &gt;below&lt;/a&gt; for detailed speed and accuracy benchmarks, and instructions on how to run your own benchmarks.&lt;/p&gt;
&lt;h2 id=&#34;hybrid-mode&#34;&gt;Hybrid Mode
&lt;/h2&gt;&lt;p&gt;For the highest accuracy, pass the &lt;code&gt;--use_llm&lt;/code&gt; flag to use an LLM alongside marker.  This will do things like merge tables across pages, handle inline math, format tables properly, and extract values from forms.  It can use any gemini or ollama model.  By default, it uses &lt;code&gt;gemini-2.0-flash&lt;/code&gt;.  See &lt;a class=&#34;link&#34; href=&#34;#llm-services&#34; &gt;below&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;Here is a table benchmark comparing marker, gemini flash alone, and marker with use_llm:&lt;/p&gt;
&lt;img src=&#34;data/images/table.png&#34; width=&#34;400px&#34;/&gt;
&lt;p&gt;As you can see, the use_llm mode offers higher accuracy than marker or gemini alone.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;PDF&lt;/th&gt;
          &lt;th&gt;File type&lt;/th&gt;
          &lt;th&gt;Markdown&lt;/th&gt;
          &lt;th&gt;JSON&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://greenteapress.com/thinkpython/thinkpython.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Think Python&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;Textbook&lt;/td&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/marker/blob/master/data/examples/markdown/thinkpython/thinkpython.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;View&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/marker/blob/master/data/examples/json/thinkpython.json&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;View&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/pdf/2101.03961.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Switch Transformers&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;arXiv paper&lt;/td&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/marker/blob/master/data/examples/markdown/switch_transformers/switch_trans.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;View&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/marker/blob/master/data/examples/json/switch_trans.json&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;View&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://arxiv.org/pdf/1804.07821.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Multi-column CNN&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;arXiv paper&lt;/td&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/marker/blob/master/data/examples/markdown/multicolcnn/multicolcnn.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;View&lt;/a&gt;&lt;/td&gt;
          &lt;td&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/marker/blob/master/data/examples/json/multicolcnn.json&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;View&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h1 id=&#34;commercial-usage&#34;&gt;Commercial usage
&lt;/h1&gt;&lt;p&gt;I want marker to be as widely accessible as possible, while still funding my development/training costs.  Research and personal usage is always okay, but there are some restrictions on commercial usage.&lt;/p&gt;
&lt;p&gt;The weights for the models are licensed &lt;code&gt;cc-by-nc-sa-4.0&lt;/code&gt;, but I will waive that for any organization under $2M USD in gross revenue in the most recent 12-month period AND under $2M in lifetime VC/angel funding raised. You also must not be competitive with the &lt;a class=&#34;link&#34; href=&#34;https://www.datalab.to/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Datalab API&lt;/a&gt;.  If you want to remove the GPL license requirements (dual-license) and/or use the weights commercially over the revenue limit, check out the options &lt;a class=&#34;link&#34; href=&#34;https://www.datalab.to&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;hosted-api&#34;&gt;Hosted API
&lt;/h1&gt;&lt;p&gt;There&amp;rsquo;s a hosted API for marker available &lt;a class=&#34;link&#34; href=&#34;https://www.datalab.to/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;here&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supports PDF, image, PPT, PPTX, DOC, DOCX, XLS, XLSX, HTML, EPUB files&lt;/li&gt;
&lt;li&gt;1/4th the price of leading cloud-based competitors&lt;/li&gt;
&lt;li&gt;Fast - ~15s for a 250 page PDF&lt;/li&gt;
&lt;li&gt;Supports LLM mode&lt;/li&gt;
&lt;li&gt;High uptime (99.99%)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;community&#34;&gt;Community
&lt;/h1&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://discord.gg//KuZwXNGnfH&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Discord&lt;/a&gt; is where we discuss future development.&lt;/p&gt;
&lt;h1 id=&#34;installation&#34;&gt;Installation
&lt;/h1&gt;&lt;p&gt;You&amp;rsquo;ll need python 3.10+ and &lt;a class=&#34;link&#34; href=&#34;https://pytorch.org/get-started/locally/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;PyTorch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Install with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install marker-pdf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you want to use marker on documents other than PDFs, you will need to install additional dependencies with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install marker-pdf&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;full&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h1 id=&#34;usage&#34;&gt;Usage
&lt;/h1&gt;&lt;p&gt;First, some configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your torch device will be automatically detected, but you can override this.  For example, &lt;code&gt;TORCH_DEVICE=cuda&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Some PDFs, even digital ones, have bad text in them.  Set &lt;code&gt;--force_ocr&lt;/code&gt; to force OCR on all lines, or the &lt;code&gt;strip_existing_ocr&lt;/code&gt; to keep all digital text, and strip out any existing OCR text.&lt;/li&gt;
&lt;li&gt;If you care about inline math, set &lt;code&gt;force_ocr&lt;/code&gt; to convert inline math to LaTeX.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;interactive-app&#34;&gt;Interactive App
&lt;/h2&gt;&lt;p&gt;I&amp;rsquo;ve included a streamlit app that lets you interactively try marker with some basic options.  Run it with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install streamlit streamlit-ace
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;marker_gui
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;convert-a-single-file&#34;&gt;Convert a single file
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;marker_single /path/to/file.pdf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;You can pass in PDFs or images.&lt;/p&gt;
&lt;p&gt;Options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--page_range TEXT&lt;/code&gt;: Specify which pages to process. Accepts comma-separated page numbers and ranges. Example: &lt;code&gt;--page_range &amp;quot;0,5-10,20&amp;quot;&lt;/code&gt; will process pages 0, 5 through 10, and page 20.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--output_format [markdown|json|html|chunks]&lt;/code&gt;: Specify the format for the output results.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--output_dir PATH&lt;/code&gt;: Directory where output files will be saved. Defaults to the value specified in settings.OUTPUT_DIR.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--paginate_output&lt;/code&gt;: Paginates the output, using &lt;code&gt;\n\n{PAGE_NUMBER}&lt;/code&gt; followed by &lt;code&gt;-&lt;/code&gt; * 48, then &lt;code&gt;\n\n&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--use_llm&lt;/code&gt;: Uses an LLM to improve accuracy.  You will need to configure the LLM backend - see &lt;a class=&#34;link&#34; href=&#34;#llm-services&#34; &gt;below&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--force_ocr&lt;/code&gt;: Force OCR processing on the entire document, even for pages that might contain extractable text.  This will also format inline math properly.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--block_correction_prompt&lt;/code&gt;: if LLM mode is active, an optional prompt that will be used to correct the output of marker.  This is useful for custom formatting or logic that you want to apply to the output.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--strip_existing_ocr&lt;/code&gt;: Remove all existing OCR text in the document and re-OCR with surya.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--redo_inline_math&lt;/code&gt;: If you want the absolute highest quality inline math conversion, use this along with &lt;code&gt;--use_llm&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--disable_image_extraction&lt;/code&gt;: Don&amp;rsquo;t extract images from the PDF.  If you also specify &lt;code&gt;--use_llm&lt;/code&gt;, then images will be replaced with a description.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--debug&lt;/code&gt;: Enable debug mode for additional logging and diagnostic information.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--processors TEXT&lt;/code&gt;: Override the default processors by providing their full module paths, separated by commas. Example: &lt;code&gt;--processors &amp;quot;module1.processor1,module2.processor2&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--config_json PATH&lt;/code&gt;: Path to a JSON configuration file containing additional settings.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config --help&lt;/code&gt;: List all available builders, processors, and converters, and their associated configuration.  These values can be used to build a JSON configuration file for additional tweaking of marker defaults.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--converter_cls&lt;/code&gt;: One of &lt;code&gt;marker.converters.pdf.PdfConverter&lt;/code&gt; (default) or &lt;code&gt;marker.converters.table.TableConverter&lt;/code&gt;.  The &lt;code&gt;PdfConverter&lt;/code&gt; will convert the whole PDF, the &lt;code&gt;TableConverter&lt;/code&gt; will only extract and convert tables.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--llm_service&lt;/code&gt;: Which llm service to use if &lt;code&gt;--use_llm&lt;/code&gt; is passed.  This defaults to &lt;code&gt;marker.services.gemini.GoogleGeminiService&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--help&lt;/code&gt;: see all of the flags that can be passed into marker.  (it supports many more options then are listed above)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The list of supported languages for surya OCR is &lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/surya/blob/master/surya/recognition/languages.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;here&lt;/a&gt;.  If you don&amp;rsquo;t need OCR, marker can work with any language.&lt;/p&gt;
&lt;h2 id=&#34;convert-multiple-files&#34;&gt;Convert multiple files
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;marker /path/to/input/folder
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;marker&lt;/code&gt; supports all the same options from &lt;code&gt;marker_single&lt;/code&gt; above.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--workers&lt;/code&gt; is the number of conversion workers to run simultaneously.  This is automatically set by default, but you can increase it to increase throughput, at the cost of more CPU/GPU usage.  Marker will use 5GB of VRAM per worker at the peak, and 3.5GB average.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;convert-multiple-files-on-multiple-gpus&#34;&gt;Convert multiple files on multiple GPUs
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;NUM_DEVICES&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;NUM_WORKERS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;15&lt;/span&gt; marker_chunk_convert ../pdf_in ../md_out
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;NUM_DEVICES&lt;/code&gt; is the number of GPUs to use.  Should be &lt;code&gt;2&lt;/code&gt; or greater.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NUM_WORKERS&lt;/code&gt; is the number of parallel processes to run on each GPU.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;use-from-python&#34;&gt;Use from python
&lt;/h2&gt;&lt;p&gt;See the &lt;code&gt;PdfConverter&lt;/code&gt; class at &lt;code&gt;marker/converters/pdf.py&lt;/code&gt; function for additional arguments that can be passed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.converters.pdf&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfConverter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.models&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.output&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;text_from_rendered&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfConverter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;artifact_dict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;FILEPATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;images&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;text_from_rendered&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;rendered&lt;/code&gt; will be a pydantic basemodel with different properties depending on the output type requested.  With markdown output (default), you&amp;rsquo;ll have the properties &lt;code&gt;markdown&lt;/code&gt;, &lt;code&gt;metadata&lt;/code&gt;, and &lt;code&gt;images&lt;/code&gt;.  For json output, you&amp;rsquo;ll have &lt;code&gt;children&lt;/code&gt;, &lt;code&gt;block_type&lt;/code&gt;, and &lt;code&gt;metadata&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;custom-configuration&#34;&gt;Custom configuration
&lt;/h3&gt;&lt;p&gt;You can pass configuration using the &lt;code&gt;ConfigParser&lt;/code&gt;.  To see all available options, do &lt;code&gt;marker_single --help&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.converters.pdf&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfConverter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.models&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.config.parser&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ConfigParser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;config&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;output_format&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;json&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;ADDITIONAL_KEY&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;VALUE&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ConfigParser&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfConverter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;generate_config_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;artifact_dict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;processor_list&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get_processors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;renderer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get_renderer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;llm_service&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get_llm_service&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;FILEPATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;extract-blocks&#34;&gt;Extract blocks
&lt;/h3&gt;&lt;p&gt;Each document consists of one or more pages.  Pages contain blocks, which can themselves contain other blocks.  It&amp;rsquo;s possible to programmatically manipulate these blocks.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example of extracting all forms from a document:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.converters.pdf&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfConverter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.models&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.schema&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BlockTypes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfConverter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;artifact_dict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;document&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;build_document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;FILEPATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;contained_blocks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BlockTypes&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Look at the processors for more examples of extracting and manipulating blocks.&lt;/p&gt;
&lt;h2 id=&#34;other-converters&#34;&gt;Other converters
&lt;/h2&gt;&lt;p&gt;You can also use other converters that define different conversion pipelines:&lt;/p&gt;
&lt;h3 id=&#34;extract-tables&#34;&gt;Extract tables
&lt;/h3&gt;&lt;p&gt;The &lt;code&gt;TableConverter&lt;/code&gt; will only convert and extract tables:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.converters.table&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;TableConverter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.models&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.output&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;text_from_rendered&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;TableConverter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;artifact_dict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;FILEPATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;images&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;text_from_rendered&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This takes all the same configuration as the PdfConverter.  You can specify the configuration &lt;code&gt;force_layout_block=Table&lt;/code&gt; to avoid layout detection and instead assume every page is a table.  Set &lt;code&gt;output_format=json&lt;/code&gt; to also get cell bounding boxes.&lt;/p&gt;
&lt;p&gt;You can also run this via the CLI with&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;marker_single FILENAME --use_llm --force_layout_block Table --converter_cls marker.converters.table.TableConverter --output_format json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;ocr-only&#34;&gt;OCR Only
&lt;/h3&gt;&lt;p&gt;If you only want to run OCR, you can also do that through the &lt;code&gt;OCRConverter&lt;/code&gt;.  Set &lt;code&gt;--keep_chars&lt;/code&gt; to keep individual characters and bounding boxes.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.converters.ocr&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OCRConverter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.models&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OCRConverter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;artifact_dict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;FILEPATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This takes all the same configuration as the PdfConverter.&lt;/p&gt;
&lt;p&gt;You can also run this via the CLI with&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;marker_single FILENAME --converter_cls marker.converters.ocr.OCRConverter
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;structured-extraction-beta&#34;&gt;Structured Extraction (beta)
&lt;/h3&gt;&lt;p&gt;You can run structured extraction via the &lt;code&gt;ExtractionConverter&lt;/code&gt;.  This requires an llm service to be setup first (see &lt;a class=&#34;link&#34; href=&#34;#llm-services&#34; &gt;here&lt;/a&gt; for details).  You&amp;rsquo;ll get a JSON output with the extracted values.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.converters.extraction&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ExtractionConverter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.models&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;marker.config.parser&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ConfigParser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;pydantic&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BaseModel&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Links&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BaseModel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;links&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;list&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;schema&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Links&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;model_json_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ConfigParser&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;page_schema&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;schema&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ExtractionConverter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;artifact_dict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_model_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;generate_config_dict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;llm_service&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config_parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get_llm_service&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rendered&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;converter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;FILEPATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Rendered will have an &lt;code&gt;original_markdown&lt;/code&gt; field.  If you pass this back in next time you run the converter, as the &lt;code&gt;existing_markdown&lt;/code&gt; config key, you can skip re-parsing the document.&lt;/p&gt;
&lt;h1 id=&#34;output-formats&#34;&gt;Output Formats
&lt;/h1&gt;&lt;h2 id=&#34;markdown&#34;&gt;Markdown
&lt;/h2&gt;&lt;p&gt;Markdown output will include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;image links (images will be saved in the same folder)&lt;/li&gt;
&lt;li&gt;formatted tables&lt;/li&gt;
&lt;li&gt;embedded LaTeX equations (fenced with &lt;code&gt;$$&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Code is fenced with triple backticks&lt;/li&gt;
&lt;li&gt;Superscripts for footnotes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;html&#34;&gt;HTML
&lt;/h2&gt;&lt;p&gt;HTML output is similar to markdown output:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Images are included via &lt;code&gt;img&lt;/code&gt; tags&lt;/li&gt;
&lt;li&gt;equations are fenced with &lt;code&gt;&amp;lt;math&amp;gt;&lt;/code&gt; tags&lt;/li&gt;
&lt;li&gt;code is in &lt;code&gt;pre&lt;/code&gt; tags&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;json&#34;&gt;JSON
&lt;/h2&gt;&lt;p&gt;JSON output will be organized in a tree-like structure, with the leaf nodes being blocks.  Examples of leaf nodes are a single list item, a paragraph of text, or an image.&lt;/p&gt;
&lt;p&gt;The output will be a list, with each list item representing a page.  Each page is considered a block in the internal marker schema.  There are different types of blocks to represent different elements.&lt;/p&gt;
&lt;p&gt;Pages have the keys:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;id&lt;/code&gt; - unique id for the block.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;block_type&lt;/code&gt; - the type of block. The possible block types can be seen in &lt;code&gt;marker/schema/__init__.py&lt;/code&gt;.  As of this writing, they are [&amp;ldquo;Line&amp;rdquo;, &amp;ldquo;Span&amp;rdquo;, &amp;ldquo;FigureGroup&amp;rdquo;, &amp;ldquo;TableGroup&amp;rdquo;, &amp;ldquo;ListGroup&amp;rdquo;, &amp;ldquo;PictureGroup&amp;rdquo;, &amp;ldquo;Page&amp;rdquo;, &amp;ldquo;Caption&amp;rdquo;, &amp;ldquo;Code&amp;rdquo;, &amp;ldquo;Figure&amp;rdquo;, &amp;ldquo;Footnote&amp;rdquo;, &amp;ldquo;Form&amp;rdquo;, &amp;ldquo;Equation&amp;rdquo;, &amp;ldquo;Handwriting&amp;rdquo;, &amp;ldquo;TextInlineMath&amp;rdquo;, &amp;ldquo;ListItem&amp;rdquo;, &amp;ldquo;PageFooter&amp;rdquo;, &amp;ldquo;PageHeader&amp;rdquo;, &amp;ldquo;Picture&amp;rdquo;, &amp;ldquo;SectionHeader&amp;rdquo;, &amp;ldquo;Table&amp;rdquo;, &amp;ldquo;Text&amp;rdquo;, &amp;ldquo;TableOfContents&amp;rdquo;, &amp;ldquo;Document&amp;rdquo;]&lt;/li&gt;
&lt;li&gt;&lt;code&gt;html&lt;/code&gt; - the HTML for the page.  Note that this will have recursive references to children.  The &lt;code&gt;content-ref&lt;/code&gt; tags must be replaced with the child content if you want the full html.  You can see an example of this at &lt;code&gt;marker/output.py:json_to_html&lt;/code&gt;.  That function will take in a single block from the json output, and turn it into HTML.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;polygon&lt;/code&gt; - the 4-corner polygon of the page, in (x1,y1), (x2,y2), (x3, y3), (x4, y4) format.  (x1,y1) is the top left, and coordinates go clockwise.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;children&lt;/code&gt; - the child blocks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The child blocks have two additional keys:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;section_hierarchy&lt;/code&gt; - indicates the sections that the block is part of.  &lt;code&gt;1&lt;/code&gt; indicates an h1 tag, &lt;code&gt;2&lt;/code&gt; an h2, and so on.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;images&lt;/code&gt; - base64 encoded images.  The key will be the block id, and the data will be the encoded image.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that child blocks of pages can have their own children as well (a tree structure).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/page/10/Page/366&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;block_type&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Page&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;html&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;lt;content-ref src=&amp;#39;/page/10/SectionHeader/0&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/SectionHeader/1&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/Text/2&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/Text/3&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/Figure/4&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/SectionHeader/5&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/SectionHeader/6&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/TextInlineMath/7&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/TextInlineMath/8&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/Table/9&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/SectionHeader/10&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;lt;content-ref src=&amp;#39;/page/10/Text/11&amp;#39;&amp;gt;&amp;lt;/content-ref&amp;gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;polygon&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;612.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;612.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;792.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;792.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;children&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/page/10/SectionHeader/0&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;block_type&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;SectionHeader&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;html&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;lt;h1&amp;gt;Supplementary Material for &amp;lt;i&amp;gt;Subspace Adversarial Training&amp;lt;/i&amp;gt; &amp;lt;/h1&amp;gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;polygon&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;217.845703125&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;80.630859375&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;374.73046875&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;80.630859375&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;374.73046875&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;107.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;217.845703125&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;107.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;children&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;section_hierarchy&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/page/10/SectionHeader/1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;#34;images&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;chunks&#34;&gt;Chunks
&lt;/h2&gt;&lt;p&gt;Chunks format is similar to JSON, but flattens everything into a single list instead of a tree.  Only the top level blocks from each page show up. It also has the full HTML of each block inside, so you don&amp;rsquo;t need to crawl the tree to reconstruct it.  This enable flexible and easy chunking for RAG.&lt;/p&gt;
&lt;h2 id=&#34;metadata&#34;&gt;Metadata
&lt;/h2&gt;&lt;p&gt;All output formats will return a metadata dictionary, with the following fields:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;table_of_contents&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;title&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Introduction&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;heading_level&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;page_id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;polygon&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// computed PDF table of contents
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;page_stats&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;page_id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;  &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;text_extraction_method&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;pdftext&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;block_counts&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Span&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h1 id=&#34;llm-services&#34;&gt;LLM Services
&lt;/h1&gt;&lt;p&gt;When running with the &lt;code&gt;--use_llm&lt;/code&gt; flag, you have a choice of services you can use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Gemini&lt;/code&gt; - this will use the Gemini developer API by default.  You&amp;rsquo;ll need to pass &lt;code&gt;--gemini_api_key&lt;/code&gt; to configuration.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Google Vertex&lt;/code&gt; - this will use vertex, which can be more reliable.  You&amp;rsquo;ll need to pass &lt;code&gt;--vertex_project_id&lt;/code&gt;.  To use it, set &lt;code&gt;--llm_service=marker.services.vertex.GoogleVertexService&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ollama&lt;/code&gt; - this will use local models.  You can configure &lt;code&gt;--ollama_base_url&lt;/code&gt; and &lt;code&gt;--ollama_model&lt;/code&gt;. To use it, set &lt;code&gt;--llm_service=marker.services.ollama.OllamaService&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Claude&lt;/code&gt; - this will use the anthropic API.  You can configure &lt;code&gt;--claude_api_key&lt;/code&gt;, and &lt;code&gt;--claude_model_name&lt;/code&gt;.  To use it, set &lt;code&gt;--llm_service=marker.services.claude.ClaudeService&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OpenAI&lt;/code&gt; - this supports any openai-like endpoint. You can configure &lt;code&gt;--openai_api_key&lt;/code&gt;, &lt;code&gt;--openai_model&lt;/code&gt;, and &lt;code&gt;--openai_base_url&lt;/code&gt;. To use it, set &lt;code&gt;--llm_service=marker.services.openai.OpenAIService&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Azure OpenAI&lt;/code&gt; - this uses the Azure OpenAI service. You can configure &lt;code&gt;--azure_endpoint&lt;/code&gt;, &lt;code&gt;--azure_api_key&lt;/code&gt;, and &lt;code&gt;--deployment_name&lt;/code&gt;. To use it, set &lt;code&gt;--llm_service=marker.services.azure_openai.AzureOpenAIService&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These services may have additional optional configuration as well - you can see it by viewing the classes.&lt;/p&gt;
&lt;h1 id=&#34;internals&#34;&gt;Internals
&lt;/h1&gt;&lt;p&gt;Marker is easy to extend.  The core units of marker are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Providers&lt;/code&gt;, at &lt;code&gt;marker/providers&lt;/code&gt;.  These provide information from a source file, like a PDF.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Builders&lt;/code&gt;, at &lt;code&gt;marker/builders&lt;/code&gt;.  These generate the initial document blocks and fill in text, using info from the providers.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Processors&lt;/code&gt;, at &lt;code&gt;marker/processors&lt;/code&gt;.  These process specific blocks, for example the table formatter is a processor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Renderers&lt;/code&gt;, at &lt;code&gt;marker/renderers&lt;/code&gt;. These use the blocks to render output.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Schema&lt;/code&gt;, at &lt;code&gt;marker/schema&lt;/code&gt;.  The classes for all the block types.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Converters&lt;/code&gt;, at &lt;code&gt;marker/converters&lt;/code&gt;.  They run the whole end to end pipeline.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To customize processing behavior, override the &lt;code&gt;processors&lt;/code&gt;.  To add new output formats, write a new &lt;code&gt;renderer&lt;/code&gt;.  For additional input formats, write a new &lt;code&gt;provider.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Processors and renderers can be directly passed into the base &lt;code&gt;PDFConverter&lt;/code&gt;, so you can specify your own custom processing easily.&lt;/p&gt;
&lt;h2 id=&#34;api-server&#34;&gt;API server
&lt;/h2&gt;&lt;p&gt;There is a very simple API server you can run like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install -U uvicorn fastapi python-multipart
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;marker_server --port &lt;span class=&#34;m&#34;&gt;8001&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This will start a fastapi server that you can access at &lt;code&gt;localhost:8001&lt;/code&gt;.  You can go to &lt;code&gt;localhost:8001/docs&lt;/code&gt; to see the endpoint options.&lt;/p&gt;
&lt;p&gt;You can send requests like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;import requests
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;import json
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;post_data = {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &amp;#39;filepath&amp;#39;: &amp;#39;FILEPATH&amp;#39;,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    # Add other params here
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;requests.post(&amp;#34;http://localhost:8001/marker&amp;#34;, data=json.dumps(post_data)).json()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Note that this is not a very robust API, and is only intended for small-scale use.  If you want to use this server, but want a more robust conversion option, you can use the hosted &lt;a class=&#34;link&#34; href=&#34;https://www.datalab.to/plans&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Datalab API&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;troubleshooting&#34;&gt;Troubleshooting
&lt;/h1&gt;&lt;p&gt;There are some settings that you may find useful if things aren&amp;rsquo;t working the way you expect:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you have issues with accuracy, try setting &lt;code&gt;--use_llm&lt;/code&gt; to use an LLM to improve quality.  You must set &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt; to a Gemini API key for this to work.&lt;/li&gt;
&lt;li&gt;Make sure to set &lt;code&gt;force_ocr&lt;/code&gt; if you see garbled text - this will re-OCR the document.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TORCH_DEVICE&lt;/code&gt; - set this to force marker to use a given torch device for inference.&lt;/li&gt;
&lt;li&gt;If you&amp;rsquo;re getting out of memory errors, decrease worker count.  You can also try splitting up long PDFs into multiple files.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;debugging&#34;&gt;Debugging
&lt;/h2&gt;&lt;p&gt;Pass the &lt;code&gt;debug&lt;/code&gt; option to activate debug mode.  This will save images of each page with detected layout and text, as well as output a json file with additional bounding box information.&lt;/p&gt;
&lt;h1 id=&#34;benchmarks&#34;&gt;Benchmarks
&lt;/h1&gt;&lt;h2 id=&#34;overall-pdf-conversion&#34;&gt;Overall PDF Conversion
&lt;/h2&gt;&lt;p&gt;We created a &lt;a class=&#34;link&#34; href=&#34;https://huggingface.co/datasets/datalab-to/marker_benchmark&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;benchmark set&lt;/a&gt; by extracting single PDF pages from common crawl.  We scored based on a heuristic that aligns text with ground truth text segments, and an LLM as a judge scoring method.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Method&lt;/th&gt;
          &lt;th&gt;Avg Time&lt;/th&gt;
          &lt;th&gt;Heuristic Score&lt;/th&gt;
          &lt;th&gt;LLM Score&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;marker&lt;/td&gt;
          &lt;td&gt;2.83837&lt;/td&gt;
          &lt;td&gt;95.6709&lt;/td&gt;
          &lt;td&gt;4.23916&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;llamaparse&lt;/td&gt;
          &lt;td&gt;23.348&lt;/td&gt;
          &lt;td&gt;84.2442&lt;/td&gt;
          &lt;td&gt;3.97619&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;mathpix&lt;/td&gt;
          &lt;td&gt;6.36223&lt;/td&gt;
          &lt;td&gt;86.4281&lt;/td&gt;
          &lt;td&gt;4.15626&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;docling&lt;/td&gt;
          &lt;td&gt;3.69949&lt;/td&gt;
          &lt;td&gt;86.7073&lt;/td&gt;
          &lt;td&gt;3.70429&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Benchmarks were run on an H100 for markjer and docling - llamaparse and mathpix used their cloud services.  We can also look at it by document type:&lt;/p&gt;
&lt;img src=&#34;data/images/per_doc.png&#34; width=&#34;1000px&#34;/&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Document Type&lt;/th&gt;
          &lt;th&gt;Marker heuristic&lt;/th&gt;
          &lt;th&gt;Marker LLM&lt;/th&gt;
          &lt;th&gt;Llamaparse Heuristic&lt;/th&gt;
          &lt;th&gt;Llamaparse LLM&lt;/th&gt;
          &lt;th&gt;Mathpix Heuristic&lt;/th&gt;
          &lt;th&gt;Mathpix LLM&lt;/th&gt;
          &lt;th&gt;Docling Heuristic&lt;/th&gt;
          &lt;th&gt;Docling LLM&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Scientific paper&lt;/td&gt;
          &lt;td&gt;96.6737&lt;/td&gt;
          &lt;td&gt;4.34899&lt;/td&gt;
          &lt;td&gt;87.1651&lt;/td&gt;
          &lt;td&gt;3.96421&lt;/td&gt;
          &lt;td&gt;91.2267&lt;/td&gt;
          &lt;td&gt;4.46861&lt;/td&gt;
          &lt;td&gt;92.135&lt;/td&gt;
          &lt;td&gt;3.72422&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Book page&lt;/td&gt;
          &lt;td&gt;97.1846&lt;/td&gt;
          &lt;td&gt;4.16168&lt;/td&gt;
          &lt;td&gt;90.9532&lt;/td&gt;
          &lt;td&gt;4.07186&lt;/td&gt;
          &lt;td&gt;93.8886&lt;/td&gt;
          &lt;td&gt;4.35329&lt;/td&gt;
          &lt;td&gt;90.0556&lt;/td&gt;
          &lt;td&gt;3.64671&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Other&lt;/td&gt;
          &lt;td&gt;95.1632&lt;/td&gt;
          &lt;td&gt;4.25076&lt;/td&gt;
          &lt;td&gt;81.1385&lt;/td&gt;
          &lt;td&gt;4.01835&lt;/td&gt;
          &lt;td&gt;79.6231&lt;/td&gt;
          &lt;td&gt;4.00306&lt;/td&gt;
          &lt;td&gt;83.8223&lt;/td&gt;
          &lt;td&gt;3.76147&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Form&lt;/td&gt;
          &lt;td&gt;88.0147&lt;/td&gt;
          &lt;td&gt;3.84663&lt;/td&gt;
          &lt;td&gt;66.3081&lt;/td&gt;
          &lt;td&gt;3.68712&lt;/td&gt;
          &lt;td&gt;64.7512&lt;/td&gt;
          &lt;td&gt;3.33129&lt;/td&gt;
          &lt;td&gt;68.3857&lt;/td&gt;
          &lt;td&gt;3.40491&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Presentation&lt;/td&gt;
          &lt;td&gt;95.1562&lt;/td&gt;
          &lt;td&gt;4.13669&lt;/td&gt;
          &lt;td&gt;81.2261&lt;/td&gt;
          &lt;td&gt;4&lt;/td&gt;
          &lt;td&gt;83.6737&lt;/td&gt;
          &lt;td&gt;3.95683&lt;/td&gt;
          &lt;td&gt;84.8405&lt;/td&gt;
          &lt;td&gt;3.86331&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Financial document&lt;/td&gt;
          &lt;td&gt;95.3697&lt;/td&gt;
          &lt;td&gt;4.39106&lt;/td&gt;
          &lt;td&gt;82.5812&lt;/td&gt;
          &lt;td&gt;4.16111&lt;/td&gt;
          &lt;td&gt;81.3115&lt;/td&gt;
          &lt;td&gt;4.05556&lt;/td&gt;
          &lt;td&gt;86.3882&lt;/td&gt;
          &lt;td&gt;3.8&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Letter&lt;/td&gt;
          &lt;td&gt;98.4021&lt;/td&gt;
          &lt;td&gt;4.5&lt;/td&gt;
          &lt;td&gt;93.4477&lt;/td&gt;
          &lt;td&gt;4.28125&lt;/td&gt;
          &lt;td&gt;96.0383&lt;/td&gt;
          &lt;td&gt;4.45312&lt;/td&gt;
          &lt;td&gt;92.0952&lt;/td&gt;
          &lt;td&gt;4.09375&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Engineering document&lt;/td&gt;
          &lt;td&gt;93.9244&lt;/td&gt;
          &lt;td&gt;4.04412&lt;/td&gt;
          &lt;td&gt;77.4854&lt;/td&gt;
          &lt;td&gt;3.72059&lt;/td&gt;
          &lt;td&gt;80.3319&lt;/td&gt;
          &lt;td&gt;3.88235&lt;/td&gt;
          &lt;td&gt;79.6807&lt;/td&gt;
          &lt;td&gt;3.42647&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Legal document&lt;/td&gt;
          &lt;td&gt;96.689&lt;/td&gt;
          &lt;td&gt;4.27759&lt;/td&gt;
          &lt;td&gt;86.9769&lt;/td&gt;
          &lt;td&gt;3.87584&lt;/td&gt;
          &lt;td&gt;91.601&lt;/td&gt;
          &lt;td&gt;4.20805&lt;/td&gt;
          &lt;td&gt;87.8383&lt;/td&gt;
          &lt;td&gt;3.65552&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Newspaper page&lt;/td&gt;
          &lt;td&gt;98.8733&lt;/td&gt;
          &lt;td&gt;4.25806&lt;/td&gt;
          &lt;td&gt;84.7492&lt;/td&gt;
          &lt;td&gt;3.90323&lt;/td&gt;
          &lt;td&gt;96.9963&lt;/td&gt;
          &lt;td&gt;4.45161&lt;/td&gt;
          &lt;td&gt;92.6496&lt;/td&gt;
          &lt;td&gt;3.51613&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Magazine page&lt;/td&gt;
          &lt;td&gt;98.2145&lt;/td&gt;
          &lt;td&gt;4.38776&lt;/td&gt;
          &lt;td&gt;87.2902&lt;/td&gt;
          &lt;td&gt;3.97959&lt;/td&gt;
          &lt;td&gt;93.5934&lt;/td&gt;
          &lt;td&gt;4.16327&lt;/td&gt;
          &lt;td&gt;93.0892&lt;/td&gt;
          &lt;td&gt;4.02041&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;throughput&#34;&gt;Throughput
&lt;/h2&gt;&lt;p&gt;We benchmarked throughput using a &lt;a class=&#34;link&#34; href=&#34;https://www.greenteapress.com/thinkpython/thinkpython.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;single long PDF&lt;/a&gt;.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Method&lt;/th&gt;
          &lt;th&gt;Time per page&lt;/th&gt;
          &lt;th&gt;Time per document&lt;/th&gt;
          &lt;th&gt;VRAM used&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;marker&lt;/td&gt;
          &lt;td&gt;0.18&lt;/td&gt;
          &lt;td&gt;43.42&lt;/td&gt;
          &lt;td&gt;3.17GB&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The projected throughput is 122 pages per second on an H100 - we can run 22 individual processes given the VRAM used.&lt;/p&gt;
&lt;h2 id=&#34;table-conversion&#34;&gt;Table Conversion
&lt;/h2&gt;&lt;p&gt;Marker can extract tables from PDFs using &lt;code&gt;marker.converters.table.TableConverter&lt;/code&gt;. The table extraction performance is measured by comparing the extracted HTML representation of tables against the original HTML representations using the test split of &lt;a class=&#34;link&#34; href=&#34;https://developer.ibm.com/exchanges/data/all/fintabnet/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;FinTabNet&lt;/a&gt;. The HTML representations are compared using a tree edit distance based metric to judge both structure and content. Marker detects and identifies the structure of all tables in a PDF page and achieves these scores:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Method&lt;/th&gt;
          &lt;th&gt;Avg score&lt;/th&gt;
          &lt;th&gt;Total tables&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;marker&lt;/td&gt;
          &lt;td&gt;0.816&lt;/td&gt;
          &lt;td&gt;99&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;marker w/use_llm&lt;/td&gt;
          &lt;td&gt;0.907&lt;/td&gt;
          &lt;td&gt;99&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;gemini&lt;/td&gt;
          &lt;td&gt;0.829&lt;/td&gt;
          &lt;td&gt;99&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The &lt;code&gt;--use_llm&lt;/code&gt; flag can significantly improve table recognition performance, as you can see.&lt;/p&gt;
&lt;p&gt;We filter out tables that we cannot align with the ground truth, since fintabnet and our layout model have slightly different detection methods (this results in some tables being split/merged).&lt;/p&gt;
&lt;h2 id=&#34;running-your-own-benchmarks&#34;&gt;Running your own benchmarks
&lt;/h2&gt;&lt;p&gt;You can benchmark the performance of marker on your machine. Install marker manually with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/VikParuchuri/marker.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;poetry install
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;overall-pdf-conversion-1&#34;&gt;Overall PDF Conversion
&lt;/h3&gt;&lt;p&gt;Download the benchmark data &lt;a class=&#34;link&#34; href=&#34;https://drive.google.com/file/d/1ZSeWDo2g1y0BRLT7KnbmytV2bjWARWba/view?usp=sharing&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;here&lt;/a&gt; and unzip. Then run the overall benchmark like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python benchmarks/overall.py --methods marker --scores heuristic,llm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--use_llm&lt;/code&gt; use an llm to improve the marker results.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--max_rows&lt;/code&gt; how many rows to process for the benchmark.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--methods&lt;/code&gt; can be &lt;code&gt;llamaparse&lt;/code&gt;, &lt;code&gt;mathpix&lt;/code&gt;, &lt;code&gt;docling&lt;/code&gt;, &lt;code&gt;marker&lt;/code&gt;.  Comma separated.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--scores&lt;/code&gt; which scoring functions to use, can be &lt;code&gt;llm&lt;/code&gt;, &lt;code&gt;heuristic&lt;/code&gt;.  Comma separated.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;table-conversion-1&#34;&gt;Table Conversion
&lt;/h3&gt;&lt;p&gt;The processed FinTabNet dataset is hosted &lt;a class=&#34;link&#34; href=&#34;https://huggingface.co/datasets/datalab-to/fintabnet-test&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;here&lt;/a&gt; and is automatically downloaded. Run the benchmark with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;python benchmarks/table/table.py --max_rows &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--use_llm&lt;/code&gt; uses an llm with marker to improve accuracy.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--use_gemini&lt;/code&gt; also benchmarks gemini 2.0 flash.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;how-it-works&#34;&gt;How it works
&lt;/h1&gt;&lt;p&gt;Marker is a pipeline of deep learning models:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extract text, OCR if necessary (heuristics, &lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/surya&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;surya&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Detect page layout and find reading order (&lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/surya&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;surya&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Clean and format each block (heuristics, &lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/texify&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;texify&lt;/a&gt;, &lt;a class=&#34;link&#34; href=&#34;https://github.com/VikParuchuri/surya&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;surya&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Optionally use an LLM to improve quality&lt;/li&gt;
&lt;li&gt;Combine blocks and postprocess complete text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It only uses models where necessary, which improves speed and accuracy.&lt;/p&gt;
&lt;h1 id=&#34;limitations&#34;&gt;Limitations
&lt;/h1&gt;&lt;p&gt;PDF is a tricky format, so marker will not always work perfectly.  Here are some known limitations that are on the roadmap to address:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Very complex layouts, with nested tables and forms, may not work&lt;/li&gt;
&lt;li&gt;Forms may not be rendered well&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: Passing the &lt;code&gt;--use_llm&lt;/code&gt; and &lt;code&gt;--force_ocr&lt;/code&gt; flags will mostly solve these issues.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>FieldStation42</title>
        <link>https://producthunt.programnotes.cn/en/p/fieldstation42/</link>
        <pubDate>Sun, 11 May 2025 15:26:50 +0800</pubDate>
        
        <guid>https://producthunt.programnotes.cn/en/p/fieldstation42/</guid>
        <description>&lt;img src="https://images.unsplash.com/photo-1623325596331-456381aee37b?ixid=M3w0NjAwMjJ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3NDY5NDgzNjN8&amp;ixlib=rb-4.1.0" alt="Featured image of post FieldStation42" /&gt;&lt;h1 id=&#34;shane-masonfieldstation42&#34;&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;shane-mason/FieldStation42&lt;/a&gt;
&lt;/h1&gt;&lt;h1 id=&#34;fieldstation42&#34;&gt;FieldStation42
&lt;/h1&gt;&lt;p&gt;Cable and broadcast TV simulator intended to provide an authentic experience of watching OTA television with the following goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When the TV is turned on, a believable show for the time slot and network should be playing&lt;/li&gt;
&lt;li&gt;When switching between channels, the shows should continue playing serially as though they had been broadcasting the whole time&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://producthunt.programnotes.cn/docs/retro-tv.png?raw=true&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;An older TV with an antenna rotator box in the background&#34;
	
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;features&#34;&gt;Features
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Supports multiple simultanous channels&lt;/li&gt;
&lt;li&gt;Automatically interleaves commercial break and bumps into content&lt;/li&gt;
&lt;li&gt;Generates weekly schedules based on per-station configurations&lt;/li&gt;
&lt;li&gt;Feature length content - supports movie length show blocks&lt;/li&gt;
&lt;li&gt;Randomly selects shows from the programming slot that have not been played recently to keep a fresh lineup&lt;/li&gt;
&lt;li&gt;Set dates ranges for shows (like seasonal sports or holiday shows)&lt;/li&gt;
&lt;li&gt;Per-station configuration of station sign-off video and off-air loops&lt;/li&gt;
&lt;li&gt;UX to manage catalogs and schedules&lt;/li&gt;
&lt;li&gt;Optional hardware connections to change the channel&lt;/li&gt;
&lt;li&gt;Loooing channels - useful for community bulliten channels&lt;/li&gt;
&lt;li&gt;Preview/guide channel with embedded video and configurable messages
&lt;ul&gt;
&lt;li&gt;This is a new feature - documentation in progress in the &lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42/wiki&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;FieldStation42 Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Flexible scheduling to support all kinds of channel types
&lt;ul&gt;
&lt;li&gt;Traditional networks channels with commercials and bumps&lt;/li&gt;
&lt;li&gt;Commercial free channels with optional end bump padding at end (movie channels, public broadcasting networks)&lt;/li&gt;
&lt;li&gt;Loop channels, useful for community bulletin style channels or information loops.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;https://producthunt.programnotes.cn/docs/cable_cover_3.png?raw=true&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;A cable box next to a TV&#34;
	
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;alpha-software---installation-is-not-simple&#34;&gt;Alpha software - installation is not simple
&lt;/h2&gt;&lt;p&gt;This is a fairly new project and in active development - installation requires some background in the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Basic linux command line usage&lt;/li&gt;
&lt;li&gt;Reading and editing JSON configuration files&lt;/li&gt;
&lt;li&gt;Movie file conversion and organizing in folders&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;installation--setup&#34;&gt;Installation &amp;amp; Setup
&lt;/h2&gt;&lt;p&gt;For a complete, step-by-step guide to setting up and administering FieldStation42 software, check out the &lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42/wiki&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;FieldStation42 Guide&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;quickstart-setup&#34;&gt;Quickstart Setup
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Ensure Python 3 and MPV are installed on your system&lt;/li&gt;
&lt;li&gt;Clone the repository - this will become you main working directory.&lt;/li&gt;
&lt;li&gt;Run the install script&lt;/li&gt;
&lt;li&gt;Add your own content (videos)&lt;/li&gt;
&lt;li&gt;Configure your stations
&lt;ul&gt;
&lt;li&gt;Copy an example json file from &lt;code&gt;confs/examples&lt;/code&gt; into &lt;code&gt;confs/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Generate a weekly schedule
&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;python3 station_42.py&lt;/code&gt; on the command line
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;--rebuild_catalog&lt;/code&gt; option if content has changed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Watch TV
&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;field_player.py&lt;/code&gt; on the command line&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Configure start-on-boot (optional and not recommended unless you are making a dedicated device.)
&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;fs42/hot_start.sh&lt;/code&gt; on the command line&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The quickstart above is only designed to provide an overview of the required steps - use the &lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42/wiki&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;FieldStation42 Guide&lt;/a&gt; for more detailed description of the steps.&lt;/p&gt;
&lt;h1 id=&#34;how-it-works&#34;&gt;How It Works
&lt;/h1&gt;&lt;p&gt;FieldStation42 has multiple components that work together to recreate that old-school TV nostalgia.&lt;/p&gt;
&lt;h3 id=&#34;station_42py&#34;&gt;station_42.py
&lt;/h3&gt;&lt;p&gt;Use this to create catalogs and generate schedules. Catalogs are used to store metadata about the stations content, so they need to be rebuilt each time the content changes. Since it is inspecting files on disk, this can take some time depending on the number of videos in your content library. The liquid-scheduler uses the catalogs and the stations configuration to build schedules, so catalogs should be built first. Running &lt;code&gt;station_42.py&lt;/code&gt; with no arguments will start a UI that runs in the terminal. You can use this to manage catalogs and schedules, or you can perform all operations using command line arguments with no UI. To see the list of all options, run &lt;code&gt;station_42.py --help&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;field_playerpy&#34;&gt;field_player.py
&lt;/h3&gt;&lt;p&gt;This is the main TV interface. On startup, it will read the schedule and open the correct video file and skip to the correct position based on the current time. It will re-perform this step each time the channel is changed. If you tune back to a previous channel, it will pick up the current time and start playing as though it had been playing the whole time.&lt;/p&gt;
&lt;p&gt;The player monitors the plain text file &lt;code&gt;runtime/channel.socket&lt;/code&gt; for commands to change the channel and will change to the next station configured in &lt;code&gt;main_config&lt;/code&gt; in &lt;code&gt;confs/fieldStation42_conf.py&lt;/code&gt; if any content is found there - or you can use the following command to cause the player to change to channel 3:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;echo {\&amp;quot;command\&amp;quot;: \&amp;quot;direct\&amp;quot;, \&amp;quot;channel\&amp;quot;: 3} &amp;gt; runtime/channel.socket&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can also open &lt;code&gt;runtime/channel.socket&lt;/code&gt; in a text editor and enter the following json snippet (change 3 to whatever number you want to change to)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{&amp;quot;command&amp;quot;: &amp;quot;direct&amp;quot;, &amp;quot;channel&amp;quot;: 3}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The following command will cause the player to tune up or down respectively&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{&amp;quot;command&amp;quot;: &amp;quot;up&amp;quot;, &amp;quot;channel&amp;quot;: -1}&lt;/code&gt;
&lt;code&gt;{&amp;quot;command&amp;quot;: &amp;quot;down&amp;quot;, &amp;quot;channel&amp;quot;: -1}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The player writes its status and current channel to &lt;code&gt;runtime/play_status.socket&lt;/code&gt; - this can be monitored by an external program if needed. See &lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42/wiki/Changing-Channel-From-Script&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;this page&lt;/a&gt; for more information on intgrating with &lt;code&gt;channel.socket&lt;/code&gt; and &lt;code&gt;play_status.socket&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;command_inputpy&#34;&gt;command_input.py
&lt;/h3&gt;&lt;p&gt;This is provided as an example component to show how to connect an external device or program to invoke a channel changes and pass status information. This script listens for incoming commands on the pi&amp;rsquo;s UART connection and then writes channel change commands to &lt;code&gt;runtime/channel.socket&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;using-hotstartsh&#34;&gt;Using hotstart.sh
&lt;/h2&gt;&lt;p&gt;This file is for use on a running system that has been configured and testing, because it swallows output so you&amp;rsquo;ll never know what&amp;rsquo;s going wrong. This file is intended to be used to start the player running on system boot up.&lt;/p&gt;
&lt;h2 id=&#34;connecting-to-a-tv&#34;&gt;Connecting to a TV
&lt;/h2&gt;&lt;p&gt;The Raspberry Pi has an HDMI output, but if you want to connect it to a vintage TV, you will need to convert that to an input signal your TV can understand. If your TV has composite or RF, you can use an HTMI-&amp;gt;Composit or HDMI-&amp;gt;RF adapter. These units are available online or at an electronics retailer.&lt;/p&gt;
&lt;h2 id=&#34;connecting-a-remote-control-or-other-device&#34;&gt;Connecting a remote control or other device
&lt;/h2&gt;&lt;p&gt;Since the player can recieve external commands and publishes its status as described above, its easy to connect external devices of all kinds. See &lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42/wiki/Changing-Channel-From-Script&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;this wiki page&lt;/a&gt; for more information on intgrating with &lt;code&gt;channel.socket&lt;/code&gt; and &lt;code&gt;play_status.socket&lt;/code&gt;. For a detailed guide on setting up a bluetooth remote control, &lt;a class=&#34;link&#34; href=&#34;https://github.com/shane-mason/FieldStation42/discussions/47&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;see this page in the discussion boards&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://producthunt.programnotes.cn/docs/retro-tv-setup_bb.png?raw=true&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Fritzing diagram for the system&#34;
	
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;raspberry-pico-setup&#34;&gt;Raspberry Pico Setup
&lt;/h2&gt;&lt;p&gt;This is only required if you are building the channel change detector component (not required).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install Circuit Python per their instructions and install dependencies for Neopixels.&lt;/li&gt;
&lt;li&gt;Add the contents of &lt;code&gt;aerial_listener.py&lt;/code&gt; to &lt;code&gt;code.py&lt;/code&gt; on the device so that it starts at boot.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The fritzing diagram shows how to connect the components together to enable channel changes.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
