mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-11 04:02:52 -06:00
SRG generation: merge categories with identical set of productions. The LC_LR algorithm produces lots of those, especially when there is little inflection.
This commit is contained in:
@@ -95,7 +95,8 @@ makeSimpleSRG opt s =
|
||||
probs = stateProbs s
|
||||
l = fmap (replace '_' '-') $ getOptVal opts speechLanguage
|
||||
(cats,cfgRules) = unzip $ preprocess $ cfgToCFRules s
|
||||
preprocess = removeLeftRecursion origStart
|
||||
preprocess = mergeIdentical
|
||||
. removeLeftRecursion origStart
|
||||
. fix (topDownFilter origStart . bottomUpFilter)
|
||||
. removeCycles
|
||||
names = mkCatNames name cats
|
||||
|
||||
Reference in New Issue
Block a user