Image-to-Text
Transformers
Safetensors
Turkish
English
ocr
turkish
document-intelligence
vision-language-model
svtrv2
qwen2.5-vl
kvkk
pii-redaction
legal-nlp
ictihat
financial-verification
visual-redaction
Eval Results (legacy)
Instructions to use ersanbil/TurkceOCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ersanbil/TurkceOCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="ersanbil/TurkceOCR")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ersanbil/TurkceOCR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download turkceocr/postprocess/__init__.py from ersanbil/TurkceOCR: direct link, hf CLI and curl.
- Browser
- Download file 2.58 kB
-
https://huggingface.co/ersanbil/TurkceOCR/resolve/main/turkceocr/postprocess/__init__.py
- Command line
-
hf download hf://ersanbil/TurkceOCR/turkceocr/postprocess/__init__.py
-
curl -L -o __init__.py https://huggingface.co/ersanbil/TurkceOCR/resolve/main/turkceocr/postprocess/__init__.py
2.58 kB
| """ | |
| TürkçeOCR Post-Processing & TurkceVerify Modülü: | |
| - Türkçe İ/ı ve I/i büyük-küçük harf dönüşümü ve diakritik onarımı | |
| - TCKN, VKN, TR IBAN algoritmik sağlama destekli Constrained Decoding | |
| - Fatura / POS Fişi Matrah + KDV = Toplam denklem çözücüsü | |
| """ | |
| from turkceocr.postprocess.checksum_decoder import ( | |
| TurkceVerify, | |
| decode_iban_from_logits, | |
| decode_tckn_from_logits, | |
| decode_vkn_from_logits, | |
| repair_tckn_text, | |
| repair_tr_iban, | |
| repair_vkn_text, | |
| validate_tckn, | |
| validate_tr_iban, | |
| validate_vkn, | |
| ) | |
| from turkceocr.postprocess.financial_solver import ( | |
| FinancialConsistencyResult, | |
| TurkishFinancialSolver, | |
| parse_turkish_amount, | |
| format_turkish_amount, | |
| ) | |
| from turkceocr.postprocess.turkish_casing import ( | |
| TurkishDiacriticRestorer, | |
| turkish_lower, | |
| turkish_title, | |
| turkish_upper, | |
| ) | |
| from turkceocr.postprocess.legal_recognizers import ( | |
| DetectedEntitySpan, | |
| LegalAndCommercialRecognizerSuite, | |
| fold_tr_isomorphic, | |
| ) | |
| from turkceocr.postprocess.entity_engine import ( | |
| CONTAINER_ENTITY_TYPES, | |
| DEFAULT_REDACTABLE_ENTITY_TYPES, | |
| UnifiedAnalysisReport, | |
| UnifiedTurkishEntityEngine, | |
| ) | |
| from turkceocr.postprocess.repetition_guard import ( | |
| _tekrar_yeri, | |
| dongu_kirp, | |
| extract_docx_images, | |
| find_repetition_loop_index, | |
| ocr_page_with_split_retry, | |
| split_image_horizontally, | |
| truncate_repetition_loop, | |
| ) | |
| from turkceocr.postprocess.visual_redactor import ( | |
| OCRLineBox, | |
| OffsetMap, | |
| RedactionBox2D, | |
| VisualRedactionResult, | |
| VisualRedactor, | |
| ) | |
| __all__ = [ | |
| "TurkceVerify", | |
| "validate_tckn", | |
| "validate_vkn", | |
| "validate_tr_iban", | |
| "repair_tckn_text", | |
| "repair_vkn_text", | |
| "repair_tr_iban", | |
| "decode_tckn_from_logits", | |
| "decode_vkn_from_logits", | |
| "decode_iban_from_logits", | |
| "TurkishFinancialSolver", | |
| "FinancialConsistencyResult", | |
| "parse_turkish_amount", | |
| "format_turkish_amount", | |
| "TurkishDiacriticRestorer", | |
| "turkish_upper", | |
| "turkish_lower", | |
| "turkish_title", | |
| "DetectedEntitySpan", | |
| "LegalAndCommercialRecognizerSuite", | |
| "fold_tr_isomorphic", | |
| "CONTAINER_ENTITY_TYPES", | |
| "DEFAULT_REDACTABLE_ENTITY_TYPES", | |
| "UnifiedAnalysisReport", | |
| "UnifiedTurkishEntityEngine", | |
| "find_repetition_loop_index", | |
| "truncate_repetition_loop", | |
| "split_image_horizontally", | |
| "ocr_page_with_split_retry", | |
| "extract_docx_images", | |
| "_tekrar_yeri", | |
| "dongu_kirp", | |
| "OffsetMap", | |
| "OCRLineBox", | |
| "RedactionBox2D", | |
| "VisualRedactionResult", | |
| "VisualRedactor", | |
| ] | |