2a2b3aa7ef4ac140c8d55f7f68705225b2349955,Word2Vec.py,,cleanDataset,#Any#,19
Before Change
for line in allLines:
tempStr = line.replace("\n"," ").lower()
myStr += re.sub("[.!?]","", tempStr)
return myStr, Counter(myStr.split())
def createTrainingMatrices(dictionary, corpus):
allUniqueWords = dictionary.keys()
allWords = corpus.split()
After Change
intermediateDict = Counter(myStr.split())
for word in intermediateDict:
numOccurences = intermediateDict[word]
if numOccurences <= unknownCutoff:
intermediateDict["<unk>"] += numOccurences
myStr.replace(word, "<unk>")
del intermediateDict[word]
return myStr, intermediateDict
def createTrainingMatrices(dictionary, corpus):
allUniqueWords = dictionary.keys()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: adeshpande3/Facebook-Messenger-Bot
Commit Name: 2a2b3aa7ef4ac140c8d55f7f68705225b2349955
Time: 2017-07-11
Author: adeshpande3@g.ucla.edu
File Name: Word2Vec.py
Class Name:
Method Name: cleanDataset
Project Name: quiltdata/quilt
Commit Name: 471cfac491d5766a0ac3e20bfe2c8c486ba12cc6
Time: 2017-05-15
Author: dima@gmail.com
File Name: quilt/tools/core.py
Class Name: RootNode
Method Name: __json__
Project Name: quiltdata/quilt
Commit Name: f49819a1208c70e25e84a5302132cb6f34eb4fa1
Time: 2017-05-08
Author: dima@gmail.com
File Name: quilt_server/core.py
Class Name: RootNode
Method Name: __json__