boostcampaitech2 / klue-level2-nlp-06

KLUE-RE - Relation Extraction
5 stars 2 forks source link

DataLoad error in baseline #19

Open Jjackson-dev opened 2 years ago

Jjackson-dev commented 2 years ago

Ai stages 토론보다가 발견한건데 기존 데이터 불러오는 방식이 이런식이였는데

  for i,j in zip(dataset['subject_entity'], dataset['object_entity']):
    i = i[1:-1].split(',')[0].split(':')[1]
    j = j[1:-1].split(',')[0].split(':')[1]

split(',') 때문에 글자가 6,000명 이런글자의 경우 '6'으로 읽어오더라구요

그래서

    for i,j in zip(dataset['subject_entity'], dataset['object_entity']):
        i = i[i.find('word')+8: i.find('start_idx')-4]
        j = j[j.find('word')+8: j.find('start_idx')-4]
for i, j in zip(dataset["subjectentity"], dataset["objectentity"]):
        i=eval(i)['word']
        j=eval(j)['word']

이렇게 수정하셨다는데 조금 중요한 이슈같은데 어떻게 생각하시나요?

참고 링크 : https://stages.ai/competitions/75/discussion/talk/post/641

hylee-250 commented 2 years ago

한진님 방법 쓰면 저 문제 해결 되나요?

wlsl8135 commented 2 years ago

@hylee-250 넵 저도 dictionary타입으로 들고와서 데이터 전처리하기 때문에 해결될겁니다.