The if statement if (word == -1) continue; will never evaluate to true because when filling the sen array, words with id -1 are already being discarded by this check a few lines above.
I suggest to remove the if-statement because it is misleading and if it every evaluated to true, it would do so in the next iteration again (because sentence_position would not change) and the program would be in an infinite loop.
The if statement
if (word == -1) continue;
will never evaluate totrue
because when filling thesen
array, words with id-1
are already being discarded by this check a few lines above.I suggest to remove the if-statement because it is misleading and if it every evaluated to
true
, it would do so in the next iteration again (becausesentence_position
would not change) and the program would be in an infinite loop.