1
0
forked from GitHub/gf-core

store the total number of PMCFG categories in the PGF file

This commit is contained in:
krasimir
2008-10-15 07:47:57 +00:00
parent 50fc82d4db
commit ebef7ecb7b
5 changed files with 7 additions and 7 deletions

View File

@@ -35,12 +35,8 @@ initState pinfo start =
(lbl,seqid) <- assocs lins
return (Active 0 0 funid seqid args (AK cat lbl))
max_fid = maximum (0:[maximum (cat:args) | (cat, set) <- IntMap.toList (productions pinfo)
, p <- Set.toList set
, let args = case p of {FApply _ args -> args; FCoerce cat -> [cat]}])+1
in State pinfo
(Chart emptyAC [] emptyPC (productions pinfo) max_fid 0)
(Chart emptyAC [] emptyPC (productions pinfo) (totalCats pinfo) 0)
(Set.fromList items)
-- | From the current state and the next token