Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이혜연
/
Make_your_own_ chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
이혜연
2020-09-18 18:51:04 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cbd2cfc25831900e9bc832493ad06d8bb02868fc
cbd2cfc2
1 parent
76f7ffed
Update createDataset.py
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
chat_system/createDataset.py
chat_system/createDataset.py
View file @
cbd2cfc
...
...
@@ -9,7 +9,7 @@ def getKakaotalkbookData():
personName
=
raw_input
(
'Enter your full kakao name: '
)
personName
=
personName
.
rstrip
(
'
\r
'
)
responseDictionary
=
dict
()
with
open
(
r'
C:\Users\dlgpd\Desktop\20-1\oss\term-project\Learn_for_yourself\chat_system\fbMessages.txt
'
,
'r'
)
as
fbFile
:
with
open
(
r'
Yourown
'
,
'r'
)
as
fbFile
:
allLines
=
fbFile
.
readlines
()
myMessage
,
otherPersonsMessage
,
currentSpeaker
=
""
,
""
,
""
...
...
@@ -65,7 +65,7 @@ def getFacebookData():
personName
=
input
(
'Enter your full Kakaotalk name: '
)
personName
=
personName
.
rstrip
(
'
\r
'
)
responseDictionary
=
dict
()
with
open
(
r'
C:\Users\dlgpd\Downloads\kakao\Talk_2020.6.21 20_35-1.tx
t'
,
'r'
,
encoding
=
'UTF8'
)
as
fbFile
:
with
open
(
r'
Your roo
t'
,
'r'
,
encoding
=
'UTF8'
)
as
fbFile
:
allLines
=
fbFile
.
readlines
()
myMessage
,
otherPersonsMessage
,
currentSpeaker
=
""
,
""
,
""
...
...
@@ -141,9 +141,9 @@ print(combinedDictionary)
print
(
'Total len of dictionary'
,
len
(
combinedDictionary
))
print
(
'Saving conversation data dictionary'
)
np
.
save
(
r'
C:\Users\dlgpd\Desktop\20-1\oss\term-project\Learn_for_yourself\chat_system\
conversationDictionary.npy'
,
combinedDictionary
)
np
.
save
(
r'conversationDictionary.npy'
,
combinedDictionary
)
conversationFile
=
open
(
r'
C:\Users\dlgpd\Desktop\20-1\oss\term-project\Learn_for_yourself\chat_system\
conversationData.txt'
,
'w'
,
encoding
=
'UTF8'
)
conversationFile
=
open
(
r'conversationData.txt'
,
'w'
,
encoding
=
'UTF8'
)
for
key
,
value
in
combinedDictionary
.
items
():
if
(
not
key
.
strip
()
or
not
value
.
strip
()):
# If there are empty strings
...
...
Please
register
or
login
to post a comment