smaz2.py misses 0th word
Aperta
- Lingua principale
- C
- Stelle
- 115
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
https://github.com/antirez/smaz2/blame/71ecc43e9f4f992a3d160494ab780e81efb743da/smaz2.py#L63
In smaz2.py I noticed:
Line 63 "If i:" will not take the "if" part if i == 0, which is i's 1st value from the enumerate. Thus the 1st word in the dictionary will not be matched.
Same issue occurs on lines 86 and 88 with respect to 0th bigram.
Suggest 4 changes:
1) in line 61 set i to None instead of False
2) in line 63 test "if i is not None:" instead of just "if i:"
3,4) repeat 1) and 2) for lines 86 + 88.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.