Skip to content

Commit

Permalink
mvp-HXLTM (#16), EticaAI/HXL-Data-Science-file-formats#19: Ok, vou de…
Browse files Browse the repository at this point in the history
…sistir e usar uma aproximação mais minimaista, que apenas funcione no curto prazo; se necessário pode ser melhorado depois
  • Loading branch information
fititnt committed Jun 29, 2021
1 parent bc0fd00 commit bf4d7ad
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions _systema/programma/hxltm2xliff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -775,7 +806,6 @@ def item_to_hxlrow(item):

# HXLRow = hxl.model.Row(hxlcolumns, hxlcolumnsvals)


def linguam_2_hxlattrs(linguam):
"""linguam_2_hxlattrs
Expand Down

0 comments on commit bf4d7ad

Please sign in to comment.