Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,7 @@ def process_row(row: List, row_index: int):
|
|
22 |
row_cell_values = []
|
23 |
for cell_value in row:
|
24 |
if isinstance(cell_value, int) or isinstance(cell_value, float):
|
25 |
-
cell_value =
|
26 |
row_cell_values.append(str(cell_value))
|
27 |
else:
|
28 |
row_cell_values.append(cell_value)
|
@@ -35,7 +35,7 @@ def process_row(row: List, row_index: int):
|
|
35 |
def process_table(table_content: Dict):
|
36 |
table_str = process_header(table_content["header"]) + " "
|
37 |
for i, row_example in enumerate(table_content["rows"]):
|
38 |
-
table_str +=
|
39 |
return table_str.strip()
|
40 |
|
41 |
# load the dataset
|
@@ -49,7 +49,7 @@ for sample in banglatableQA['train']:
|
|
49 |
# create the input sequence: query + linearized input table
|
50 |
table_content = {"header": list(input_table.columns)[1:], "rows": [list(row.values)[1:] for i, row in input_table.iterrows()]}
|
51 |
linearized_inp_table = process_table(table_content)
|
52 |
-
linearized_output_table = process_table({"name": None, "header": [
|
53 |
"rows": [list(row.values) for i, row in answer.iterrows()]})
|
54 |
source = query + " " + linearized_inp_table
|
55 |
target = linearized_output_table
|
|
|
22 |
row_cell_values = []
|
23 |
for cell_value in row:
|
24 |
if isinstance(cell_value, int) or isinstance(cell_value, float):
|
25 |
+
cell_value = convert_engDigit_to_bengali(str(cell_value))
|
26 |
row_cell_values.append(str(cell_value))
|
27 |
else:
|
28 |
row_cell_values.append(cell_value)
|
|
|
35 |
def process_table(table_content: Dict):
|
36 |
table_str = process_header(table_content["header"]) + " "
|
37 |
for i, row_example in enumerate(table_content["rows"]):
|
38 |
+
table_str += process_row(row_example, row_index=i + 1) + " "
|
39 |
return table_str.strip()
|
40 |
|
41 |
# load the dataset
|
|
|
49 |
# create the input sequence: query + linearized input table
|
50 |
table_content = {"header": list(input_table.columns)[1:], "rows": [list(row.values)[1:] for i, row in input_table.iterrows()]}
|
51 |
linearized_inp_table = process_table(table_content)
|
52 |
+
linearized_output_table = process_table({"name": None, "header": [translate_column(col) for col in list(answer.columns)],
|
53 |
"rows": [list(row.values) for i, row in answer.iterrows()]})
|
54 |
source = query + " " + linearized_inp_table
|
55 |
target = linearized_output_table
|