mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
feat(RapidOcr): Support generic extra arguments for RapidOcr (#2266)
* feat: add support for additional parameters in RapidOcrOptions and fix RapidOcr font_path * DCO Remediation Commit for David Morady <29502285+dmorady1@users.noreply.github.com> I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:133d989060Signed-off-by: David Morady <29502285+dmorady1@users.noreply.github.com> * fix: RapidOcr ensure backwards compatibility and add deprecation note * add warning log for rec_font_path * DCO Remediation Commit for David Morady <29502285+dmorady1@users.noreply.github.com> I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:133d989060I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:0a65eed28aI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:ac96f1483fSigned-off-by: David Morady <29502285+dmorady1@users.noreply.github.com> * add tests for code coverage for rapidocr * DCO Remediation Commit for David Morady <29502285+dmorady1@users.noreply.github.com> I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:133d989060I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:0a65eed28aI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:ac96f1483fI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:af5df4bb30Signed-off-by: David Morady <29502285+dmorady1@users.noreply.github.com> * add small comment for test * DCO Remediation Commit for David Morady <29502285+dmorady1@users.noreply.github.com> I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:133d989060I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:0a65eed28aI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:ac96f1483fI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:af5df4bb30I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:ab893b637fSigned-off-by: David Morady <29502285+dmorady1@users.noreply.github.com> * fix test comment * DCO Remediation Commit for David Morady <29502285+dmorady1@users.noreply.github.com> I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:133d989060I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:0a65eed28aI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:ac96f1483fI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:af5df4bb30I, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:ab893b637fI, David Morady <29502285+dmorady1@users.noreply.github.com>, hereby add my Signed-off-by to this commit:028e332aa9Signed-off-by: David Morady <29502285+dmorady1@users.noreply.github.com> --------- Signed-off-by: David Morady <29502285+dmorady1@users.noreply.github.com>
This commit is contained in:
@@ -74,6 +74,16 @@ def test_e2e_conversions():
|
||||
if sys.version_info < (3, 13):
|
||||
engines.append((RapidOcrOptions(), False))
|
||||
engines.append((RapidOcrOptions(force_full_page_ocr=True), False))
|
||||
engines.append(
|
||||
(
|
||||
RapidOcrOptions(
|
||||
force_full_page_ocr=True,
|
||||
rec_font_path="test",
|
||||
rapidocr_params={"Rec.font_path": None}, # overwrites rec_font_path
|
||||
),
|
||||
False,
|
||||
)
|
||||
)
|
||||
|
||||
# only works on mac
|
||||
if "darwin" == sys.platform:
|
||||
|
||||
Reference in New Issue
Block a user