concepts.language.neural_ccg.grammar.parse_linearization_string#

parse_linearization_string(string)[source]#

Parse a linearization string (e.g., /0\1) into a list of tuples.

Parameters:

string (str) – the linearization string.

Returns:

A list of tuples, each tuple is a pair of (index, direction).

Return type:

List[LinearizationTuple]