README
sjml-validate usage guide
1. Install node.js (prerequisite)
1-1 On windows
1) Download LTS version installer
- Download Link: https://nodejs.org
2) Install via the installer
3) Verify installation
node -v
npm -v
1-2 On linux
1) Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
2) Restart terminal
3) Install node LTS version
nvm install --lts
4) Verify installation
node -v
npm -v
2. Install sjml-validate
npm install sjml-validate -g
3. Usage
sjmlv <options> // run validator
sjmlc <options> // run converter
3.1 Validator
Validator Options
option | description |
---|---|
-s, --schema <schema_type > | set a schema type (required) |
-i, --input <dir_path > | set an input dir path: read files recursively (required) |
-e, --ext [extention_name ] | set an extention name of target input files (optional) (default: sjml) |
-o, --output [dir_path ] | set an output dir path (optional) (default: ./output/) |
-w, --withEsc | run with escaping: available with SERW, EXRW (optional) (default: without escaping) |
-h, --help | output usage information |
Validator Schema Type
type | description |
---|---|
WXRW | 원시 검증: 문어(상상, 정보, 기타) |
WCRW | 원시 검증: 문어(잡지) |
NXRW | 원시 검증: 신문 |
EXRW | 원시 검증: 웹 |
SXRW | 원시 검증: 구어(공적독백, 공적대화) |
SDRW | 원시 검증: 구어(일상대화) |
SERW | 원시 검증: 준구어(대본) |
MXRW | 원시 검증: 메신저대화 |
3.2 Converter
Converter Options
option | description |
---|---|
-s, --schema <schema_type > | set a schema type (required) |
-i, --input <dir_path > | set an input dir path: read files recursively (required) |
-e, --ext [extention_name ] | set an extention name of target input files (optional) (default: sjml) |
-o, --output [dir_path ] | set an output dir path (optional) (default: ./output/) |
-h, --help | output usage information |
Converter Schema Type
type | description |
---|---|
WXRW | 원문->원시: 문어(상상, 정보, 기타) |
WCRW | 원문->원시: 문어(잡지) |
NXRW | 원문->원시: 신문 |
4. Examples
sjmlv -s SDRW -i "..\데이터\일상 대화" -e SJML
sjmlv --schema=SDRW --input="..\데이터\일상 대화" --ext=SJML
sjmlv -s EXRW -i ..\데이터\웹 -o ..\output -w
sjmlc -s NXRW -i ..\데이터\신문 -e xml -o ..\output
sjmlc --input=..\데이터\신문 --output=../output --schema=WXRW