DocumentationAPI Reference📓 Tutorials🧑‍🍳 Cookbook🤝 Integrations💜 Discord🎨 Studio (Waitlist)
API Reference

Abstract class for the Document Classifier.

Module base

BaseDocumentClassifier

class BaseDocumentClassifier(BaseComponent)

BaseDocumentClassifier.run

def run(documents: Union[List[dict], List[Document]], root_node: str)

Arguments:

  • documents: A list of Document objects.
  • root_node: The root node of the pipeline's graph.

BaseDocumentClassifier.run_batch

def run_batch(documents: Union[List[Document], List[List[Document]]],
              batch_size: Optional[int] = None)

Arguments:

  • documents: List of list of Documents.
  • batch_size: Number of Documents to process at a time.

BaseDocumentClassifier.timing

def timing(fn, attr_name)

Wrapper method used to time functions.