Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当两个关键词有重叠,匹配失败 #207

Open
641500461 opened this issue Mar 13, 2024 · 1 comment
Open

当两个关键词有重叠,匹配失败 #207

641500461 opened this issue Mar 13, 2024 · 1 comment

Comments

@641500461
Copy link

641500461 commented Mar 13, 2024

const { Mint } = require('mint-filter')
const mint = new Mint(['pflt', 'dividend payout pflt abc']);
const result = mint.filter('ratio dividend payout pflt');
console.log(result);
// { words: [], text: 'ratio dividend payout pflt' }

关键词数组中有重叠的部分,且需要匹配的文案与第二个关键词部分匹配,预期应该是匹配成功第一个关键词“pflt”,但结果匹配失败

@xiaobaidadada
Copy link

const { Mint } = require('mint-filter')
const mint = new Mint(['pflt', 'dividend payout pflt abc']);
const result = mint.filter('ratio dividend payout pflt');
console.log(result);
// { words: [], text: 'ratio dividend payout pflt' }

关键词数组中有重叠的部分,且需要匹配的文案与第二个关键词部分匹配,预期应该是匹配成功第一个关键词“pflt”,但结果匹配失败

作者最近好像上github比较少,试试这个,只能用于node环境 https://www.npmjs.com/package/node-word-detection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants