from typing import Union, List


class InputExample:
    """
    Structure for one input example with texts, the label and a unique id
    """
    def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], label: Union[int, float] = None):
        """
        Creates one InputExample with the given texts, guid and label

        str.strip() is called on both texts.

        :param guid
            id for the example
        :param texts
            the texts for the example
        :param label
            the label for the example
        """
        self.guid = guid
        self.texts = [text.strip() if isinstance(text, str) else text for text in texts]
        self.label = label

    def __str__(self):
        return "<InputExample> label: {}, texts: {}".format(str(self.label), "; ".join(self.texts))
@@ -182,22 +182,16 @@
  texts: 
-Union%5B
 List%5Bstr
@@ -191,18 +191,47 @@
 ist%5Bstr%5D
-,
  
+= None, texts_tokenized: List%5B
 List%5Bint
@@ -239,10 +239,12 @@
 %5D = 
-%5B%5D
+None
 , la
@@ -506,32 +506,175 @@
 for the example%0A
+        :param texts_tokenized%0A            Optional: Texts that are already tokenized. If texts_tokenized is passed, texts must not be passed.%0A
         :param l
@@ -792,61 +792,105 @@
 p() 
-if isinstance(text, str) else text for text in texts%5D
+for text in texts%5D if texts is not None else texts%0A        self.texts_tokenized = texts_tokenized
 %0A   

Add field for pre-tokenized texts