Package featuregenerator :: Package parser :: Package berkeley :: Module cfgrules
[hide private]
[frames] | no frames]

Module cfgrules

source code

Created on Jul 13, 2014


Author: Eleftherios Avramidis

Classes [hide private]
  Rule
  CfgRulesExtractor
Handle the extraction of features out of CFG rules
Functions [hide private]
str
get_cfg_rules(string, terminals=False)
Parse the bracketed format from a Berkley PCFG parse and extract the CFG rules included
source code
Variables [hide private]
  __package__ = 'featuregenerator.parser.berkeley'
Function Details [hide private]

get_cfg_rules(string, terminals=False)

source code 

Parse the bracketed format from a Berkley PCFG parse and extract the CFG rules included

Parameters:
  • string (str) - the parse in a bracketed format
Returns: str
the CFG rules