Crate ptb_reader

Source

Enums§

PTBTree
Arbitrarily wide recursive trees of String.

Functions§

parse_ptb_dir
Parse any directory containing *.mrg files.
parse_ptb_file
Parse a PTB file.
parse_ptb_sample_dir
Parse the free PTB sample files (wsj_0001.mrg to wsj_0199.mrg).
parse_ptb_sections
Parse {mergeddir}/{section}/*.mrg files.
parse_ptbtree
Parse a single tree.
parse_ptbtrees
Parse a string of multiple trees.
parse_spmrl_ptb_file
Parse a 1-per-line PTB file (SPMRL file format) (single-bracketed possible), removing morph tags on non-terminals and replacing underscores with — in NTs! If remove_after_dash is set to True, it will even remove everything after a dash (this is applied before the underscore-replacing, of course).