alex.components.nlg.tectotpl.block.write package

Submodules

alex.components.nlg.tectotpl.block.write.basewriter module

class alex.components.nlg.tectotpl.block.write.basewriter.BaseWriter(scenario, args)[source]

Bases: alex.components.nlg.tectotpl.core.block.Block

Base block for output writing.

get_output_file_name(doc)[source]

Create an output file name for the given document.

alex.components.nlg.tectotpl.block.write.yaml module

class alex.components.nlg.tectotpl.block.write.yaml.YAML(scenario, args)[source]

Bases: alex.components.nlg.tectotpl.block.write.basewriter.BaseWriter

default_extension = u'.yaml'
process_document(doc)[source]

Write a YAML document

serialize_bundle(bundle)[source]

Serialize a bundle to a list.

serialize_node(node, add_parent_id)[source]

Serialize a node to a hash; using the correct attributes for the tree type given. Add the node parent’s id if needed.

serialize_tree(root)[source]
serialize_zone(zone)[source]

Serialize a zone into a hash

Module contents