Parses ingredients from OCR text when no clear header structure is detected
Fallback parsing method that assumes ingredients are organized in two sections:
the first half contains ingredient names, the second half contains quantities with units.
This handles cases where ingredient tables don't have clear headers or person markers.
On iOS, ML Kit may return quantity blocks before name blocks (opposite of Android).
This is detected by checking if the first "name" line starts with a digit, in which
case the two halves are swapped before pairing.
Parses ingredients from OCR text when no clear header structure is detected
Fallback parsing method that assumes ingredients are organized in two sections: the first half contains ingredient names, the second half contains quantities with units. This handles cases where ingredient tables don't have clear headers or person markers.
On iOS, ML Kit may return quantity blocks before name blocks (opposite of Android). This is detected by checking if the first "name" line starts with a digit, in which case the two halves are swapped before pairing.