egment the text with the dictionary")
                    if (leftToRight.length < rightToLeft.length) {
                        return leftToRight;
                    } else if (leftToRight.length > rightToLeft.length) {
                        return rightToLeft;
                    } else {
                        // If the word number is the same, then return the one with the smallest single word
                        const leftToRightSingle = leftToRight.filter(word => word.length === 1).length;
   