mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
Move platform-agnostic NLP types, stopwords, POS tag definitions, and text utilities into @openchatlab/core. Move segmenter engine, word frequency computation, and dict manager into @openchatlab/node-runtime. Electron nlp/ becomes a thin re-export layer; server nlp.ts shrinks from ~450 to ~85 lines retaining only HTTP route definitions. Both platforms now share the same NLP implementation via node-runtime. Also fixes createJiebaNlpProvider to use shared getJieba() with disk dict loading (was using empty Jieba instance causing degraded POS tags in language preference analysis), adds ensureDefaultDict at server startup, and adds /_web/nlp/* HTTP routes with window.nlpApi shim.