public function splitText($text, $from = self::LANG_AUTO)
    {
        $splitTextBag = $this->requestSplitText($text, $from);

        $sentences = $splitTextBag->getAllSentences();

        return $sentences;
    }
public function splitText($text, $from = self::LANG_AUTO)
    {
        $splitTextBag = $this->requestSplitText($text, $from);

        $sentences = $splitTextBag->getAllSentences();

        return $sentences;
    }
public function splitText ( $ text , $ from = self :: LANG_AUTO ) { $ splitTextBag = $ this -> requestSplitText ( $ text , $ from ) ; $ sentences = $ splitTextBag -> getAllSentences ( ) ; return $ sentences ; }
Uses the DeepL API to split a text into a string array of sentences.
This method might throw an exception so you should wrap it in a try-catch-block.

@param string|string[] $text The text you want to split into sentences. It can be a single string or string array
@param string          $from Optional: The source language, a self::LANG_<code> constant
@return string[]
@throws \Exception
Uses the DeepL API to split a text into a string array of sentences . This method might throw an exception so you should wrap it in a try - catch - block .