Normalise le couple sinogramme/piyin dans un corpus documentaire
- JavaScript 100%
| bin | ||
| data | ||
| src | ||
| package.json | ||
| README.md | ||
@gongfucha/pinyin-qa
QA and autofix tools for canonical pinyin and hanzi usage.
Installation
npm install git+ssh://forgejo@git.kouzheran.fr:10068/gongfucha/npm_pinyin-qa.git#v0.1.0
CLI
pinyin-check src
pinyin-fix src
If no target directory is provided, the default is src.
Project usage
{
"scripts": {
"check:pinyin": "pinyin-check src",
"fix:pinyin": "pinyin-fix src"
}
}
API
import { createPinyinQa, loadDefaultLexicon } from "@gongfucha/pinyin-qa";
const lexiconEntries = await loadDefaultLexicon();
const qa = createPinyinQa({
rootDir: process.cwd(),
lexiconEntries,
});
const findings = await qa.collectFindings("./src");
const result = await qa.fixTarget("./src");