architxt.forest#

Functions

export_forest_to_jsonl(path, forest)

Export a forest of Tree objects to a JSONL file.

import_forest_from_jsonl(path)

Import a forest of Tree objects from a JSONL file.

architxt.forest.export_forest_to_jsonl(path, forest)[source]#

Export a forest of Tree objects to a JSONL file.

Parameters:
  • path (Path) – Path to the output JSONL file.

  • forest (Iterable[Tree]) – Iterable of Tree objects to export.

Return type:

None

architxt.forest.import_forest_from_jsonl(path)[source]#

Import a forest of Tree objects from a JSONL file.

Parameters:

path (Path) – Path to the input JSONL file.

Yield:

Tree objects.

Return type:

Generator[Tree, None, None]