小编use*_*838的帖子

无法理解CYK算法的伪代码

我正在阅读有关CYK算法的内容,并且有一部分我无法理解的伪代码.整个伪代码是:

let the input be a string S consisting of n characters: a1 ... an.
let the grammar contain r nonterminal symbols R1 ... Rr.
This grammar contains the subset Rs which is the set of start symbols.
let P[n,n,r] be an array of booleans. Initialize all elements of P to false.
for each i = 1 to n
  for each unit production Rj -> ai
    set P[i,1,j] = true
for each i = 2 to n -- …
Run Code Online (Sandbox Code Playgroud)

java algorithm parsing cyk

5
推荐指数
1
解决办法
1554
查看次数

标签 统计

algorithm ×1

cyk ×1

java ×1

parsing ×1