def build_parser(options): parser_option = options.parser if len(PARSERS) > 1 else "camxes-ilmen" if parser_option == 'camxes-ilmen': from parsers import camxes_ilmen return camxes_ilmen.Parser(options.rule) else: bad_parser()
def process_input(input_json): input_specs = input_json["specs"] parser = camxes_ilmen.Parser() json_transformer = camxes_json.Transformer() morph_transformer = camxes_morphology.Transformer() return [ process_spec(spec, parser, json_transformer, morph_transformer) \ for spec in input_specs ]
def process_input(input_json): input_specs = input_json["specs"] parser = camxes_ilmen.Parser() transformer = node_coverage.Transformer(parser) for spec in input_specs: if spec["out"] != "ERROR": parsed = parser.parse(spec["txt"]) transformer.visit(parsed) return transformer.visits()
def __init__(self, client): super(Dispatcher, self).__init__(client) self.parser = camxes_ilmen.Parser('vlatai') self.transformer = vlatai.Transformer()