This commit is contained in:
karoel2 2023-03-29 11:28:42 +02:00
parent 354d6216db
commit ea8f0ca9d8
2 changed files with 7420 additions and 7417 deletions

View File

@ -2,14 +2,17 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import re\n",
"with open('test-A/in.tsv', 'r') as f_in:\n",
" with open('test-A/out.tsv', 'w') as f_out:\n",
" for _ in f_in:\n",
" f_out.write('the:0.1 :0.9\\n')"
" for line in f_in:\n",
" v = random.choice(re.split(\" |\\n|\\t\", line)[50:])\n",
" f_out.write(f'{v}:0.9 :0.1\\n')"
]
},
{

File diff suppressed because it is too large Load Diff