From bf4d7ad658ded8d94aee536f3e176952b8ae36b9 Mon Sep 17 00:00:00 2001 From: Emerson Rocha Date: Tue, 29 Jun 2021 18:17:49 -0300 Subject: [PATCH] =?UTF-8?q?mvp-HXLTM=20(#16),=20EticaAI/HXL-Data-Science-f?= =?UTF-8?q?ile-formats#19:=20Ok,=20vou=20desistir=20e=20usar=20uma=20aprox?= =?UTF-8?q?ima=C3=A7=C3=A3o=20mais=20minimaista,=20que=20apenas=20funcione?= =?UTF-8?q?=20no=20curto=20prazo;=20se=20necess=C3=A1rio=20pode=20ser=20me?= =?UTF-8?q?lhorado=20depois?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _systema/programma/hxltm2xliff.py | 38 +++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/_systema/programma/hxltm2xliff.py b/_systema/programma/hxltm2xliff.py index 07d6d34..326416f 100755 --- a/_systema/programma/hxltm2xliff.py +++ b/_systema/programma/hxltm2xliff.py @@ -742,10 +742,41 @@ def item_to_hxlrow(item): HXLRow = hxl.model.Row(hxlcolumns, hxlcolumnsvals) # queries = [hxl.model.RowQuery.parse('#item')] - queries = hxl.model.RowQuery.parse('item+i_pt') - print(queries) + # queries = hxl.model.RowQuery.parse('item+i_pt') + # print(queries) + + # result = hxl.data("https://example.org/data.csv") + # result = hxl.data([item]) + # result = hxl.data([ + # ["#item+i_pt+i_por+is_latn", '#item+i_pt+i_por+is_latn+alt+list', '#meta+item+i_pt+i_por+is_latn'], + # ["teste", "teste2|teste3", "Exemplo de teste"] + # ]) + result = hxl.io.make_input([ + # ["#item+i_pt+i_por+is_latn", '#item+i_pt+i_por+is_latn+alt+list', + # '#meta+item+i_pt+i_por+is_latn'], + # ["teste", "teste2|teste3", "Exemplo de teste"] + ['#item+i_pt+i_por+is_latn,#item+i_pt+i_por+is_latn+alt+list,#meta+item+i_pt+i_por+is_latn'], + ['#item+i_pt+i_por+is_latn,#item+i_pt+i_por+is_latn+alt+list,#meta+item+i_pt+i_por+is_latn'], + ["teste,teste2|teste3,Exemplo de teste"], + ["teste,teste2|teste3,Exemplo de teste"] + ]) + result2 = hxl.data({'data': result}) + + print(result) + print(result2) + print(result2.values()) + for i in result2: + print(i) + result3 = result2.with_columns('#meta') + print(result3) + print(result3.values()) + for i2 in result3: + print(i2) + # print(result2.columns()) + # print(result.columns()) + return None - hxl.model.RowQuery.match_list(HXLRow) + # hxl.model.RowQuery.match_list(HXLRow) return HXLRow @@ -775,7 +806,6 @@ def item_to_hxlrow(item): # HXLRow = hxl.model.Row(hxlcolumns, hxlcolumnsvals) - def linguam_2_hxlattrs(linguam): """linguam_2_hxlattrs