Skip to content

Commit

Permalink
Update TrainFunctions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nreimers authored Jun 26, 2020
1 parent 8bc08c4 commit 8151dbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TrainFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def updateDistributionsFromSentences(text, wordCasingLookup, uniDist, backwardBi
for tokenIdx in xrange(2, len(sentence)-1): #Start at 2 to skip first word in sentence
prevWord = sentence[tokenIdx-1]
curWord = sentence[tokenIdx]
curWordLower = word.lower()
curWordLower = curWord.lower()
nextWordLower = sentence[tokenIdx+1].lower()

if curWordLower in wordCasingLookup and len(wordCasingLookup[curWordLower]) >= 2: #Only if there are multiple options
Expand Down Expand Up @@ -124,4 +124,4 @@ def updateDistributionsFromNgrams(bigramFile, trigramFile, wordCasingLookup, uni





0 comments on commit 8151dbb

Please sign in to comment.