DocWire SDK
DocWire SDK: Deterministic, auditable, and secure data processing in C++20. On-premise by default. No compromises on computational speed.
Loading...
Searching...
No Matches
docwire::content_type::detector Class Reference

Content type detection chain element. More...

#include <content_type.h>

Inheritance diagram for docwire::content_type::detector:

Public Member Functions

 detector (ref_or_owned< by_signature::database > signatures_db_to_use=by_signature::database{})
 Constructs a new detector with the given database of signatures.
continuation operator() (message_ptr msg, const message_callbacks &emit_message)

Detailed Description

Content type detection chain element.

Detects and assigns content types to the provided data source using various detection strategies.

This class is a chain element that detects and assigns content types to data sources using the following detection methods:

  • By file extension
  • By file signature
  • Image content detection
  • ODF and OOXML format detection
  • ASP content detection
  • HTML content detection
  • iWork content detection
  • ODF Flat format detection
  • Outlook format detection
  • XLSB format detection
See also
performing file type detection example
content_type::detect
content_type::by_file_extension::detector
content_type::by_signature::detector
content_type::image::detector
content_type::odf_ooxml::detector
content_type::asp::detector
content_type::html::detector
content_type::iwork::detector
content_type::odf_flat::detector
content_type::outlook::detector
content_type::xlsb::detector
Examples
file_type_determination.cpp, filter_emails_by_subject.cpp, join_transformers.cpp, local_ai_classify.cpp, local_ai_find.cpp, local_ai_sentiment.cpp, local_ai_summary.cpp, local_ai_translate.cpp, local_embedding_similarity.cpp, openai_classify.cpp, openai_embedding.cpp, openai_find_image.cpp, openai_sentiment.cpp, openai_translate.cpp, openai_voice_summary.cpp, parse_archives.cpp, path_to_text_stream.cpp, reuse_chain.cpp, and stream_to_html.cpp.

Definition at line 106 of file content_type.h.

Constructor & Destructor Documentation

◆ detector()

docwire::content_type::detector::detector ( ref_or_owned< by_signature::database > signatures_db_to_use = by_signature::database{})
inline

Constructs a new detector with the given database of signatures.

The detector will use the provided database of signatures for content type detection. If no database is provided, it will be created and loaded.

Parameters
signatures_db_to_useThe database of signatures to be used for content type detection.
See also
content_type::by_signature::database

Definition at line 120 of file content_type.h.

Member Function Documentation

◆ operator()()

continuation docwire::content_type::detector::operator() ( message_ptr msg,
const message_callbacks & emit_message )
inline

Definition at line 123 of file content_type.h.


The documentation for this class was generated from the following file: