Switch binary name to cmc-tagger
Change-Id: I3c85b6f1882eb2af03b62cd58d9538a38f5e247c
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b6cdfc6..ba0bd50 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,27 +38,27 @@
- name: Upload Linux binary
uses: actions/upload-artifact@v4
with:
- name: conllu2cmc-linux-x64
- path: bin/linux/conllu2cmc
+ name: cmc-tagger-linux-x64
+ path: bin/linux/cmc-tagger
if-no-files-found: error
- name: Upload macOS binary
uses: actions/upload-artifact@v4
with:
- name: conllu2cmc-macos-x64
- path: bin/macos/conllu2cmc
+ name: cmc-tagger-macos-x64
+ path: bin/macos/cmc-tagger
if-no-files-found: error
- name: Upload Windows binary
uses: actions/upload-artifact@v4
with:
- name: conllu2cmc-win-x64
- path: bin/win/conllu2cmc.exe
+ name: cmc-tagger-win-x64
+ path: bin/win/cmc-tagger.exe
if-no-files-found: error
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
- bin/linux/conllu2cmc
- bin/macos/conllu2cmc
- bin/win/conllu2cmc.exe
+ bin/linux/cmc-tagger
+ bin/macos/cmc-tagger
+ bin/win/cmc-tagger.exe
generate_release_notes: true
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 25b28c3..97bebd3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -108,9 +108,9 @@
- npm run pkg-macos
- npm run pkg-win
artifacts:
- name: "conllu2cmc-${CI_COMMIT_REF_SLUG}"
+ name: "cmc-tagger-${CI_COMMIT_REF_SLUG}"
paths:
- - bin/linux/conllu2cmc
- - bin/macos/conllu2cmc
- - bin/win/conllu2cmc.exe
+ - bin/linux/cmc-tagger
+ - bin/macos/cmc-tagger
+ - bin/win/cmc-tagger.exe
expire_in: 4 weeks
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 045a16a..6ffaed2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
### Added
- Hashtag tagging with the `HST` tag.
+- The npm CLI is also exposed under the alias `cmc-tagger`.
- CLI version output via `-V` / `--version`.
- Regression tests for hashtag tagging and `ADR` tagging behavior.
- Expanded documentation covering the tagset, CoNLL-U output examples, limitations, performance, and application contexts.
@@ -15,6 +16,7 @@
- `ADR` is now emitted whenever a token matches the `@`-address pattern, regardless of existing POS values in the input.
- Purely numeric tokens such as `#10` are no longer tagged as `HST`; hashtags must contain at least one Unicode letter.
+- Standalone `pkg` builds and release artifacts are now emitted as `cmc-tagger` / `cmc-tagger.exe` instead of `conllu2cmc`.
- Test tooling was updated by upgrading Jest from `^29.7.0` to `^30.3.0`; `.gitlab-ci-local` is now ignored during Jest module discovery to avoid local naming collisions.
- Documentation examples were revised and anonymized for public release.
diff --git a/Readme.md b/Readme.md
index 1aff8f2..c03e265 100644
--- a/Readme.md
+++ b/Readme.md
@@ -65,28 +65,33 @@
## Local Usage
+The npm package exposes the CLI under both `conllu-cmc` and `cmc-tagger`.
+
### Using npm/node
```shell
-cat ./test/data/ndy.conllu | npx conllu2cmc
+cat ./test/data/ndy.conllu | npx conllu-cmc
# Show version
-npx conllu2cmc -V
+npx conllu-cmc -V
+
+# Alternative CLI name
+npm exec --yes --package=. cmc-tagger -- -V
```
### Using standalone binary
```shell
-cat ./test/data/ndy.conllu | ./bin/linux/conllu2cmc
+cat ./test/data/ndy.conllu | ./bin/linux/cmc-tagger
# Show version
-./bin/linux/conllu2cmc -V
+./bin/linux/cmc-tagger -V
```
### Generate KorAP-XML zip with CMC annotations
```shell
-korapxml2conllu kyc.zip | conllu2cmc -s | conllu2korapxml > kyc.cmc.zip
+korapxml2conllu kyc.zip | cmc-tagger -s | conllu2korapxml > kyc.cmc.zip
```
## Docker Usage
@@ -139,9 +144,9 @@
Download pre-built executables from the [Releases](https://github.com/KorAP/KorAP-CoNLL-U-CMC/releases) page:
-- `conllu2cmc` - Linux x64
-- `conllu2cmc` - macOS x64
-- `conllu2cmc.exe` - Windows x64
+- `cmc-tagger` - Linux x64
+- `cmc-tagger` - macOS x64
+- `cmc-tagger.exe` - Windows x64
### npm
@@ -167,7 +172,7 @@
npm run pkg-win # Windows x64
```
-Executables are created in `bin/linux/`, `bin/macos/`, and `bin/win/`.
+Executables are created as `cmc-tagger` or `cmc-tagger.exe` in `bin/linux/`, `bin/macos/`, and `bin/win/`.
### Docker
diff --git a/package-lock.json b/package-lock.json
index 419bb4f..08e36d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,6 +14,7 @@
"emoji-regex": "^10.3.0"
},
"bin": {
+ "cmc-tagger": "src/index.js",
"conllu-cmc": "src/index.js"
},
"devDependencies": {
diff --git a/package.json b/package.json
index cfc7b3d..95f8957 100644
--- a/package.json
+++ b/package.json
@@ -4,12 +4,13 @@
"description": "Reads CoNLL-U format from stdin and annotates emojis, emoticons, hashtags, URLs, email addresses, @addresses, and action words. Writes CoNLL-U format to stdout.",
"main": "src/index.js",
"bin": {
- "conllu-cmc": "src/index.js"
+ "conllu-cmc": "src/index.js",
+ "cmc-tagger": "src/index.js"
},
"scripts": {
- "pkg-linux": "pkg src/index.js --public -t node22-linux-x64 -o bin/linux/conllu2cmc && chmod +x bin/linux/conllu2cmc",
- "pkg-macos": "pkg src/index.js --public -t node22-macos-x64 -o bin/macos/conllu2cmc",
- "pkg-win": "pkg src/index.js --public -t node22-win-x64 -o bin/win/conllu2cmc",
+ "pkg-linux": "rm -f bin/linux/conllu2cmc && pkg src/index.js --public -t node22-linux-x64 -o bin/linux/cmc-tagger && chmod +x bin/linux/cmc-tagger",
+ "pkg-macos": "rm -f bin/macos/conllu2cmc && pkg src/index.js --public -t node22-macos-x64 -o bin/macos/cmc-tagger",
+ "pkg-win": "rm -f bin/win/conllu2cmc.exe && pkg src/index.js --public -t node22-win-x64 -o bin/win/cmc-tagger.exe",
"pkg-all": "npm run pkg-linux && npm run pkg-macos && npm run pkg-win",
"pkg": "pkg",
"test": "jest",
diff --git a/src/index.js b/src/index.js
index 348a9a7..1417f4d 100755
--- a/src/index.js
+++ b/src/index.js
@@ -46,7 +46,7 @@
},
{
header: 'Synopsis',
- content: '$ conllu-cmc [-s] < input.conllu > output.conllu\n$ conllu-cmc -V'
+ content: '$ conllu-cmc [-s] < input.conllu > output.conllu\n$ cmc-tagger [-s] < input.conllu > output.conllu\n$ conllu-cmc -V\n$ cmc-tagger -V'
},
{
header: 'Options',
diff --git a/test/test.js b/test/test.js
index fbf38e1..e5e3f68 100644
--- a/test/test.js
+++ b/test/test.js
@@ -53,6 +53,14 @@
done();
});
+ test('Test cmc-tagger alias', (done) => {
+ const stdout = execSync('npm exec --yes --package=. cmc-tagger -- -V').toString().trim();
+ const versionLine = stdout.split('\n').pop().trim();
+
+ expect(versionLine).toBe(packageVersion);
+ done();
+ });
+
test('Regression test for hashtags: emit HST', (done) => {
const testInput = [
'# foundry = base',