Sorry about asking similar questions again and again, however my code still don’t work as my expection
my code is here
const source: LexicalModelSource = {
format: ‘trie-1.0’,
wordBreaker: {
use: ‘default’, // we want to use the default word breaker, BUT!
// CUSTOMIZE THIS:
joinWordsAt: [’ ', ‘-’], // join words that contain hyphens
}
sources: [‘wordlist.tsv’],
languageUsesCasing: true,
searchTermToKey: function(term, applyCasing) {
return Array.from(term)
.map(function(c) { return applyCasing(‘lower’, c) };
}
};
export default source;
as you can see I set joinWordsAt: [’ ', ‘-’],
However it seems that only the hyphen part it works, the space it still does not work
Can someone tell me why and solve the issue?
1 post - 1 participant