Skip to content

Commit

Permalink
fix boog
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Charles Campbell committed Nov 28, 2015
1 parent 9753b33 commit 718b746
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion unnaturalcode/sourceModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def predictLexed(self, lexemes):
def windowedQuery(self, lexemes, returnWindows=True):
lastWindowStarts = len(lexemes)-self.windowSize
if lastWindowStarts < 1:
return [(lexemes, self.queryLexed(lexemes))]
if returnWindows:
return [(lexemes, self.queryLexed(lexemes))]
else:
return [(False, self.queryLexed(lexemes))]
r = []
for i in range(0,lastWindowStarts+1): # remember range is [)
end = i+self.windowSize
Expand Down

0 comments on commit 718b746

Please sign in to comment.