def get_line(self, text, on_unicode_error='strict'):
        """
        Split a line of text into words and labels. Labels must start with
        the prefix used to create the model (__label__ by default).
        """

        def check(entry):
            if entry.find('\n') != -1:
                raise ValueError(
                    "get_line processes one line at a time (remove \'\\n\')"
                )
            entry += "\n"
            return entry

        if type(text) == list:
            text = [check(entry) for entry in text]
            return self.f.multilineGetLine(text, on_unicode_error)
        else:
            text = check(text)
            return self.f.getLine(text, on_unicode_error)
def get_line ( self , text , on_unicode_error = 'strict' ) : def check ( entry ) : if entry . find ( '\n' ) != - 1 : raise ValueError ( "get_line processes one line at a time (remove \'\\n\')" ) entry += "\n" return entry if type ( text ) == list : text = [ check ( entry ) for entry in text ] return self . f . multilineGetLine ( text , on_unicode_error ) else : text = check ( text ) return self . f . getLine ( text , on_unicode_error )
Split a line of text into words and labels. Labels must start with
        the prefix used to create the model (__label__ by default).