axa-group / nlp.js

An NLP library for building bots, with entity extraction, sentiment analysis, automatic language identify, and so more
MIT License
6.21k stars 616 forks source link

Hashtag entities not working in Chinese (zh). #191

Open thiefjim opened 5 years ago

thiefjim commented 5 years ago

Describe the bug Hashtag entities not working in Chinese (zh).

To Reproduce

const { NlpManager } = require('node-nlp');
const manager = new NlpManager({ languages: ['zh'] });
let res = await manager.process('zh', '#帥 #handsome')
console.log('Hashtag: ' + JSON.stringify(res.entities));    

Expected behavior The Chinese hashtag '#帥' should be found.

v3.1.1 version result: Hashtag: [{"start":3,"end":11,"len":9,"accuracy":0.95,"sourceText":"#handsome","utteranceText":"#handsome","entity":"hashtag","resolution":{"value":"#handsome"}}]

Screenshots image

Desktop (please complete the following information):

aigloss commented 1 year ago

Hi @thiefjim , could you try with current version?