@@ -22,22 +22,22 @@ class OcrPage
2222 /**
2323 * Checks whether the words are on the same line.
2424 *
25- * @param \Mindee\Parsing\Common\Ocr\ OcrWord $currentWord Reference word to compare.
26- * @param \Mindee\Parsing\Common\Ocr\ OcrWord $nextWord Next word to compare.
25+ * @param OcrWord $currentWord Reference word to compare.
26+ * @param OcrWord $nextWord Next word to compare.
2727 * @return boolean
2828 */
2929 private static function areWordsOnSameLine (OcrWord $ currentWord , OcrWord $ nextWord ): bool
3030 {
31- $ currentInNext = PolygonUtils:: isPointInPolygonY ( $ currentWord ->polygon ->getCentroid (), $ nextWord ->polygon );
32- $ nextInCurrent = PolygonUtils:: isPointInPolygonY ( $ nextWord ->polygon ->getCentroid (), $ currentWord ->polygon );
31+ $ currentInNext = $ nextWord ->polygon ->isPointInY ( $ currentWord ->polygon -> getCentroid () );
32+ $ nextInCurrent = $ currentWord ->polygon ->isPointInY ( $ nextWord ->polygon -> getCentroid () );
3333 return $ currentInNext || $ nextInCurrent ;
3434 }
3535
3636 /**
3737 * Compares word positions on the X axis. Returns a sort-compliant result (0;-1;1).
3838 *
39- * @param \Mindee\Parsing\Common\Ocr\ OcrWord $word1 First word.
40- * @param \Mindee\Parsing\Common\Ocr\ OcrWord $word2 Second word.
39+ * @param OcrWord $word1 First word.
40+ * @param OcrWord $word2 Second word.
4141 * @return integer
4242 */
4343 public static function getMinMaxX (OcrWord $ word1 , OcrWord $ word2 ): int
@@ -53,8 +53,8 @@ public static function getMinMaxX(OcrWord $word1, OcrWord $word2): int
5353 /**
5454 * Compares word positions on the Y axis. Returns a sort-compliant result (0;-1;1).
5555 *
56- * @param \Mindee\Parsing\Common\Ocr\ OcrWord $word1 First word.
57- * @param \Mindee\Parsing\Common\Ocr\ OcrWord $word2 Second word.
56+ * @param OcrWord $word1 First word.
57+ * @param OcrWord $word2 Second word.
5858 * @return integer
5959 */
6060 public static function getMinMaxY (OcrWord $ word1 , OcrWord $ word2 ): int
0 commit comments