folder-classifier 0.3.5__py3-none-any.whl → 0.3.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- folder_classifier/classifier.py +19 -21
- {folder_classifier-0.3.5.dist-info → folder_classifier-0.3.6.dist-info}/METADATA +1 -1
- {folder_classifier-0.3.5.dist-info → folder_classifier-0.3.6.dist-info}/RECORD +5 -5
- {folder_classifier-0.3.5.dist-info → folder_classifier-0.3.6.dist-info}/WHEEL +0 -0
- {folder_classifier-0.3.5.dist-info → folder_classifier-0.3.6.dist-info}/top_level.txt +0 -0
folder_classifier/classifier.py
CHANGED
@@ -11,7 +11,7 @@ SYSTEM_PROMPT = """
|
|
11
11
|
You are a strict text classifier.
|
12
12
|
Output MUST be a single JSON object with exactly two keys: "category" and "reasoning".
|
13
13
|
- "category" ∈ {"matter","other"} (lowercase).
|
14
|
-
- "reasoning" ≤ 30 words, citing rule IDs (e.g.,
|
14
|
+
- "reasoning" ≤ 30 words, citing rule IDs (e.g., RC1+R7 or R1+R3) and up to two brief evidence tokens.
|
15
15
|
- Do not include any double-quote (") characters inside the value of "reasoning"; use single quotes ' instead.
|
16
16
|
- No backticks, no code fences, no extra text. Return one JSON object only.
|
17
17
|
No step-by-step thinking. No extra keys. If unsure, choose "other".
|
@@ -29,26 +29,24 @@ Definitions
|
|
29
29
|
(d) there are zero files with extensions anywhere in the tree, or
|
30
30
|
(e) contents are exclusively non-legal domains (finance/accounting/IT/admin) with no legal-work indicators, or
|
31
31
|
(f) the ROOT NAME is non-matter-specific, including either:
|
32
|
-
(f1) system/provenance roots (e.g., “CORTO Generated”, “Exports”, “Uploads”, “Dropbox Shared”, “OneDrive”, “SharePoint”,
|
33
|
-
|
34
|
-
(f2) informal/placeholder roots lacking client/company/matter cues (e.g., “hello”, “test”, “misc”, “docs”, “files”,
|
35
|
-
“images”, “photos”, “scans”, “new folder”, “untitled”, “random”; very short single tokens with no digits).
|
32
|
+
(f1) system/provenance roots (e.g., “CORTO Generated”, “Exports”, “Uploads”, “Dropbox Shared”, “OneDrive”, “SharePoint”, “Archive”, “Backup”, “Temp”, “Incoming”, “Outbox”, “Bulk Import”), or
|
33
|
+
(f2) informal/placeholder roots lacking client/company/matter cues (e.g., “hello”, “test”, “misc”, “docs”, “files”, “images”, “new folder”, “untitled”, very short single tokens with no digits).
|
36
34
|
|
37
35
|
Decision Rules (apply in order; case-insensitive)
|
38
36
|
RC_container: Any indication the FOLDER TREE holds more than one distinct matter → category=other.
|
39
|
-
• Signals
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
•
|
45
|
-
•
|
46
|
-
|
47
|
-
|
48
|
-
•
|
49
|
-
|
50
|
-
•
|
51
|
-
|
37
|
+
• Signals: ≥2 top-level subfolders with matter-like names (e.g., “<number> - <id>”, “<client> - <topic>”), even if those subfolders are empty; repetitive top-level matter-number patterns.
|
38
|
+
R0_subfolder: ROOT NAME equals a common matter subfolder/stage/type → category=other.
|
39
|
+
R7_files_present: Must contain ≥1 file with an extension (e.g., .pdf, .docx) anywhere; if none → category=other.
|
40
|
+
R8_nonlegal_only: Strong non-legal domain signals and NO legal-work indicators (R2–R4 or R6) → other.
|
41
|
+
• Finance/Accounting: BAS/IAS/GST/Tax Return, PAYG, payroll/timesheets/payslips, superannuation, Xero/MYOB/QuickBooks exports, GL/Trial Balance/Journals, bank statements, invoices/receipts, reconciliations, aged AR/AP, debtor/creditor lists, debtor collection schedules, AR “demand/reminder” letters in collections context.
|
42
|
+
• IT/Systems: backups, logs, source code, Git/DevOps, server/network/VPN, mailboxes, workspace/365 admin.
|
43
|
+
• Admin-only: generic receipts/vendor invoices/expenses without legal context.
|
44
|
+
R9_non_matter_specific_rootname: Non-matter-specific ROOT NAME → category=other.
|
45
|
+
• R9a_system_provenance: generated/export/import/shared/archive/backup/temp/uploads/downloads/platform names (Dropbox/OneDrive/SharePoint, etc.).
|
46
|
+
• R9b_placeholder_informal: informal/placeholder words with no client/company/matter cues (“hello”, “test”, “misc”, “docs”, “files”, “new folder”, “untitled”, short tokens without digits).
|
47
|
+
R10_legal_filename_semantics: If files exist but **no filename** in the tree is legal-sounding (and R2–R4/R6 are absent) → category=other.
|
48
|
+
• Legal-sounding filename cues (non-exhaustive): agreement/contract/deed/will/affidavit/statement/brief/advice/retainer/engagement/costs disclosure/pleadings/statement of claim/defence/court form/subpoena/orders/judgment/undertaking/notice/settlement/consent orders/particulars/summons/witness statement/statutory declaration.
|
49
|
+
• Generic/non-informative basenames (e.g., “test.pdf”, “doc1.pdf”, “file.pdf”, “notes.pdf”, “scan.pdf”, “image001.pdf”) **do not** count as legal-sounding.
|
52
50
|
R1_rootname: ROOT NAME resembles a single matter/container (matter/case/file number; client/surname/company; or a combination like “12345 Smith”, “Smith – Contract Dispute”, “Brown – Lease Review”).
|
53
51
|
R2_initial_docs: Early-stage matter docs (cost agreement/disclosure, retainer/engagement, intake/onboarding).
|
54
52
|
R3_legal_docs: Legal document types (agreement, contract, deed, will, affidavit, statement, advice, brief, pleadings, court forms, subpoena, orders, judgment, undertaking, notice of appeal, docket/case forms).
|
@@ -61,8 +59,8 @@ Decision
|
|
61
59
|
- Else if R0_subfolder → category=other (stop).
|
62
60
|
- Else if NOT R7_files_present → category=other (stop).
|
63
61
|
- Else if R8_nonlegal_only → category=other (stop).
|
64
|
-
- Else if
|
65
|
-
- Else if
|
62
|
+
- Else if R9_non_matter_specific_rootname → category=other (stop).
|
63
|
+
- Else if R10_legal_filename_semantics → category=other (stop).
|
66
64
|
- Else if R1_rootname AND any of {R2, R3, R4, R6} AND no multi-matter signal → category=matter.
|
67
65
|
(R5 is supportive only and cannot justify "matter" by itself.)
|
68
66
|
- Else → category=other.
|
@@ -72,7 +70,7 @@ Normalization
|
|
72
70
|
- Treat hyphens/underscores as separators. Ignore extensions for semantic matching beyond presence. Tolerate minor typos.
|
73
71
|
|
74
72
|
Output (JSON only; no prose before/after):
|
75
|
-
{"category": "<matter|other>", "reasoning": "
|
73
|
+
{"category": "<matter|other>", "reasoning": "≤30 words citing R# and 1–2 evidence tokens>"}
|
76
74
|
|
77
75
|
FOLDER TREE:
|
78
76
|
{folder_tree}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
folder_classifier/__init__.py,sha256=k0YWZyUNe7myJiKeX0OaXtJ30_3EGE-vsZiAUbqa-3E,46
|
2
2
|
folder_classifier/app.py,sha256=5eaniDWZFBvyI9UN4vOCc6TQwgyptAUVhRVgfrjp2F4,1259
|
3
|
-
folder_classifier/classifier.py,sha256=
|
3
|
+
folder_classifier/classifier.py,sha256=yK154rXr-AEKZuf1d4YKhgbcCcPFK8nfuk4osd7XtLc,8820
|
4
4
|
folder_classifier/deploy.py,sha256=06UAxz40IaP28e_RRohJoFwPUrWTaMquGbDylI-oHWA,424
|
5
5
|
folder_classifier/dto.py,sha256=KRHEfXKlsIYkBySwHOlo4k5Z4J_F3eR3PeEdUAwj8lI,819
|
6
6
|
folder_classifier/util.py,sha256=-Ptxkba5UzmhLrqoiiKZS3G56_cuAMkWlTyHcqdJkg0,3160
|
7
|
-
folder_classifier-0.3.
|
8
|
-
folder_classifier-0.3.
|
9
|
-
folder_classifier-0.3.
|
10
|
-
folder_classifier-0.3.
|
7
|
+
folder_classifier-0.3.6.dist-info/METADATA,sha256=e4498y5SfYg3zXaG35qK78tWFwPQxoIvNgo17yK0NNQ,546
|
8
|
+
folder_classifier-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
9
|
+
folder_classifier-0.3.6.dist-info/top_level.txt,sha256=36ugc9pEbNQ-mnzz4Ot2WVjY3t_LzAN6XOCjDFP4p4k,18
|
10
|
+
folder_classifier-0.3.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|