We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1cac2c + f0b67f4 commit 976ed6cCopy full SHA for 976ed6c
md/CYK-Parse.md
@@ -12,7 +12,7 @@ __function__ CYK-Parse(_words_, _grammar_) __returns__ _P_, a table of probabili
12
 /\* Combine first and second parts of right-hand sides of rules, from short to long \*/
13
 __for__ _length_ = 2 __to__ _N_ __do__
14
  __for__ _start_ = 1 __to__ _N_ - _length_ + 1 __do__
15
-   __for__ _len1_ = 1 __to__ _N_ - 1 __do__
+   __for__ _len1_ = 1 __to__ _length_ - 1 __do__
16
    _len2_ ← _length_ - _len1_
17
    __for each__ rule of the form (_X_ → _Y_ _Z_ [_p_]) __do__
18
     _P_[_X_, _start_, _length_] ← Max(_P_[_X_, _start_, _length_], _P_[_Y_, _start_, _len1_] x _P_[_Z_, _start_ + _len1_, _len2_] x _p_)
0 commit comments