This commit is contained in:
Dominika Grajewska 2020-04-21 16:27:03 +02:00
parent d043e30286
commit 1bb3c23ca3
6 changed files with 21835 additions and 0 deletions

6
adpipe.py Normal file
View File

@ -0,0 +1,6 @@
import sys
change = ['pilka-nozna','siatkowka','sporty-walki','pilka-reczna','koszykowka','tenis','moto','zimowe']
for line in sys.stdin:
print('|text '+line)

6
build.sh Normal file
View File

@ -0,0 +1,6 @@
vw -i model.vw -t -d withpip.tsv --loss_function logistic --probabilities -p out.tsv
#test
vw -d changed.tsv --oaa 8 --loss_function logistic --probabilities -f model.vw
#train

10
changelabels.py Normal file
View File

@ -0,0 +1,10 @@
import sys
change = ['pilka-nozna','siatkowka','sporty-walki','pilka-reczna','koszykowka','tenis','moto','zimowe']
for line in sys.stdin:
liner = line.rstrip()
fields = liner.split('\t')
fields[1] = fields[1].replace(':',' ')
if fields[0] in change:
print(str(change.index(fields[0])+1)+' |text '+fields[1])

10904
dev-0/out.tsv Normal file

File diff suppressed because it is too large Load Diff

15
powrot.py Normal file
View File

@ -0,0 +1,15 @@
import sys
change = ['pilka-nozna','siatkowka','sporty-walki','pilka-reczna','koszykowka','tenis','moto','zimowe']
for line in sys.stdin:
liner = line.rstrip()
fields = liner.replace('1:',change[0]+':')
fields = fields.replace('2:',change[1]+':')
fields = fields.replace('3:',change[2]+':')
fields = fields.replace('4:',change[3]+':')
fields = fields.replace('5:',change[4]+':')
fields = fields.replace('6:',change[5]+':')
fields = fields.replace('7:',change[6]+':')
fields = fields.replace('8:',change[7]+':')
print(fields)

10894
test-A/out.tsv Normal file

File diff suppressed because it is too large Load Diff