VJnCode commited on
Commit
450d1d2
·
1 Parent(s): 9e8976f

feat : added kannada lang

Browse files
.gitignore CHANGED
@@ -1,3 +1,4 @@
1
  chathur/
2
  **/__pycache__/
3
- .env
 
 
1
  chathur/
2
  **/__pycache__/
3
+ .env
4
+ api/rag/translator-en-kn-merged/
api/data/myscheme_karnataka_schemes.json ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "Title": "Airavata Scheme",
4
+ "Description": "This scheme envisages partnership with corporate aggregators like OLA and UBER to facilitate self-employment of rural youth through Radio Taxi and other successful cab transport ventures. Rural youth from SC/ST communities will be provided training, mentoring and other enhanced financial assistance.",
5
+ "Tags": "None",
6
+ "Link": "https://www.myscheme.gov.in/schemes/airavata"
7
+ },
8
+ {
9
+ "Title": "Krushy Aranya Protsaha Yojane (kapy)",
10
+ "Description": "The Karnataka Forest Department launched 'Krushi Aranya Protsaha Yojane (KAPY)' in 2011-12 to encourage farmers and the public to increase forest and tree cover by providing subsidized seedlings and monetary incentives for planting",
11
+ "Tags": "Farmers, Pahani, Subsidy, Three-year Nurturing, Tree Plantation",
12
+ "Link": "https://www.myscheme.gov.in/schemes/kapy"
13
+ },
14
+ {
15
+ "Title": "Thayi Bhagya Scheme(comprehensive Maternal Healthcare)",
16
+ "Description": "The Thayi Bhagya Scheme, started by Karnataka Government(Health and Family Welfare) for pregnant women, provides free delivery services, medicines, and all other facilities from the point of admission to discharge for pregnant women belonging to BPL families, in registered private hospitals.",
17
+ "Tags": "None",
18
+ "Link": "https://www.myscheme.gov.in/schemes/thayi-bhagya"
19
+ },
20
+ {
21
+ "Title": "Continuation of Pension (K.B.O.C.W.W.B)",
22
+ "Description": "The \"Continuation of Pension'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides a monthly pension to registered construction workers who have paid subscriptions for at least three (3) years.",
23
+ "Tags": "Building Worker, Construction Workers, Labour, Pension",
24
+ "Link": "https://www.myscheme.gov.in/schemes/copkbocwwb"
25
+ },
26
+ {
27
+ "Title": "Skill Development Training Karnataka",
28
+ "Description": "The Skill Development Training program aims to equip artisans with the skills necessary for the manufacture of footwear and leather goods. The project promotes the leather industry while enhancing the livelihoods of artisans.",
29
+ "Tags": "Schedule Caste, Skill Development, Stipend, Training",
30
+ "Link": "https://www.myscheme.gov.in/schemes/sdtk"
31
+ },
32
+ {
33
+ "Title": "Supply of Tool Kits to their Trained Workers",
34
+ "Description": "The A.P. Building & Other Construction Workers Welfare Board launched a welfare scheme \"Supply of Tool Kits Karnataka\" provides toolkits to construction workers who have undergone skill upgradation training in trades such as masonry, electrical, and plumbing.",
35
+ "Tags": "Construction Worker, Skill Upgradation, Tool Kit, Training",
36
+ "Link": "https://www.myscheme.gov.in/schemes/stkk"
37
+ },
38
+ {
39
+ "Title": "Incentive For The Devadasi Children’s Marriage to Schedule Tribe",
40
+ "Description": "The scheme \"Incentive for the Devadasi Children’s Marriage to Schedule Tribe\" by the Govt of Karnataka provides incentives for the marriage of Devadasi's ST children. Couples married on or after 01-04-2019 are given an incentive of ₹8 Lakh, i.e. ₹3 Lakh for groom and ₹5 Lakh for bride.",
41
+ "Tags": "Financial Assistance, Incentive, Marriage, Schedule Tribe, ST",
42
+ "Link": "https://www.myscheme.gov.in/schemes/iftdcmtst"
43
+ },
44
+ {
45
+ "Title": "Madilu Kit",
46
+ "Description": "The Madilu Programme is a government initiative focused on empowering rural communities through skill development and entrepreneurship opportunities.\nIt aims to create sustainable livelihoods, reduce poverty, and enhance social and economic well-being in rural areas.",
47
+ "Tags": "Entrepreneurship, Livelihoods, Poverty Reduction, Skill Development",
48
+ "Link": "https://www.myscheme.gov.in/schemes/madilu"
49
+ },
50
+ {
51
+ "Title": "Shrama Shakthi Scheme",
52
+ "Description": "Under the Shrama Shakthi Loan scheme, religious minority community entrepreneurs will be trained in artistic and technical skills and will be provided a loan of ₹50,000/- with a 4% rate of interest, to be paid in 36 installments.",
53
+ "Tags": "Artisans, Government Scheme For Minorities, Karnataka, Loan, Minority",
54
+ "Link": "https://www.myscheme.gov.in/schemes/sss"
55
+ },
56
+ {
57
+ "Title": "Unnati Scheme",
58
+ "Description": "Unnati, a first of its kind initiative of the Department of Social Welfare, Government of Karnataka intends to provide a comprehensive entrepreneurship platform for startups. The aim of this program is to cater to the end to end requirements of a startup i.e. from identifying the innovations",
59
+ "Tags": "None",
60
+ "Link": "https://www.myscheme.gov.in/schemes/unnati"
61
+ },
62
+ {
63
+ "Title": "Stipend To Law Graduates",
64
+ "Description": "Under this scheme, the Social Welfare Department, Govt of Karnataka will give a stipend to the Law Graduates belonging to SC/ST Community residing in Karnataka. This will help them to practice law in various courts and training courses will also be organized under the guidance of senior advocates.",
65
+ "Tags": "Karnataka, Law Graduates, SC, ST, Stipend",
66
+ "Link": "https://www.myscheme.gov.in/schemes/slg"
67
+ },
68
+ {
69
+ "Title": "Bhagyalaxmi Scheme",
70
+ "Description": "The prime goal of this scheme aims to promote the birth of girl children in below poverty line(BPL) families and to raise the status of the girl child in the family in particular and society in general. Financial assistance is provided to the girl child through her mother/father or natural guardian.",
71
+ "Tags": "Below Poverty Line, Bhagyalaxmi Yojana, Female Children, Financial Aid",
72
+ "Link": "https://www.myscheme.gov.in/schemes/bys"
73
+ },
74
+ {
75
+ "Title": "Vidyasiri food And Accommodation Scholarship Scheme",
76
+ "Description": "Vidyasiri-Food and Accommodation Scholarship Scheme (VFAS) is a government initiative in Karnataka that provides financial assistance to students belonging to backward classes pursuing post-matric courses in recognized institutions. Scheme offers a monthly stipend of Rs. 1,500 for10 months",
77
+ "Tags": "Education, Stipend, Students",
78
+ "Link": "https://www.myscheme.gov.in/schemes/vfas"
79
+ },
80
+ {
81
+ "Title": "Incentive Scheme for Sericulture Reelers",
82
+ "Description": "The \"Incentive Scheme for Sericulture Reelers\" is aimed at improving the financial condition of minority communities involved in silk reeling and spinning. The corporation will provide loans to support working capital and basic infrastructure for silk spinners.",
83
+ "Tags": "Financial Assitance, Laon, Minority Community, Subsidy",
84
+ "Link": "https://www.myscheme.gov.in/schemes/isfsr"
85
+ },
86
+ {
87
+ "Title": "Sikhligar’s Community Development Scheme",
88
+ "Description": "The \"Sikhligar’s Community Development Scheme\" aims to promote economic self-reliance among the Sikhligara community, the Corporation will provide a subsidy and a subsidy of 33% of the vehicle cost for purchasing goods tempos, or vehicles to economically backward of Karnataka state.",
89
+ "Tags": "Economically Backward, Self-employment, Sikh Community, Subsidy",
90
+ "Link": "https://www.myscheme.gov.in/schemes/scds"
91
+ },
92
+ {
93
+ "Title": "Shramashakthi Special Women's Scheme",
94
+ "Description": "The \"Shramashakthi Special Women's Scheme\" is a special scheme for the economic empowerment of widowed, divorced, unmarried women of the minority community.",
95
+ "Tags": "Economic Empowerment, Loan, Minority Community, Women",
96
+ "Link": "https://www.myscheme.gov.in/schemes/ssws"
97
+ },
98
+ {
99
+ "Title": "Marriage Assistance (K.B.O.C.W.W.B)",
100
+ "Description": "The \"Marriage Assistance'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides financial support to registered construction workers for the marriage expenses of their own or their two (2) dependent children's marriages.",
101
+ "Tags": "Building Worker, Construction Worker, Labour, Marriage, Weeding",
102
+ "Link": "https://www.myscheme.gov.in/schemes/makbocwwb"
103
+ },
104
+ {
105
+ "Title": "Pension Scheme (K.B.O.C.W.W.B)",
106
+ "Description": "The \"Pension Scheme'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that aims to provide a monthly pension to registered construction workers who have reached 60 years of age and is a beneficiary of the Board for at least 3 years.",
107
+ "Tags": "Building Worker, Construction Worker, Labour, Pension, Senior Citizen",
108
+ "Link": "https://www.myscheme.gov.in/schemes/kbocwwb"
109
+ },
110
+ {
111
+ "Title": "Kayaka Spoorthi Scheme Karnataka",
112
+ "Description": "The \"Kayaka Spoorthi Scheme\" aims to provide financial assistance to women Self-Help Groups (SHGs) engaged in the leather industry. The goal is to promote self-sufficiency and economic independence by enabling these women to start or expand business activities related to leatherwork.",
113
+ "Tags": "Business Activities, Financial Assistance, Leather Industry, SHG",
114
+ "Link": "https://www.myscheme.gov.in/schemes/kssk"
115
+ },
116
+ {
117
+ "Title": "Padhuke Kuteera Scheme Karnataka",
118
+ "Description": "The \"Paduke Kuteera Scheme\" provides roadside cobblers engaged in repair work or footwear production with a steel-made kiosk (Paduke Kuteera) and a tool kit free of cost. The unit cost of each Kuteera is ₹1,25,000, and the scheme includes a signage board display arrangement.",
119
+ "Tags": "Artisans, Financial Assistance, Scheduled Caste, Self-employment",
120
+ "Link": "https://www.myscheme.gov.in/schemes/pksk"
121
+ },
122
+ {
123
+ "Title": "Direct Loan Scheme Karnataka",
124
+ "Description": "The \"Direct Loan Scheme\" offers financial assistance to unemployed scheduled caste individuals from the leather artisan community to start small businesses.",
125
+ "Tags": "Financial Assistance, Scheduled Caste, Subsidy, Unemployed",
126
+ "Link": "https://www.myscheme.gov.in/schemes/dlsk"
127
+ },
128
+ {
129
+ "Title": "Incentive for the Inter Caste Marriage Couple",
130
+ "Description": "The Social Welfare Department of the Government of Karnataka has launched the \"Incentive for the Inter Caste Marriage Couple\", which offers incentives to couples belonging to the SC community and Non-SC. The scheme aims to promote inter-caste marriages and provide financial assistance to the couples",
131
+ "Tags": "Financial Assistance, Inter-caste, Marriage",
132
+ "Link": "https://www.myscheme.gov.in/schemes/ifticmc"
133
+ },
134
+ {
135
+ "Title": "Incentive For The Inter Caste Marriage Couple (Scheduled Tribe)",
136
+ "Description": "The \"Incentive for Inter Caste Marriage Couple\" scheme was launched by the Tribal Welfare Department, Karnataka. The scheme provides incentives to the couple in which one spouse is from a Scheduled Tribe (ST) and the other spouse is non-ST. An incentive of ₹5,50,000/- is provided to the couple.",
137
+ "Tags": "Couple, Incentive, Inter Caste, Marriage, Schedule Tribe",
138
+ "Link": "https://www.myscheme.gov.in/schemes/ifticmcst"
139
+ },
140
+ {
141
+ "Title": "Interest Subvention Scheme",
142
+ "Description": "The scheme aims to provide institutional credit for capital investments at reasonable interest rates and is implemented through the Karnataka State Financial Corporation (KSFC) in the state.",
143
+ "Tags": "Interest Subsidy, Loan, Micro Enterprises, Small Enterprises, Subvention",
144
+ "Link": "https://www.myscheme.gov.in/schemes/iss"
145
+ },
146
+ {
147
+ "Title": "Ganga Kalyana Scheme",
148
+ "Description": "Ganga Kalyana Scheme is implemented by Karnataka Minorities Development Corporation Limited.\nThis scheme is a fully subsidized scheme, bore wells, pumps and electrification are provided to minorities, and small and marginal farmers living in rural areas.",
149
+ "Tags": "None",
150
+ "Link": "https://www.myscheme.gov.in/schemes/gks"
151
+ },
152
+ {
153
+ "Title": "Prabhuddha Overseas Scholarship",
154
+ "Description": "The PRABHUDDHA OVERSEAS SCHOLARSHIP scheme selects around 250 undergraduate and 150 postgraduate and PhD students from the SC/ST communities, providing them with financial assistance. The initiative aims to support deserving students in pursuing their academic aspirations.",
155
+ "Tags": "Overseas, Scheduled Castes, Scheduled Tribes, Scholarship",
156
+ "Link": "https://www.myscheme.gov.in/schemes/pdos"
157
+ },
158
+ {
159
+ "Title": "Nekar Samman Yojana",
160
+ "Description": "In 2020 amidst the Covid pandemic, Chief Minister of Karnataka launched a mega scheme Karnataka Nekar Samman Yojana. It was a relief scheme to provide financial support to destitute weaver of state engaged in the handloom and textile industry whose livelihood was adversely affected by the pandemic.",
161
+ "Tags": "Financial Assistance, Handloom, Nekar Samman",
162
+ "Link": "https://www.myscheme.gov.in/schemes/nsy"
163
+ },
164
+ {
165
+ "Title": "Direct Loans For Business Enterprise",
166
+ "Description": "Direct Loans For Business Enterprise Scheme is implemented by Karnataka Minorities Development Corporation Limited. Under this scheme, loans will be provided to eligible entrepreneurs to start or expand their businesses by mortgaging property (building or land).",
167
+ "Tags": "Buisness Loan, Entrepreneurs, Minority, MSME",
168
+ "Link": "https://www.myscheme.gov.in/schemes/dlbe"
169
+ },
170
+ {
171
+ "Title": "Subsidy Scheme For Purchase Of Taxi / Goods Vehicle / Passenger Autorickshaw",
172
+ "Description": "Those beneficiaries who are sanctioned / approved for loan from the Banks for the purchase of Passenger Autorickshaw / Goods Vehicle / Taxi will be provided a subsidy of 33% of the value of the vehicle or a maximum subsidy of Rs. 2.5 Lakhs. Women will be given priority. Women will be given priority.",
173
+ "Tags": "None",
174
+ "Link": "https://www.myscheme.gov.in/schemes/subsidy-scheme-for-taxi"
175
+ },
176
+ {
177
+ "Title": "Udyogini Scheme",
178
+ "Description": "Udyogini is an innovative scheme to assist women in gaining self-reliance and economic independence through self-employment, mainly through trade and the service sector. It also provides for a subsidy on loans for undertaking business activities/ micro enterprises through banks, etc.",
179
+ "Tags": "Citizen Empowerment, Entrepreneurship, Loan, Social Welfare, Subsidy, Women",
180
+ "Link": "https://www.myscheme.gov.in/schemes/us"
181
+ },
182
+ {
183
+ "Title": "Samruddhi Scheme",
184
+ "Description": "Samruddhi scheme is an initiative from the Social Welfare Department of Government of Karnataka. It serves as an enabler to the socially disadvantaged youth and women to take up entrepreneurial activities and promote self-employment.",
185
+ "Tags": "None",
186
+ "Link": "https://www.myscheme.gov.in/schemes/samruddhischeme"
187
+ },
188
+ {
189
+ "Title": "Medical Assistance (Karmika Arogya Bhagya) (K.B.O.C.W.W.B)",
190
+ "Description": "The \"Medical Assistance (Karmika Arogya Bhagya)'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides financial assistance to registered construction workers and their dependents for hospitalisation expenses in recognised hospitals.",
191
+ "Tags": "Building Worker, Construction Worker, Hospitalisation, Labour, Medical Assistance",
192
+ "Link": "https://www.myscheme.gov.in/schemes/makabbocwwb"
193
+ },
194
+ {
195
+ "Title": "Thayi Magu Sahaya Hastha (K.B.O.C.W.W.B)",
196
+ "Description": "The \"Thayi Magu Sahaya Hastha'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides financial assistance to registered women construction workers for pre-school education and nutritional support of their child for up to 3 years after delivery.",
197
+ "Tags": "Building Worker, Child, Construction Worker, Education, Labour, Pre-school, Women",
198
+ "Link": "https://www.myscheme.gov.in/schemes/tmshkbocwwb"
199
+ },
200
+ {
201
+ "Title": "Financial Assistance to Traditional Artisans (Panchavrutthi Scheme)",
202
+ "Description": "The \"Financial Assistance to Traditional Artisans (Panchavrutthi Scheme)\" provides financial assistance to traditional artisans of the Vishwakarma community in Karnataka. The scheme aims to help these artisans purchase modern tools & upgrade their technological skills to enhance their trade.",
203
+ "Tags": "Artisans, Financial Assistance, Loan, Subsidy, Vishwakarma Communities",
204
+ "Link": "https://www.myscheme.gov.in/schemes/fataps"
205
+ },
206
+ {
207
+ "Title": "Subsidy Scheme for Self-help Groups of Minorities",
208
+ "Description": "The \"Subsidy Scheme for Self-help Groups of Minorities\" aimed at empowering minority women by providing financial support to Self-Help Groups (SHGs). The scheme offers a subsidy to SHGs engaged in various self-employment activities, promoting economic self-reliance among minority women.",
209
+ "Tags": "Self-employment, SHGs, Subsidy",
210
+ "Link": "https://www.myscheme.gov.in/schemes/ssshgm"
211
+ },
212
+ {
213
+ "Title": "Kaimagga Vikasa Yojana - Karnataka",
214
+ "Description": "The “Kaimagga Vikasa Yojana” aims to sustain and develop the handloom weaving skills of existing weavers and to attract young talent to the industry, thus preserving the rich cultural heritage of handloom weaving in Karnataka.",
215
+ "Tags": "Handloom, Skill Development, Subsidy, Weaver",
216
+ "Link": "https://www.myscheme.gov.in/schemes/kvy-k"
217
+ },
218
+ {
219
+ "Title": "Arivu Education Loan Scheme",
220
+ "Description": "The \"Arivu Education Loan Scheme,\" launched by the Minorities Welfare Department, Government of Karnataka, and implemented by the Karnataka Minorities Development Corporation, offers loans to students pursuing professional courses like MBBS, B.E., B.Tech., MBA, MCA, LLB, and others in various fields",
221
+ "Tags": "Loan, Minority Community, Student",
222
+ "Link": "https://www.myscheme.gov.in/schemes/aels"
223
+ },
224
+ {
225
+ "Title": "Accident Assistance (K.B.O.C.W.W.B)",
226
+ "Description": "The \"Accident Assistance'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that aims to provide compensation of a certain amount both from the employer and the Board.",
227
+ "Tags": "Accident, Building Worker, Construction Worker, Death Benefit, Disability, Labour",
228
+ "Link": "https://www.myscheme.gov.in/schemes/kaabocwwb"
229
+ },
230
+ {
231
+ "Title": "Incentive for the SC Widow Re-Marriage",
232
+ "Description": "Under this scheme, the Social Welfare Department, Government of Karnataka gives incentives to the remarried widows belonging to SC Community. The incentive amount is ₹ 3 Lakh.",
233
+ "Tags": "Incentive, Marriage, Re-marriage, SC, Widow, Widow",
234
+ "Link": "https://www.myscheme.gov.in/schemes/iscwr"
235
+ },
236
+ {
237
+ "Title": "Marketing Assistance Scheme",
238
+ "Description": "The \"Marketing Assistance Scheme\" aims to empower SC leather artisans by enabling them to market their products through Lidkar Leather Emporia under the Lidkar brand. It helps artisans avoid exploitation by private dealers and provides regular procurement of their products based on demand.",
239
+ "Tags": "Artisans, Financial Assistance, Leather, Marketing",
240
+ "Link": "https://www.myscheme.gov.in/schemes/mas"
241
+ },
242
+ {
243
+ "Title": "Dr. Babu Jagjivan Ram Living cum work shed Construction Scheme",
244
+ "Description": "The \"Dr. Babu Jagjivan Ram Living cum work shed Construction Scheme\" provides financial assistance to houseless leather artisans for constructing Living cum Work Sheds through the Rajiv Gandhi Rural Housing Corporation.",
245
+ "Tags": "Artisans, Financial Assistance, Housing, Subsidy",
246
+ "Link": "https://www.myscheme.gov.in/schemes/dbjrlcwscs"
247
+ },
248
+ {
249
+ "Title": "Skill Upgradation Program Karnataka",
250
+ "Description": "The \"Skill Upgradation Program Karnataka\" scheme aims to upgrade the skills of artisans in leather technology, footwear/leather goods making, and designing by sending them for advanced training at renowned institutions like CFTI Chennai, CLRI, and Karnataka Institute of Leather Technology.",
251
+ "Tags": "Skill Development, Stipend, Training",
252
+ "Link": "https://www.myscheme.gov.in/schemes/supk"
253
+ },
254
+ {
255
+ "Title": "Incentive for the Intra Caste Marriage within Scheduled Caste Community",
256
+ "Description": "The Karnataka Social Welfare Department provides an incentive to promote intra-caste marriages within different sub-castes of Scheduled Castes (SC) and Scheduled Tribes (ST).",
257
+ "Tags": "Financial Assistance, Inter-Caste, Marriage, Scheduled Castes",
258
+ "Link": "https://www.myscheme.gov.in/schemes/iicmscc"
259
+ },
260
+ {
261
+ "Title": "Interest Subsidy Scheme for Scheduled Caste/Scheduled Tribe Entrepreneurs",
262
+ "Description": "The scheme aims to encourage SC/ST entrepreneurs to establish micro or small-scale service enterprises & to expand, diversify, or modernize their existing units. Under this scheme, a loan amount ranging from a min. of ₹20.00 lakhs to a max. of ₹1,000.00 lakhs is provided at an interest rate of 4%.",
263
+ "Tags": "Entrepreneurs, Interest Subsidy, Loan, Scheduled Caste, Scheduled Tribe",
264
+ "Link": "https://www.myscheme.gov.in/schemes/issscste"
265
+ },
266
+ {
267
+ "Title": "Maternity Benefit/Delivery Assistance (K.B.O.C.W.W.B)",
268
+ "Description": "The \"Maternity Benefit/Delivery Assistance'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides financial assistance to registered women construction workers for the birth of upto two (2) children.",
269
+ "Tags": "Building Worker, Construction Worker, Delivery, Labour, Maternity, Medical Assistance, Women",
270
+ "Link": "https://www.myscheme.gov.in/schemes/mbdakbocwwb"
271
+ },
272
+ {
273
+ "Title": "Incentive For The Devadasi Children’s Marriage",
274
+ "Description": "Under this scheme, the Social Welfare Department, Government of Karnataka will give incentives of ₹3.00 lakh for men,₹5.00 lakh for women to the Devadasi's Children who are Married Couples.",
275
+ "Tags": "Devadasi, Incentive, Marriage, SC",
276
+ "Link": "https://www.myscheme.gov.in/schemes/idcm"
277
+ },
278
+ {
279
+ "Title": "Funeral and Ex-Gratia (K.B.O.C.W.W.B)",
280
+ "Description": "The \"Funeral and Ex-Gratia'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides financial assistance to the nominee of a deceased registered construction worker to cover funeral expenses and an ex-gratia payment to alleviate financial hardship.",
281
+ "Tags": "Building Worker, Construction Worker, Death, Ex-Gratia, Funeral Assistance, Labour",
282
+ "Link": "https://www.myscheme.gov.in/schemes/faexgkbocwwb"
283
+ },
284
+ {
285
+ "Title": "Community Based Training Scheme",
286
+ "Description": "The \"Community Based Training Scheme\" aims to provide training in heavy vehicle driving, shorthand, security services, office soft skills, retail sales, and beauty parlor courses (male & female) to unemployed young men and women belonging to minority communities for self-employment or employment.",
287
+ "Tags": "Employment, Minority Community, Skill Development, Unemployed",
288
+ "Link": "https://www.myscheme.gov.in/schemes/cbts"
289
+ },
290
+ {
291
+ "Title": "Santwana Scheme - Karnataka",
292
+ "Description": "The \"Santwana Scheme\" offers loans to religious minority individuals whose houses or shops have been destroyed by natural calamities or communal violence. The scheme provides up to ₹5,00,000/- per unit, with 50% as a loan and 50% as a subsidy",
293
+ "Tags": "Loan, Minority Community, Natural Calamity, Subsidy",
294
+ "Link": "https://www.myscheme.gov.in/schemes/ss-k"
295
+ },
296
+ {
297
+ "Title": "Overseas Educational Loan Scheme",
298
+ "Description": "The \"Overseas Educational Loan Scheme\" objective is to provide financial/loan assistance to students belonging to minority communities who are pursuing graduate or postgraduate degree courses in recognized universities abroad.",
299
+ "Tags": "Education, Financial Assistance, Laon, Student",
300
+ "Link": "https://www.myscheme.gov.in/schemes/oels"
301
+ },
302
+ {
303
+ "Title": "Vrutti Protsaha Loan Scheme",
304
+ "Description": "The \"Vrutti Protsaha Loan Scheme\" is an initiative by the Karnataka Minority Development Corporation (KMDC) to promote self-employment and economic activities among minority communities. The scheme provides financial assistance to eligible individuals from minority communities.",
305
+ "Tags": "Loan, Minority, Self-employment, Subsidy",
306
+ "Link": "https://www.myscheme.gov.in/schemes/vpls"
307
+ },
308
+ {
309
+ "Title": "Incentive For The Simple Marriage (Scheduled Tribe)",
310
+ "Description": "The scheme \"Incentive for the Simple Marriage\" was launched by the Tribal Welfare Department, Government of Karnataka. The scheme provides an incentive of ₹50,000/- to ST individuals residing in Karnataka who marry another ST individual on or after 11th August 2015.",
311
+ "Tags": "Couple, Incentive, Marriage, Schedule Tribe, Spouse, ST",
312
+ "Link": "https://www.myscheme.gov.in/schemes/iftsmst"
313
+ },
314
+ {
315
+ "Title": "Self Employment Scheme",
316
+ "Description": "Under this scheme, Subsidies will be provided to the religious minority communities with the help of Nationalized / Scheduled banks to start or improve a small-scale handicraft industry, service sector, and agro-based activities.",
317
+ "Tags": "Empowerment, Minorities, Self Employment",
318
+ "Link": "https://www.myscheme.gov.in/schemes/ses"
319
+ },
320
+ {
321
+ "Title": "Incentive For The Simple Marriage",
322
+ "Description": "The Social Welfare Department of the Government of Karnataka has launched the Simple Marriage scheme, which offers incentives to couples belonging to the SC community. The scheme aims to promote the idea of simple marriages and provide financial assistance to eligible couples.",
323
+ "Tags": "Incentive, Marriage, Schedule Caste, Social Welfare",
324
+ "Link": "https://www.myscheme.gov.in/schemes/iftsm"
325
+ },
326
+ {
327
+ "Title": "Prerana (micro Credit Finance) Scheme",
328
+ "Description": "DR. BR Ambedkar Development Corporation has launched the Prerana scheme in which Scheduled Caste/ Scheduled Tribe Women Self Help Groups will be financed by mass production / service units. For a group of 10 members, Rs. 2,50,000 / – will be allowed. Rs. 15,000 /- subsidy Rs. 10,000/- Margin Money.",
329
+ "Tags": "None",
330
+ "Link": "https://www.myscheme.gov.in/schemes/prerana"
331
+ },
332
+ {
333
+ "Title": "Assistance For Major Ailments (Karmika Chikitsa Bhagya) (K.B.O.C.W.W.B)",
334
+ "Description": "The \"Assistance For Major Ailments (Karmika Chikitsa Bhagya)'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides financial support to registered construction workers and their dependents for medical expenses related to specified major ailments.",
335
+ "Tags": "Ailments, Building Worker, Construction Worker, Labour, Medical Assistance",
336
+ "Link": "https://www.myscheme.gov.in/schemes/amakcbkassistance-for-major-ailments-karmika-chikitsa-bhagya-kbocwwb"
337
+ },
338
+ {
339
+ "Title": "Disability Pension and Ex-Gratia (K.B.O.C.W.W.B)",
340
+ "Description": "The \"Disability Pension and Ex-Gratia'' by the BOCW Welfare Board, Department of Labour, Karnataka, is a welfare scheme that provides a monthly pension to beneficiaries partially disabled due to worksite accidents or diseases, with an additional ex-gratia payment based on disability percentage.",
341
+ "Tags": "Building Worker, Construction Worker, Disability, Ex-Gratia, Labour, Pension",
342
+ "Link": "https://www.myscheme.gov.in/schemes/dpaexgkbocwwb"
343
+ },
344
+ {
345
+ "Title": "Charmashilpa Scheme",
346
+ "Description": "The \"Charmashilpa Scheme\" aims to modernize the leather artisans' production methods by offering financial assistance to setup mechanized production units. This support helps leather artisan SHGs and cooperative societies enhance the quality of their products, making them more competitive.",
347
+ "Tags": "Artisans, Co-operative Society, Financial Assistance, SHGs, Subsidy",
348
+ "Link": "https://www.myscheme.gov.in/schemes/cs"
349
+ },
350
+ {
351
+ "Title": "Swavalambi/Sanchari Marata Malige",
352
+ "Description": "The \"Swavalambi/Sanchari Marata Malige\" aims to assist SC leather artisans in establishing their own showrooms or mobile vans to sell their products directly to consumers. Financial assistance is provided in the form of a subsidy depending on the location of the business.",
353
+ "Tags": "Artisans, Financial Assistance, Scheduled Caste, Self-employed, Youth",
354
+ "Link": "https://www.myscheme.gov.in/schemes/ssmm"
355
+ },
356
+ {
357
+ "Title": "Financial Assistance to the Teachers/Lecturers Children who taken loan from Nationalised Banks for studying Medical/Engineering Courses",
358
+ "Description": "The “Financial Assistance to the Teachers/Lecturers Children who taken loan from Nationalised Banks for studying Medical/Engineering Courses” aims to provide financial assistance to the children of teachers/lecturers working in govt. & aided primary, secondary, graduate, & post-graduate institution.",
359
+ "Tags": "Children, Engineering Courses, Financial Assistance, Lecturers, Medical, Teachers",
360
+ "Link": "https://www.myscheme.gov.in/schemes/fatlclnbsmec"
361
+ },
362
+ {
363
+ "Title": "Incentive For The Intra Caste Marriage within Scheduled Tribe Community",
364
+ "Description": "The scheme \"Incentive for Intra Caste Marriage within the Scheduled Tribe Community\" was launched by the Tribal Welfare Department, Government of Karnataka. The scheme provides an incentive of ₹2,00,000/- to couples who are both from the Scheduled Tribe community but belong to different sub-caste.",
365
+ "Tags": "Incentive, Intra Caste, Marriage, Schedule Tribe, ST",
366
+ "Link": "https://www.myscheme.gov.in/schemes/ifticmwstc"
367
+ },
368
+ {
369
+ "Title": "Griha Lakshmi Scheme",
370
+ "Description": "The scheme \"Griha Lakshmi\" aims to provide financial assistance to women heads of households in Karnataka. The scheme offers a monthly benefit of ₹2,000/- to eligible women, helping them manage household expenses and improve their economic stability.",
371
+ "Tags": "Below Poverty Line, Empowerment, Expenses, Financial Assistance, Woman",
372
+ "Link": "https://www.myscheme.gov.in/schemes/gls"
373
+ },
374
+ {
375
+ "Title": "Ashadeepa Scheme",
376
+ "Description": "The scheme was introduced by the Government of Karnataka in the 2017-18 budget to encourage private sector industries and companies to provide employment opportunities to persons belonging to the Scheduled Caste and Scheduled Tribe categories, ensuring social justice.",
377
+ "Tags": "Apprentice Trainee, Employment, Scheduled Caste, Scheduled Tribe, Skill Development",
378
+ "Link": "https://www.myscheme.gov.in/schemes/ads"
379
+ }
380
+ ]
api/data/translated_schemes_kn.json ADDED
The diff for this file is too large to render. See raw diff
 
