Skip to content

Commit

Permalink
Update linguist.py
Browse files Browse the repository at this point in the history
Corrected the spelling of the variable 'length' (from 'lenght') in def tellStory().
  • Loading branch information
ptrckqnln committed Mar 31, 2014
1 parent 3e83d73 commit 35568cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/linguist.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ def runLinguist(datapath):

return model

def tellStory(model, startSent, lenght):
def tellStory(model, startSent, length):
"""feed startSent sequence and then continue to generate the story by the CLA.
param model: the trained CLA model
param startSent: starting sequence as a string, eg \"And so he raised the gun\"
param lenght: #sequences to generate. """
param length: #sequences to generate. """

model.disableLearning()
for s in startSent:
Expand All @@ -115,7 +115,7 @@ def tellStory(model, startSent, lenght):
numSent = 0
c = s
sentence_len = 0
while numSent <= lenght:
while numSent <= length:
print(c),
modelInput = {'letter': c}
result = model.run(modelInput)
Expand Down

0 comments on commit 35568cd

Please sign in to comment.