Skip to content

Commit 87a5b7a

Browse files
add comment for categories names and enable grounding
1 parent 9ddb685 commit 87a5b7a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

notebooks/classifier.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@
151151
"# Define document categories and their descriptions\n",
152152
"classifier_schema = {\n",
153153
" \"categories\": {\n",
154-
" \"Loan application\": {\n",
154+
" \"Loan application\": { # Both space and underscore are allowed in category names\n",
155155
" \"description\": \"Documents submitted by individuals or businesses to request funding, typically including personal or business details, financial history, loan amount, purpose, and supporting documentation.\"\n",
156156
" },\n",
157157
" \"Invoice\": {\n",
158158
" \"description\": \"Billing documents issued by sellers or service providers to request payment for goods or services, detailing items, prices, taxes, totals, and payment terms.\"\n",
159159
" },\n",
160-
" \"Bank_Statement\": {\n",
160+
" \"Bank_Statement\": { # Both space and underscore are allowed in category names\n",
161161
" \"description\": \"Official statements issued by banks that summarize account activity over a period, including deposits, withdrawals, fees, and balances.\"\n",
162162
" },\n",
163163
" },\n",
@@ -347,7 +347,7 @@
347347
" \"enableLayout\": True, # Extract layout information\n",
348348
" \"enableBarcode\": False, # Skip barcode detection\n",
349349
" \"enableFormula\": False, # Skip formula detection\n",
350-
" \"estimateFieldSourceAndConfidence\": False, # Set to True if you want to estimate the field location (aka grounding) and confidence\n",
350+
" \"estimateFieldSourceAndConfidence\": True, # Set to True if you want to estimate the field location (aka grounding) and confidence\n",
351351
" \"disableContentFiltering\": False,\n",
352352
" },\n",
353353
" \"fieldSchema\": {\n",
@@ -429,15 +429,15 @@
429429
"# Create enhanced classifier schema\n",
430430
"enhanced_classifier_schema = {\n",
431431
" \"categories\": {\n",
432-
" \"Loan application\": {\n",
432+
" \"Loan application\": { # Both space and underscore are allowed in category names\n",
433433
" \"description\": \"Documents submitted by individuals or businesses to request funding, typically including personal or business details, financial history, loan amount, purpose, and supporting documentation.\",\n",
434434
" \"analyzerId\": analyzer_id # IMPORTANT: Use created custom analyzer in previous step for load applications\n",
435435
" },\n",
436436
" \"Invoice\": {\n",
437437
" \"description\": \"Billing documents issued by sellers or service providers to request payment for goods or services, detailing items, prices, taxes, totals, and payment terms.\",\n",
438438
" \"analyzerId\": \"prebuilt-invoice\" # IMPORTANT: Use created custom analyzer in previous step for annual reports\n",
439439
" },\n",
440-
" \"Bank_Statement\": {\n",
440+
" \"Bank_Statement\": { # Both space and underscore are allowed in category names\n",
441441
" \"description\": \"Official statements issued by banks that summarize account activity over a period, including deposits, withdrawals, fees, and balances.\"\n",
442442
" # No analyzer specified - uses default processing\n",
443443
" }\n",

0 commit comments

Comments
 (0)