init2
This commit is contained in:
parent
354d6216db
commit
ea8f0ca9d8
@ -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')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
14828
test-A/out.tsv
14828
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user