pycognaize.common.utils.intersects

intersects(word, left, right, top, bottom)[source]
Given the word and coordinates of the area,

returns true if word intersects area, otherwise false

Parameters:
  • word (dict) – dictionary, containing coordinates, ocr_text and word_id_number of the word

  • left ([<class ‘int’>, <class ‘float’>]) – left coordinate

  • right ([<class ‘int’>, <class ‘float’>]) – right coordinate

  • top ([<class ‘int’>, <class ‘float’>]) – top coordinate

  • bottom ([<class ‘int’>, <class ‘float’>]) – bottom coordinate

Return type:

bool

Returns:

bool