Switch to fine-tuned model (Kalana001/xlm-roberta-sinhala-sincode)
Browse files- Model uploaded to HF Hub for clean deployment
- Expanded COMMON_WORDS overrides (+25 entries)
- Patched dictionary.pkl (correct forms, removed wrong candidates)
- Added tech English words to CORE_ENGLISH_WORDS
- Evaluation: 101/110 (91.8%) exact match, CER=0.007
- core/constants.py +2 -1
- core/english.py +1 -0
- core/mappings.py +36 -1
- dictionary.pkl +2 -2
core/constants.py
CHANGED
|
@@ -6,7 +6,8 @@ import re
|
|
| 6 |
|
| 7 |
# βββ Model & Data Paths βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 8 |
|
| 9 |
-
DEFAULT_MODEL_NAME = "FacebookAI/xlm-roberta-base"
|
|
|
|
| 10 |
DEFAULT_DICTIONARY_PATH = "dictionary.pkl"
|
| 11 |
|
| 12 |
ENGLISH_CORPUS_URL = (
|
|
|
|
| 6 |
|
| 7 |
# βββ Model & Data Paths βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 8 |
|
| 9 |
+
# DEFAULT_MODEL_NAME = "FacebookAI/xlm-roberta-base"
|
| 10 |
+
DEFAULT_MODEL_NAME = "Kalana001/xlm-roberta-sinhala-sincode"
|
| 11 |
DEFAULT_DICTIONARY_PATH = "dictionary.pkl"
|
| 12 |
|
| 13 |
ENGLISH_CORPUS_URL = (
|
core/english.py
CHANGED
|
@@ -24,6 +24,7 @@ CORE_ENGLISH_WORDS: Set[str] = {
|
|
| 24 |
"hall", "exam", "PR", "DM", "page", "app", "bug", "fix",
|
| 25 |
"log", "push", "pull", "branch", "build", "run", "save",
|
| 26 |
"link", "edit", "file", "open", "close", "live", "view",
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
|
|
|
|
| 24 |
"hall", "exam", "PR", "DM", "page", "app", "bug", "fix",
|
| 25 |
"log", "push", "pull", "branch", "build", "run", "save",
|
| 26 |
"link", "edit", "file", "open", "close", "live", "view",
|
| 27 |
+
"deployments", "leaderboard", "instagram", "github", "standup",
|
| 28 |
}
|
| 29 |
|
| 30 |
|
core/mappings.py
CHANGED
|
@@ -95,7 +95,7 @@ COMMON_WORDS: Dict[str, str] = {
|
|
| 95 |
"it": "IT",
|
| 96 |
"qa": "QA",
|
| 97 |
"ui": "UI",
|
| 98 |
-
"ok": "
|
| 99 |
# Common ad-hoc abbreviations (contd.)
|
| 100 |
"ek": "ΰΆΰΆ", # eka (short form)
|
| 101 |
"ekta": "ΰΆΰΆΰΆ§", # ekata = to that one
|
|
@@ -114,6 +114,41 @@ COMMON_WORDS: Dict[str, str] = {
|
|
| 114 |
"hadamu": "ΰ·ΰΆ―ΰΆΈΰ·", # let's make
|
| 115 |
"kiyawala": "ΰΆΰ·ΰΆΊΰ·ΰΆ½ΰ·", # having read
|
| 116 |
"baya": "ΰΆΆΰΆΊ", # fear/scared
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
| 118 |
|
| 119 |
# Context-dependent words: use this form ONLY when the previous word is
|
|
|
|
| 95 |
"it": "IT",
|
| 96 |
"qa": "QA",
|
| 97 |
"ui": "UI",
|
| 98 |
+
"ok": "ok",
|
| 99 |
# Common ad-hoc abbreviations (contd.)
|
| 100 |
"ek": "ΰΆΰΆ", # eka (short form)
|
| 101 |
"ekta": "ΰΆΰΆΰΆ§", # ekata = to that one
|
|
|
|
| 114 |
"hadamu": "ΰ·ΰΆ―ΰΆΈΰ·", # let's make
|
| 115 |
"kiyawala": "ΰΆΰ·ΰΆΊΰ·ΰΆ½ΰ·", # having read
|
| 116 |
"baya": "ΰΆΆΰΆΊ", # fear/scared
|
| 117 |
+
# Ad-hoc and alternative spellings (accuracy fixes)
|
| 118 |
+
"kema": "ΰΆΰ·ΰΆΈ", # food (colloquial spelling)
|
| 119 |
+
"kama": "ΰΆΰ·ΰΆΈ", # food (alt spelling)
|
| 120 |
+
"hodai": "ΰ·ΰ·ΰΆ³ΰΆΊΰ·", # good! (no-n spelling)
|
| 121 |
+
"oyge": "ΰΆΰΆΊΰ·ΰΆΰ·", # your (shortened form)
|
| 122 |
+
"iwra": "ΰΆΰ·ΰΆ»", # finished (vowel-stripped)
|
| 123 |
+
"krd": "ΰΆΰΆ»ΰ·ΰΆ―", # did? (extreme abbreviation)
|
| 124 |
+
"handawata": "ΰ·ΰ·ΰΆ±ΰ·ΰΆ―ΰ·ΰ·ΰΆ§", # in the evening
|
| 125 |
+
"wenwa": "ΰ·ΰ·ΰΆ±ΰ·ΰ·", # becomes/happens
|
| 126 |
+
"ep": "ΰΆΰΆ΄ΰ·", # epa (single-syllable abbrev)
|
| 127 |
+
"prashnya": "ΰΆ΄ΰ·\u200dΰΆ»ΰ·ΰ·\u200dΰΆ±ΰΆΊ", # question (without final vowel)
|
| 128 |
+
# ββ Verb forms / participles (no English conflict) ββββββββββββββββββββ
|
| 129 |
+
"penawa": "ΰΆ΄ΰ·ΰΆ±ΰ·ΰ·", # appears/visible (alt spelling of penenawa)
|
| 130 |
+
"thiyana": "ΰΆΰ·ΰΆΊΰ·ΰΆ±", # that which is/exists (relative participle)
|
| 131 |
+
"enakota": "ΰΆΰΆ±ΰΆΰ·ΰΆ§", # when (you/they) come
|
| 132 |
+
"hadanna": "ΰ·ΰΆ―ΰΆ±ΰ·ΰΆ±", # to make/build (imperative)
|
| 133 |
+
"yawwa": "ΰΆΊΰ·ΰ·ΰ·ΰ·ΰ·", # sent (alt spelling of yewwa)
|
| 134 |
+
"gihilla": "ΰΆΰ·ΰ·ΰ·ΰΆ½ΰ·ΰΆ½ΰ·", # having gone
|
| 135 |
+
"kewata": "ΰΆΰ·ΰ·ΰΆ§", # having eaten / for the eating
|
| 136 |
+
"kiyla": "ΰΆΰ·ΰΆΊΰΆ½ΰ·", # having said (ad-hoc spelling)
|
| 137 |
+
"krganna": "ΰΆΰΆ»ΰΆΰΆ±ΰ·ΰΆ±", # to do-and-get (ad-hoc abbreviation)
|
| 138 |
+
# ββ Adjectives (no English conflict) ββββββββββββββββββββββββββββββββββββ
|
| 139 |
+
"amarui": "ΰΆ
ΰΆΈΰ·ΰΆ»ΰ·ΰΆΊΰ·", # difficult / hard
|
| 140 |
+
"hodama": "ΰ·ΰ·ΰΆ³ΰΆΈ", # best (superlative of honda)
|
| 141 |
+
# ββ Particles / negation (no English conflict) βββββββββββββββββββββββββββ
|
| 142 |
+
"nathi": "ΰΆ±ΰ·ΰΆΰ·", # without / lacking (negation)
|
| 143 |
+
"nati": "ΰΆ±ΰ·ΰΆΰ·", # without (alt spelling)
|
| 144 |
+
"naththe": "ΰΆ±ΰ·ΰΆΰ·ΰΆΰ·", # negative participle (not ...ing)
|
| 145 |
+
"dan": "ΰΆ―ΰ·ΰΆ±ΰ·", # now
|
| 146 |
+
"oni": "ΰΆΰΆ±ΰ·", # need/want (alt spelling of one)
|
| 147 |
+
# ββ Time ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 148 |
+
"udee": "ΰΆΰΆ―ΰ·", # morning
|
| 149 |
+
# ββ Ad-hoc abbreviations (no English conflict) βββββββββββββββββββββββββββ
|
| 150 |
+
"hri": "ΰ·ΰΆ»ΰ·", # ok/right (shortened hari)
|
| 151 |
+
"mge": "ΰΆΈΰΆΰ·", # my (shortened mage)
|
| 152 |
}
|
| 153 |
|
| 154 |
# Context-dependent words: use this form ONLY when the previous word is
|
dictionary.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95bee1990d76dfe091be460c9ec06798fb4589a707c9823fb7324f3b47c00744
|
| 3 |
+
size 326599128
|