janus.metrics.splitting#

Attributes#

Functions#

register_splitting_method([name])

Registers a pairing method for splitting strings in files

split_by_file(src, **kwargs)

Split the source text by file

Module Contents#

janus.metrics.splitting.SPLITTING_METHODS: dict[str, Callable[[str, str], list[str]]]#
janus.metrics.splitting.register_splitting_method(name=None)#

Registers a pairing method for splitting strings in files

Parameters:
  • name (None | str) – The name of the splitting method. If None, the function name is used.

  • help – The help text for the pairing method.

Returns:

The decorator function.

Return type:

Callable[[Callable], Callable]

janus.metrics.splitting.split_by_file(src, **kwargs)#

Split the source text by file

Parameters:

src (str) – The source text.

Returns:

A list of strings.

Return type:

list[str]