2017-11-28 1 views
0

, 내가 원하는 fasttext 분류 깊은 학습에 사용자 정의 데이터 집합을 추가하지만, 내가 그들을 그렇게 내가 내 사용자 정의 데이터 집합을 추가 할 찾을 수있는 몇 가지 파일이 있습니다 입력으로 그리고 그 후에 실행하십시오. github 매뉴얼에는 입력으로 우리 자신의 데이터 세트를 추가하는 지침이 없습니까?는 "<strong>fasttext</strong>"분류를 실행이 guithub 링크 <a href="https://github.com/brightmart/text_classification" rel="nofollow noreferrer">https://github.com/brightmart/text_classification</a>을 바탕으로

이 문제를 어떻게 해결할 수 있습니까?

답변

0

당신은 this snippet에서 LOAD_FILE 코드가 필요하지 않습니다 그는 데이터/일괄처럼 내가 당신을 위해 영어로 번역하고 싶은 무엇을 말한 : 당신이 할 수있는

print("testX.shape:", np.array(testX).shape) # 2500 lists, with each list representing a sentence 
# there are 2500 lists in testX each one standing for a sentence, 
# which means testX is a 2 dimensional list containing 2500 lists 
# and each list has several ids of words 
print("testY.shape:", np.array(testY).shape) # 2500 labels 
# correspondingly there are 2500 labels in the testY which is a 
# one dimensional list 
print("testX[0]:", testX[0]) # [17, 25, 10, 406, 26, 14, 56, 61, 62, 323, 4] 
# this is what the first sentence in testX like (all ids) 
print("testX[1]:", testX[1]); 
print("testY[0]:", testY[0]) # 0 ;print("testY[1]:",testY[1]) #0 

을 자신의 testX를 만들고 testY는 둘 다 목록에 포함됩니다.

관련 문제