langtest.datahandler.format.BaseFormatter#
- class BaseFormatter#
Bases:
ABC
Abstract base class for defining formatter classes. Subclasses should implement the static methods to_csv and to_conll.
- __init__()#
Methods
__init__
()to_conll
(custom_type)Converts a custom type to a CoNLL string.
to_csv
(custom_type)Converts a custom type to a CSV string.
- abstract static to_conll(custom_type)#
Converts a custom type to a CoNLL string.
- Parameters:
custom_type – The custom type to convert.
- Returns:
The CoNLL string representation of the custom type.
- Raises:
NotImplementedError – This method should be implemented by the subclass.
- abstract static to_csv(custom_type)#
Converts a custom type to a CSV string.
- Parameters:
custom_type – The custom type to convert.
- Returns:
The CSV string representation of the custom type.
- Raises:
NotImplementedError – This method should be implemented by the subclass.