aleph.model.document_tag

DocumentTag

class aleph.model.document_tag.DocumentTag

Imports

  • <UNKNOWN>
  • <UNKNOWN>

Summary

A record reflects an entity or tag extracted from a document.

delete_by(cls)
__repr__(self)

DocumentTagCollector

class aleph.model.document_tag.DocumentTagCollector

Imports

  • object

Summary

Utility class to collect and aggregate tags from a particular process.

This is useful when many tags about the same documented are emitted by a particular source.

__init__(self, document, origin)
__len__(self)
emit(self, text, type)

Create a tag, this can be called multiple times with the same text.

save(self)

Flush all existing tags from this origin and store new ones.