api/rag/IndicTrans2 DELETED
@@ -1 +0,0 @@
1
- Subproject commit 53fd3e9df8ca5a5fc9d92f45027959f0b0e0b14f
 
 
api/rag/figures/eval_bleu.pdf ADDED
Binary file (12.5 kB). View file
 
api/rag/figures/eval_bleu.png ADDED
api/rag/figures/training_logs.json ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "loss": 8.1255,
4
+ "grad_norm": 5.886991024017334,
5
+ "learning_rate": 4.755e-05,
6
+ "epoch": 0.1,
7
+ "step": 50
8
+ },
9
+ {
10
+ "loss": 2.1223,
11
+ "grad_norm": 1.780342936515808,
12
+ "learning_rate": 4.5050000000000004e-05,
13
+ "epoch": 0.2,
14
+ "step": 100
15
+ },
16
+ {
17
+ "loss": 1.4172,
18
+ "grad_norm": 1.2484183311462402,
19
+ "learning_rate": 4.2550000000000004e-05,
20
+ "epoch": 0.3,
21
+ "step": 150
22
+ },
23
+ {
24
+ "loss": 1.0609,
25
+ "grad_norm": 1.4256188869476318,
26
+ "learning_rate": 4.0050000000000004e-05,
27
+ "epoch": 0.4,
28
+ "step": 200
29
+ },
30
+ {
31
+ "eval_loss": 0.8911033868789673,
32
+ "eval_score": 0.06293457344434858,
33
+ "eval_counts": [
34
+ 163,
35
+ 1,
36
+ 0,
37
+ 0
38
+ ],
39
+ "eval_totals": [
40
+ 3683,
41
+ 3483,
42
+ 3283,
43
+ 3084
44
+ ],
45
+ "eval_precisions": [
46
+ 4.425739885962531,
47
+ 0.02871088142405972,
48
+ 0.015229972586049346,
49
+ 0.008106355382619975
50
+ ],
51
+ "eval_bp": 1.0,
52
+ "eval_sys_len": 3683,
53
+ "eval_ref_len": 1623,
54
+ "eval_bleu": 0.06293457344434858,
55
+ "eval_runtime": 109.0083,
56
+ "eval_samples_per_second": 1.835,
57
+ "eval_steps_per_second": 0.459,
58
+ "epoch": 0.4,
59
+ "step": 200
60
+ },
61
+ {
62
+ "loss": 0.938,
63
+ "grad_norm": 0.9899176955223083,
64
+ "learning_rate": 3.7550000000000005e-05,
65
+ "epoch": 0.5,
66
+ "step": 250
67
+ },
68
+ {
69
+ "loss": 0.8151,
70
+ "grad_norm": 0.8253363966941833,
71
+ "learning_rate": 3.505e-05,
72
+ "epoch": 0.6,
73
+ "step": 300
74
+ },
75
+ {
76
+ "loss": 0.8122,
77
+ "grad_norm": 1.7979626655578613,
78
+ "learning_rate": 3.2550000000000005e-05,
79
+ "epoch": 0.7,
80
+ "step": 350
81
+ },
82
+ {
83
+ "loss": 0.8516,
84
+ "grad_norm": 0.5633005499839783,
85
+ "learning_rate": 3.0050000000000002e-05,
86
+ "epoch": 0.8,
87
+ "step": 400
88
+ },
89
+ {
90
+ "eval_loss": 0.7273606657981873,
91
+ "eval_score": 0.45057594789546845,
92
+ "eval_counts": [
93
+ 208,
94
+ 5,
95
+ 2,
96
+ 0
97
+ ],
98
+ "eval_totals": [
99
+ 1368,
100
+ 1168,
101
+ 968,
102
+ 774
103
+ ],
104
+ "eval_precisions": [
105
+ 15.2046783625731,
106
+ 0.4280821917808219,
107
+ 0.2066115702479339,
108
+ 0.06459948320413436
109
+ ],
110
+ "eval_bp": 0.8299386398864602,
111
+ "eval_sys_len": 1368,
112
+ "eval_ref_len": 1623,
113
+ "eval_bleu": 0.45057594789546845,
114
+ "eval_runtime": 77.3509,
115
+ "eval_samples_per_second": 2.586,
116
+ "eval_steps_per_second": 0.646,
117
+ "epoch": 0.8,
118
+ "step": 400
119
+ },
120
+ {
121
+ "loss": 0.9177,
122
+ "grad_norm": 0.6352578997612,
123
+ "learning_rate": 2.7550000000000002e-05,
124
+ "epoch": 0.9,
125
+ "step": 450
126
+ },
127
+ {
128
+ "loss": 0.7974,
129
+ "grad_norm": 0.8983929753303528,
130
+ "learning_rate": 2.5050000000000002e-05,
131
+ "epoch": 1.0,
132
+ "step": 500
133
+ },
134
+ {
135
+ "loss": 0.7734,
136
+ "grad_norm": 0.6885063648223877,
137
+ "learning_rate": 2.2550000000000003e-05,
138
+ "epoch": 1.1,
139
+ "step": 550
140
+ },
141
+ {
142
+ "loss": 0.8068,
143
+ "grad_norm": 0.9066347479820251,
144
+ "learning_rate": 2.0050000000000003e-05,
145
+ "epoch": 1.2,
146
+ "step": 600
147
+ },
148
+ {
149
+ "eval_loss": 0.6409754157066345,
150
+ "eval_score": 2.2308463972371086,
151
+ "eval_counts": [
152
+ 281,
153
+ 33,
154
+ 11,
155
+ 6
156
+ ],
157
+ "eval_totals": [
158
+ 1269,
159
+ 1069,
160
+ 870,
161
+ 686
162
+ ],
163
+ "eval_precisions": [
164
+ 22.14342001576044,
165
+ 3.086997193638915,
166
+ 1.264367816091954,
167
+ 0.8746355685131195
168
+ ],
169
+ "eval_bp": 0.7565703085029857,
170
+ "eval_sys_len": 1269,
171
+ "eval_ref_len": 1623,
172
+ "eval_bleu": 2.2308463972371086,
173
+ "eval_runtime": 53.7294,
174
+ "eval_samples_per_second": 3.722,
175
+ "eval_steps_per_second": 0.931,
176
+ "epoch": 1.2,
177
+ "step": 600
178
+ },
179
+ {
180
+ "loss": 0.6715,
181
+ "grad_norm": 0.945395290851593,
182
+ "learning_rate": 1.755e-05,
183
+ "epoch": 1.3,
184
+ "step": 650
185
+ },
186
+ {
187
+ "loss": 0.7764,
188
+ "grad_norm": 2.0758280754089355,
189
+ "learning_rate": 1.505e-05,
190
+ "epoch": 1.4,
191
+ "step": 700
192
+ },
193
+ {
194
+ "loss": 0.6834,
195
+ "grad_norm": 0.43225401639938354,
196
+ "learning_rate": 1.255e-05,
197
+ "epoch": 1.5,
198
+ "step": 750
199
+ },
200
+ {
201
+ "loss": 0.7715,
202
+ "grad_norm": 0.982354998588562,
203
+ "learning_rate": 1.005e-05,
204
+ "epoch": 1.6,
205
+ "step": 800
206
+ },
207
+ {
208
+ "eval_loss": 0.6118303537368774,
209
+ "eval_score": 2.2446563832557205,
210
+ "eval_counts": [
211
+ 312,
212
+ 37,
213
+ 11,
214
+ 5
215
+ ],
216
+ "eval_totals": [
217
+ 1298,
218
+ 1098,
219
+ 899,
220
+ 717
221
+ ],
222
+ "eval_precisions": [
223
+ 24.03697996918336,
224
+ 3.3697632058287796,
225
+ 1.2235817575083425,
226
+ 0.697350069735007
227
+ ],
228
+ "eval_bp": 0.7785008405436009,
229
+ "eval_sys_len": 1298,
230
+ "eval_ref_len": 1623,
231
+ "eval_bleu": 2.2446563832557205,
232
+ "eval_runtime": 50.8519,
233
+ "eval_samples_per_second": 3.933,
234
+ "eval_steps_per_second": 0.983,
235
+ "epoch": 1.6,
236
+ "step": 800
237
+ },
238
+ {
239
+ "loss": 0.7415,
240
+ "grad_norm": 0.5001242160797119,
241
+ "learning_rate": 7.55e-06,
242
+ "epoch": 1.7,
243
+ "step": 850
244
+ },
245
+ {
246
+ "loss": 0.6018,
247
+ "grad_norm": 0.6771586537361145,
248
+ "learning_rate": 5.050000000000001e-06,
249
+ "epoch": 1.8,
250
+ "step": 900
251
+ },
252
+ {
253
+ "loss": 0.6488,
254
+ "grad_norm": 0.7276270389556885,
255
+ "learning_rate": 2.55e-06,
256
+ "epoch": 1.9,
257
+ "step": 950
258
+ },
259
+ {
260
+ "loss": 0.6508,
261
+ "grad_norm": 0.5777331590652466,
262
+ "learning_rate": 5.0000000000000004e-08,
263
+ "epoch": 2.0,
264
+ "step": 1000
265
+ },
266
+ {
267
+ "eval_loss": 0.6058484315872192,
268
+ "eval_score": 2.256370766803717,
269
+ "eval_counts": [
270
+ 319,
271
+ 37,
272
+ 11,
273
+ 5
274
+ ],
275
+ "eval_totals": [
276
+ 1310,
277
+ 1110,
278
+ 911,
279
+ 727
280
+ ],
281
+ "eval_precisions": [
282
+ 24.35114503816794,
283
+ 3.3333333333333335,
284
+ 1.2074643249176729,
285
+ 0.687757909215956
286
+ ],
287
+ "eval_bp": 0.7874689814366906,
288
+ "eval_sys_len": 1310,
289
+ "eval_ref_len": 1623,
290
+ "eval_bleu": 2.256370766803717,
291
+ "eval_runtime": 50.885,
292
+ "eval_samples_per_second": 3.93,
293
+ "eval_steps_per_second": 0.983,
294
+ "epoch": 2.0,
295
+ "step": 1000
296
+ },
297
+ {
298
+ "train_runtime": 493.5783,
299
+ "train_samples_per_second": 8.104,
300
+ "train_steps_per_second": 2.026,
301
+ "total_flos": 136952414208000.0,
302
+ "train_loss": 1.2491823387145997,
303
+ "epoch": 2.0,
304
+ "step": 1000
305
+ }
306
+ ]
api/rag/figures/training_loss.pdf ADDED
Binary file (11.4 kB). View file
 
