pycognaize.document.field.field.Field

class Field(name, value='', tags=None, field_id=None, group_key=None, confidence=-1.0, group_name=None, classification_labels=None, mapping=None)[source]

Bases: object

Base class for all Field types

Parameters:
  • name (str)

  • value (str)

  • tags (Optional[List[BoxTag]])

  • field_id (Optional[str])

  • group_key (Optional[str])

  • confidence (Optional[float])

  • group_name (Optional[str])

  • classification_labels (Optional[ClassificationLabels])

  • mapping (Optional[List[Dict[str, str]]])

Methods

construct_from_raw

Use raw dictionary in order to recreate the Field python object

to_dict

Return a dictionary representing the field object

Attributes

classes

classification_labels

confidence

field_id

group_key

group_name

mapping

name

raw_value

tags

value

abstract classmethod construct_from_raw(raw, pages, html=None, labels=None)[source]

Use raw dictionary in order to recreate the Field python object

Parameters:
Return type:

Field

tag_class

alias of BoxTag

abstract to_dict()[source]

Return a dictionary representing the field object

Return type:

dict