Skip to content

Licodeao/calculate-cn-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

calculate-cn-node

A node script that could find chinese string in your project

Usage

  1. Use npm install

  2. Use node index.js <The file or directory you want> <output file> <avoid files> command

    // example
    node index.js src output.csv assets images
  3. If you use correctly,you could get a result as following:

    image-20230709001601231

  4. Happy hacking

Tip

The index.js file must be located in the root directory of your project.

or, you could configure the command to adjust dynamically.

The same time, files you want to avoid must also be located in the the file or directory you want.

Note

The disadvantage of this script is that it cannot make Chinese text form a word. If you want to solve this problem, maybe search about nodejieba registry etc.

These problems above are resolved,by using segmentregistry.

If you want to look up it,click here

Todo

  • Consider multiple annotations
  • Optimize word segmentation ability
  • Optimize the code to solve the problem of using too much memory
  • Add avoid files feature

About

A node script that could find chinese string in your project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published