ction convertReferenceWords(referenceText, referenceWords) {
            const dictionary = [...new Set(referenceWords)];
            const maxLength = Math.max(...dictionary.map(word => word.length));

            // From left to right to do the longest matching to get the word segmentation
            function leftToRightSegmentation(text, dictionary) {
                var result = [];
                while (text.length > 0) {
                    let subText = "";
                    // If the length of t