api/rag/figures/training_loss.png ADDED
api/rag/rag.ipynb CHANGED
@@ -3461,105 +3461,6 @@
3461
  "### converting chunks to embendings "
3462
  ]
3463
  },
3464
- {
3465
- "cell_type": "code",
3466
- "execution_count": null,
3467
- "id": "d772f060",
3468
- "metadata": {},
3469
- "outputs": [
3470
- {
3471
- "name": "stdout",
3472
- "output_type": "stream",
3473
- "text": [
3474
- "Requirement already satisfied: langchain-huggingface in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (0.3.1)\n",
3475
- "Requirement already satisfied: langchain-core<1.0.0,>=0.3.70 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-huggingface) (0.3.75)\n",
3476
- "Requirement already satisfied: tokenizers>=0.19.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-huggingface) (0.22.0)\n",
3477
- "Requirement already satisfied: huggingface-hub>=0.33.4 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-huggingface) (0.34.4)\n",
3478
- "Requirement already satisfied: langsmith>=0.3.45 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (0.4.1)\n",
3479
- "Requirement already satisfied: tenacity!=8.4.0,<10.0.0,>=8.1.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (9.1.2)\n",
3480
- "Requirement already satisfied: jsonpatch<2.0,>=1.33 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (1.33)\n",
3481
- "Requirement already satisfied: PyYAML>=5.3 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (6.0.2)\n",
3482
- "Requirement already satisfied: typing-extensions>=4.7 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (4.14.0)\n",
3483
- "Requirement already satisfied: packaging>=23.2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (24.2)\n",
3484
- "Requirement already satisfied: pydantic>=2.7.4 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (2.11.7)\n",
3485
- "Requirement already satisfied: jsonpointer>=1.9 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from jsonpatch<2.0,>=1.33->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (3.0.0)\n",
3486
- "Requirement already satisfied: filelock in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from huggingface-hub>=0.33.4->langchain-huggingface) (3.18.0)\n",
3487
- "Requirement already satisfied: fsspec>=2023.5.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from huggingface-hub>=0.33.4->langchain-huggingface) (2025.3.0)\n",
3488
- "Requirement already satisfied: requests in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from huggingface-hub>=0.33.4->langchain-huggingface) (2.32.4)\n",
3489
- "Requirement already satisfied: tqdm>=4.42.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from huggingface-hub>=0.33.4->langchain-huggingface) (4.67.1)\n",
3490
- "Requirement already satisfied: httpx<1,>=0.23.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (0.28.1)\n",
3491
- "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (3.10.18)\n",
3492
- "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (1.0.0)\n",
3493
- "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (0.23.0)\n",
3494
- "Requirement already satisfied: anyio in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (4.9.0)\n",
3495
- "Requirement already satisfied: certifi in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (2025.6.15)\n",
3496
- "Requirement already satisfied: httpcore==1.* in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (1.0.9)\n",
3497
- "Requirement already satisfied: idna in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (3.10)\n",
3498
- "Requirement already satisfied: h11>=0.16 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from httpcore==1.*->httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (0.16.0)\n",
3499
- "Requirement already satisfied: annotated-types>=0.6.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from pydantic>=2.7.4->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (0.7.0)\n",
3500
- "Requirement already satisfied: pydantic-core==2.33.2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from pydantic>=2.7.4->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (2.33.2)\n",
3501
- "Requirement already satisfied: typing-inspection>=0.4.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from pydantic>=2.7.4->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (0.4.1)\n",
3502
- "Requirement already satisfied: charset_normalizer<4,>=2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from requests->huggingface-hub>=0.33.4->langchain-huggingface) (3.4.2)\n",
3503
- "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from requests->huggingface-hub>=0.33.4->langchain-huggingface) (1.26.20)\n",
3504
- "Requirement already satisfied: colorama in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from tqdm>=4.42.1->huggingface-hub>=0.33.4->langchain-huggingface) (0.4.6)\n",
3505
- "Requirement already satisfied: exceptiongroup>=1.0.2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from anyio->httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (1.3.0)\n",
3506
- "Requirement already satisfied: sniffio>=1.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from anyio->httpx<1,>=0.23.0->langsmith>=0.3.45->langchain-core<1.0.0,>=0.3.70->langchain-huggingface) (1.3.1)\n",
3507
- "Note: you may need to restart the kernel to use updated packages.\n",
3508
- "Requirement already satisfied: sentence-transformers in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (4.1.0)\n",
3509
- "Requirement already satisfied: transformers<5.0.0,>=4.41.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (4.56.0)\n",
3510
- "Requirement already satisfied: tqdm in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (4.67.1)\n",
3511
- "Requirement already satisfied: torch>=1.11.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (2.5.1+cu121)\n",
3512
- "Requirement already satisfied: scikit-learn in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (1.6.1)\n",
3513
- "Requirement already satisfied: scipy in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (1.13.1)\n",
3514
- "Requirement already satisfied: huggingface-hub>=0.20.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (0.34.4)\n",
3515
- "Requirement already satisfied: Pillow in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (11.2.1)\n",
3516
- "Requirement already satisfied: typing_extensions>=4.5.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sentence-transformers) (4.14.0)\n",
3517
- "Requirement already satisfied: filelock in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (3.18.0)\n",
3518
- "Requirement already satisfied: numpy>=1.17 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2.0.2)\n",
3519
- "Requirement already satisfied: packaging>=20.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (24.2)\n",
3520
- "Requirement already satisfied: pyyaml>=5.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (6.0.2)\n",
3521
- "Requirement already satisfied: regex!=2019.12.17 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2024.11.6)\n",
3522
- "Requirement already satisfied: requests in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2.32.4)\n",
3523
- "Requirement already satisfied: tokenizers<=0.23.0,>=0.22.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.22.0)\n",
3524
- "Requirement already satisfied: safetensors>=0.4.3 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.5.3)\n",
3525
- "Requirement already satisfied: fsspec>=2023.5.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2025.3.0)\n",
3526
- "Requirement already satisfied: networkx in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (3.2.1)\n",
3527
- "Requirement already satisfied: jinja2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (3.1.6)\n",
3528
- "Requirement already satisfied: sympy==1.13.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch>=1.11.0->sentence-transformers) (1.13.1)\n",
3529
- "Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sympy==1.13.1->torch>=1.11.0->sentence-transformers) (1.3.0)\n",
3530
- "Requirement already satisfied: colorama in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from tqdm->sentence-transformers) (0.4.6)\n",
3531
- "Requirement already satisfied: MarkupSafe>=2.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from jinja2->torch>=1.11.0->sentence-transformers) (3.0.2)\n",
3532
- "Requirement already satisfied: charset_normalizer<4,>=2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (3.4.2)\n",
3533
- "Requirement already satisfied: idna<4,>=2.5 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (3.10)\n",
3534
- "Requirement already satisfied: urllib3<3,>=1.21.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (1.26.20)\n",
3535
- "Requirement already satisfied: certifi>=2017.4.17 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from requests->transformers<5.0.0,>=4.41.0->sentence-transformers) (2025.6.15)\n",
3536
- "Requirement already satisfied: joblib>=1.2.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from scikit-learn->sentence-transformers) (1.5.1)\n",
3537
- "Requirement already satisfied: threadpoolctl>=3.1.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from scikit-learn->sentence-transformers) (3.6.0)\n",
3538
- "Note: you may need to restart the kernel to use updated packages.\n",
3539
- "Looking in indexes: https://download.pytorch.org/whl/cu121\n",
3540
- "Requirement already satisfied: torch==2.5.1+cu121 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (2.5.1+cu121)\n",
3541
- "Requirement already satisfied: torchvision==0.20.1+cu121 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (0.20.1+cu121)\n",
3542
- "Requirement already satisfied: torchaudio==2.5.1+cu121 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (2.5.1+cu121)\n",
3543
- "Requirement already satisfied: filelock in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch==2.5.1+cu121) (3.18.0)\n",
3544
- "Requirement already satisfied: typing-extensions>=4.8.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch==2.5.1+cu121) (4.14.0)\n",
3545
- "Requirement already satisfied: networkx in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch==2.5.1+cu121) (3.2.1)\n",
3546
- "Requirement already satisfied: jinja2 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch==2.5.1+cu121) (3.1.6)\n",
3547
- "Requirement already satisfied: fsspec in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch==2.5.1+cu121) (2025.3.0)\n",
3548
- "Requirement already satisfied: sympy==1.13.1 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torch==2.5.1+cu121) (1.13.1)\n",
3549
- "Requirement already satisfied: numpy in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torchvision==0.20.1+cu121) (2.0.2)\n",
3550
- "Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from torchvision==0.20.1+cu121) (11.2.1)\n",
3551
- "Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from sympy==1.13.1->torch==2.5.1+cu121) (1.3.0)\n",
3552
- "Requirement already satisfied: MarkupSafe>=2.0 in d:\\major project\\chathur\\bakend_huggingface\\chathur\\lib\\site-packages (from jinja2->torch==2.5.1+cu121) (3.0.2)\n",
3553
- "Note: you may need to restart the kernel to use updated packages.\n"
3554
- ]
3555
- }
3556
- ],
3557
- "source": [
3558
- "# %pip install -U langchain-huggingface\n",
3559
- "# %pip install sentence-transformers\n",
3560
- "# %pip install torch==2.5.1+cu121 torchvision==0.20.1+cu121 torchaudio==2.5.1+cu121 --index-url https://download.pytorch.org/whl/cu121"
3561
- ]
3562
- },
3563
  {
3564
  "cell_type": "code",
3565
  "execution_count": 11,
 
3461
  "### converting chunks to embendings "
3462
  ]
