from enum import Enum
from lexos.receivers.base_receiver import BaseReceiver


class TokenizerTableOrientation(Enum):
    FILE_ROW = "fileRow"
    FILE_COLUMN = "fileColumn"


class TokenizerReceiver(BaseReceiver):
    """Get the tokenizer table orientation from front end."""

    def __init__(self):
        super().__init__()

    def options_from_front_end(self) -> TokenizerTableOrientation:
        """Get the tokenizer orientation from front end.

        :return: a TokenizerTableOrientation object that holds the orientation.
        """
        if self._front_end_data["tableOrientation"] == "fileRow":
            return TokenizerTableOrientation.FILE_ROW
        elif self._front_end_data["tableOrientation"] == "fileColumn":
            return TokenizerTableOrientation.FILE_COLUMN
        else:
            raise ValueError("Invalid tokenizer orientation from front end.")

@@ -1,12 +1,65 @@
+%22%22%22This is the receiver for the tokenizer model.%22%22%22%0A%0A
 from enum im
@@ -164,16 +164,79 @@
 (Enum):%0A
+    %22%22%22The typed tuple to hold tokenizer front end option.%22%22%22%0A%0A
     FILE
@@ -383,24 +383,24 @@
 nt end.%22%22%22%0A%0A
-
     def __in
@@ -411,16 +411,52 @@
 (self):%0A
+        %22%22%22Initialize the class.%22%22%22%0A
         

add documentation for receiver