thiyagab commited on
Commit
969b5ea
1 Parent(s): c6725ff

Added tamil translations

Browse files
Files changed (1) hide show
  1. semanticsearch.py +3 -0
semanticsearch.py CHANGED
@@ -12,10 +12,12 @@ data = json.load(f)
12
 
13
  en_translations = []
14
  kurals = []
 
15
  # Iterating through the json
16
  # list
17
  for kural in data['kurals']:
18
  en_translations.append((kural['meaning']['en'].lower()))
 
19
  kurals.append(kural['kural'])
20
 
21
  # Closing file
@@ -67,6 +69,7 @@ def kural_definition(index: int):
67
  response = ''
68
  print(en_translations[index])
69
  response += "\n".join(kurals[index]) + "\n"
 
70
  response += en_translations[index] + "\n\n"
71
  print("\n".join(kurals[index]))
72
  return response
 
12
 
13
  en_translations = []
14
  kurals = []
15
+ ta_translations=[]
16
  # Iterating through the json
17
  # list
18
  for kural in data['kurals']:
19
  en_translations.append((kural['meaning']['en'].lower()))
20
+ ta_translations.append((kural['meaning']['ta_salamon'].lower()))
21
  kurals.append(kural['kural'])
22
 
23
  # Closing file
 
69
  response = ''
70
  print(en_translations[index])
71
  response += "\n".join(kurals[index]) + "\n"
72
+ response += ta_translations[index]+"\n"
73
  response += en_translations[index] + "\n\n"
74
  print("\n".join(kurals[index]))
75
  return response