-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
22 lines (17 loc) · 859 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import torch.nn.functional as F
import torch
import pandas as pd
from collections import Counter
#input = torch.LongTensor([[1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4],
# [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4],
# [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4],
# [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4], [1], [4],])
#embe = torch.nn.Embedding(4874,5)
#print(embe(input))
annotation=pd.read_csv('/data/minjae/BC/swbd_equal.tsv',delimiter='\t',encoding='utf-8')
#print(len(Counter(annotation['folder'])))
a = []
for i in range(len(annotation)):
if annotation.iloc[i,6] not in a:
a.append(annotation.iloc[i,6])
print(len(a))