3463
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3464
  {
3465
  "cell_type": "code",
3466
  "execution_count": 11,
api/rag/translated_schemes_kn.json ADDED
The diff for this file is too large to render. See raw diff
 
api/rag/translator.ipynb CHANGED
The diff for this file is too large to render. See raw diff
 
api/services/scheme_service.py CHANGED
@@ -1,5 +1,7 @@
1
  import asyncio
2
  import logging
 
 
3
  from difflib import SequenceMatcher
4
  from api.core.firebase_utils import get_firestore_db
5
 
@@ -9,6 +11,10 @@ logger = logging.getLogger(__name__)
9
  cached_all_schemes = {}
10
  is_cache_loading = False
11
 
 
 
 
 
12
  async def load_all_schemes_into_cache():
13
  """
14
  Fetches all schemes from Firestore and populates the in-memory cache.
@@ -46,32 +52,67 @@ async def load_all_schemes_into_cache():
46
 
47
  temp_schemes_cache[state_name] = schemes_in_state
48
 
49
- cached_all_schemes = temp_schemes_cache
50
- logger.info(f"Cache loaded successfully. Total states: {len(cached_all_schemes)}")
51
 
52
  except Exception as e:
53
  logger.error(f"Error loading schemes into cache: {e}")
54
  finally:
55
  is_cache_loading = False
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
 
 
 
 
 
 
 
57
  def get_all_schemes(lang=None):
58
  """
59
  Returns all schemes from the in-memory cache.
60
- If lang is provided, return all schemes that either match lang OR don't have language set.
 
61
  """
62
  if not lang:
 
63
  return cached_all_schemes
64
 
65
  filtered_cache = {}
66
  for state, schemes in cached_all_schemes.items():
 
67
  filtered = [
68
  s for s in schemes
69
- if not s.get("language") or s.get("language", "").lower() == lang.lower()
70
  ]
71
  if filtered:
72
  filtered_cache[state] = filtered
 
73
  return filtered_cache
74
 
 
75
  def search_schemes_in_cache(query: str, lang: str = None):
76
  """
77
  Searches schemes across all states within the in-memory cache with basic stemming.
@@ -126,6 +167,7 @@ def search_schemes_in_cache(query: str, lang: str = None):
126
  logger.info(f"Search for '{query}' completed. Found {len(matched)} matches.")
127
  return matched
128
 
 
129
  def get_schemes_by_state(state: str, lang: str = None):
130
  """
131
  Returns schemes for a specific state from the in-memory cache.
@@ -136,7 +178,8 @@ def get_schemes_by_state(state: str, lang: str = None):
136
  return None
137
 
138
  if lang:
139
- return [s for s in schemes if s.get("language", lang).lower() == lang.lower()]
 
140
  return schemes
141
 
142
  def get_scheme_details_by_title(state: str, title: str, lang: str = None):
@@ -158,7 +201,7 @@ def get_scheme_details_by_title(state: str, title: str, lang: str = None):
158
  if db_id_clean == url_title_clean or db_title_clean == url_title_clean:
159
  # THIS IS THE CORRECTED LANGUAGE CHECK:
160
  # It now correctly handles schemes that don't have a language field.
161
- if not lang or scheme.get("language", lang).lower() == lang.lower():
162
  return scheme
163
 
164
  return None
 
1
  import asyncio
2
  import logging
3
+ import os
4
+ import json
5
  from difflib import SequenceMatcher
6
  from api.core.firebase_utils import get_firestore_db
7
 
 
11
  cached_all_schemes = {}
12
  is_cache_loading = False
13
 
14
+ # File path for Kannada JSON (project_root/data/translated_schemes_kn.json)
15
+ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
16
+ KAN_JSON_FILE = os.path.join(BASE_DIR, "data", "translated_schemes_kn.json")
17
+
18
  async def load_all_schemes_into_cache():
19
  """
20
  Fetches all schemes from Firestore and populates the in-memory cache.
 
52
 
53
  temp_schemes_cache[state_name] = schemes_in_state
54
 
55
+ # cached_all_schemes = temp_schemes_cache
56
+ # logger.info(f"Cache loaded successfully. Total states: {len(cached_all_schemes)}")
57
 
58
  except Exception as e:
59
  logger.error(f"Error loading schemes into cache: {e}")
60
  finally:
61
  is_cache_loading = False
62
+
63
+
64
+ # --- Load Kannada Schemes from JSON ---
65
+ try:
66
+ if os.path.exists(KAN_JSON_FILE):
67
+ with open(KAN_JSON_FILE, "r", encoding="utf-8") as f:
68
+ kn_data = json.load(f)
69
+
70
+ for state, schemes in kn_data.items():
71
+ state_key = state.strip().lower()
72
+ for s in schemes:
73
+ s["language"] = "kn" # ensure Kannada tag
74
+ if state_key in temp_schemes_cache:
75
+ temp_schemes_cache[state_key].extend(schemes)
76
+ else:
77
+ temp_schemes_cache[state_key] = schemes
78
+
79
+ logger.info("Kannada schemes loaded successfully from JSON.")
80
+ else:
81
+ logger.warning(f"Kannada JSON file not found at {KAN_JSON_FILE}")
82
+
83
+ except Exception as e:
84
+ logger.error(f"Error loading Kannada JSON schemes: {e}")
85
 
86
+ # --- Finalize cache ---
87
+ cached_all_schemes = temp_schemes_cache
88
+ is_cache_loading = False
89
+ logger.info(f"Cache ready. Total states: {len(cached_all_schemes)}")
90
+
91
+
92
+ # In scheme_service.py
93
  def get_all_schemes(lang=None):
94
  """
95
  Returns all schemes from the in-memory cache.
96
+ If lang is provided, return all schemes that match the specified language.
97
+ Schemes without a language tag are considered 'en' by default.
98
  """
99
  if not lang:
100
+ # No change here, returns everything if no language is specified
101
  return cached_all_schemes
102
 
103
  filtered_cache = {}
104
  for state, schemes in cached_all_schemes.items():
105
+ # Corrected Logic: Default the language to 'en' if the key is missing.
106
  filtered = [
107
  s for s in schemes
108
+ if s.get("language", "en").lower() == lang.lower()
109
  ]
110
  if filtered:
111
  filtered_cache[state] = filtered
112
+ logger.info(f"Filtering schemes for lang={lang}")
113
  return filtered_cache
114
 
115
+
116
  def search_schemes_in_cache(query: str, lang: str = None):
117
  """
118
  Searches schemes across all states within the in-memory cache with basic stemming.
 
167
  logger.info(f"Search for '{query}' completed. Found {len(matched)} matches.")
168
  return matched
169
 
170
+ # In scheme_service.py
171
  def get_schemes_by_state(state: str, lang: str = None):
172
  """
173
  Returns schemes for a specific state from the in-memory cache.
 
178
  return None
179
 
180
  if lang:
181
+ # Corrected Logic: Default to an empty string to prevent false matches.
182
+ return [s for s in schemes if s.get("language", "").lower() == lang.lower()]
183
  return schemes
184
 
185
  def get_scheme_details_by_title(state: str, title: str, lang: str = None):
 
201
  if db_id_clean == url_title_clean or db_title_clean == url_title_clean:
202
  # THIS IS THE CORRECTED LANGUAGE CHECK:
203
  # It now correctly handles schemes that don't have a language field.
204
+ if not lang or scheme.get("language", "").lower() == lang.lower():
205
  return scheme
206
 
207
  return None