이혜연

Update createDataset.py

...@@ -9,7 +9,7 @@ def getKakaotalkbookData(): ...@@ -9,7 +9,7 @@ def getKakaotalkbookData():
9 personName = raw_input('Enter your full kakao name: ') 9 personName = raw_input('Enter your full kakao name: ')
10 personName = personName.rstrip('\r') 10 personName = personName.rstrip('\r')
11 responseDictionary = dict() 11 responseDictionary = dict()
12 - with open(r'C:\Users\dlgpd\Desktop\20-1\oss\term-project\Learn_for_yourself\chat_system\fbMessages.txt', 'r') as fbFile: 12 + with open(r'Yourown', 'r') as fbFile:
13 allLines = fbFile.readlines() 13 allLines = fbFile.readlines()
14 14
15 myMessage, otherPersonsMessage, currentSpeaker = "","","" 15 myMessage, otherPersonsMessage, currentSpeaker = "","",""
...@@ -65,7 +65,7 @@ def getFacebookData(): ...@@ -65,7 +65,7 @@ def getFacebookData():
65 personName = input('Enter your full Kakaotalk name: ') 65 personName = input('Enter your full Kakaotalk name: ')
66 personName = personName.rstrip('\r') 66 personName = personName.rstrip('\r')
67 responseDictionary = dict() 67 responseDictionary = dict()
68 - with open(r'C:\Users\dlgpd\Downloads\kakao\Talk_2020.6.21 20_35-1.txt', 'r', encoding='UTF8') as fbFile: 68 + with open(r'Your root', 'r', encoding='UTF8') as fbFile:
69 allLines = fbFile.readlines() 69 allLines = fbFile.readlines()
70 70
71 myMessage, otherPersonsMessage, currentSpeaker = "","","" 71 myMessage, otherPersonsMessage, currentSpeaker = "","",""
...@@ -141,9 +141,9 @@ print(combinedDictionary) ...@@ -141,9 +141,9 @@ print(combinedDictionary)
141 print ('Total len of dictionary', len(combinedDictionary)) 141 print ('Total len of dictionary', len(combinedDictionary))
142 142
143 print('Saving conversation data dictionary') 143 print('Saving conversation data dictionary')
144 -np.save(r'C:\Users\dlgpd\Desktop\20-1\oss\term-project\Learn_for_yourself\chat_system\conversationDictionary.npy', combinedDictionary) 144 +np.save(r'conversationDictionary.npy', combinedDictionary)
145 145
146 -conversationFile = open(r'C:\Users\dlgpd\Desktop\20-1\oss\term-project\Learn_for_yourself\chat_system\conversationData.txt', 'w', encoding='UTF8') 146 +conversationFile = open(r'conversationData.txt', 'w', encoding='UTF8')
147 for key, value in combinedDictionary.items(): 147 for key, value in combinedDictionary.items():
148 if (not key.strip() or not value.strip()): 148 if (not key.strip() or not value.strip()):
149 # If there are empty strings 149 # If there are empty strings
......