CatgirlIntelligenceAgency/code/processes/converting-process
Viktor Lofgren 785d8deadd (crawler) Improve meta-tag redirect handling, add tests for redirects.
Wrote a new test to examine the redirect behavior of the crawler, ensuring that the redirect URL is the URL that is reported in the parquet file.  This works as intended.

Noticed in the course of this that the crawler doesn't add links from meta-tag redirects to the crawl frontier.  Added logic to handle this case, amended the test case to verify the new behavior.  Added the meta-redirect case to the HtmlDocumentProcessorPlugin as well, so that we consider it a link between documents in the unlikely case that a meta redirect is to another domain.
2024-02-01 20:30:43 +01:00
..
src (crawler) Improve meta-tag redirect handling, add tests for redirects. 2024-02-01 20:30:43 +01:00
build.gradle (control) Fully automatic conversion 2024-01-22 13:03:24 +01:00
readme.md (docs) Improve architectural documentation for the converter. 2023-11-30 20:43:22 +01:00

Converting Process

The converting process reads crawl data and extracts information to be fed into the index, such as keywords, metadata, urls, descriptions...

Structure

Most information is extracted from the document itself within DocumentProcessor, but some information is extracted from the context of the document, such as other documents on the same domain. This is done in DomainProcessor.

To support multiple document formats, the converting process is pluggable. Each plugin is responsible for converting a single document format, such as HTML or plain text.

Further, the HTML plugin supports specializations, which refine the conversion process for specific server software, such as Javadoc, MediaWiki, PhpBB, etc. This helps to improve the processing for common types of websites, and makes up for the fact that it's hard to build a one-size-fits-all heuristic for deciding which parts of a document are important that does justice to every website.

Anchor Text

The converting process also supports supplementing the data with external information, such as anchor texts. This is done automatically if atags.parquet is available in the data/-directory. atags.parquet can be downloaded from here.

The rationale for doing this as well as the details of how the file is generated is described in this blog post: https://www.marginalia.nu/log/93_atags/

Central Classes

See Also