Clarify model licensing and cite the AspectBench article
Browse files- CITATION.cff +28 -0
- LICENSE +21 -0
- README.md +43 -1
- scripts/license_policy.py +101 -0
- scripts/prepare_models.py +11 -0
CITATION.cff
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cff-version: 1.2.0
|
| 2 |
+
message: "If you use AspectBench, please cite the accompanying article."
|
| 3 |
+
title: "AspectBench: Document-Level Aspect-Based Sentiment Analysis"
|
| 4 |
+
type: software
|
| 5 |
+
authors:
|
| 6 |
+
- family-names: Chatterjee
|
| 7 |
+
given-names: Nishan
|
| 8 |
+
repository-code: "https://github.com/nishan-chatterjee/aspect-based-sentiment-analysis"
|
| 9 |
+
url: "https://github.com/nishan-chatterjee/aspect-based-sentiment-analysis"
|
| 10 |
+
preferred-citation:
|
| 11 |
+
type: article
|
| 12 |
+
authors:
|
| 13 |
+
- family-names: Chatterjee
|
| 14 |
+
given-names: Nishan
|
| 15 |
+
- family-names: Koloski
|
| 16 |
+
given-names: Boshko
|
| 17 |
+
- family-names: Doucet
|
| 18 |
+
given-names: Antoine
|
| 19 |
+
- family-names: Pollak
|
| 20 |
+
given-names: Senja
|
| 21 |
+
- family-names: Purver
|
| 22 |
+
given-names: Matthew
|
| 23 |
+
journal: "Frontiers in Artificial Intelligence"
|
| 24 |
+
volume: "9"
|
| 25 |
+
year: 2026
|
| 26 |
+
title: "Evaluating Fine-Tuned, Embedding-Based, and Zero-Shot Models for Aspect-Based Sentiment Analysis in South Slavic News"
|
| 27 |
+
doi: "10.3389/frai.2026.1844418"
|
| 28 |
+
url: "https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2026.1844418/abstract"
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2025 nishan
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -4,7 +4,7 @@ tags:
|
|
| 4 |
- aspect-based-sentiment-analysis
|
| 5 |
- south-slavic
|
| 6 |
- text-classification
|
| 7 |
-
license:
|
| 8 |
---
|
| 9 |
|
| 10 |
# AspectBench: reusable document-level ABSA inference
|
|
@@ -18,6 +18,30 @@ Carlo dropout.
|
|
| 18 |
- [Reusable inference toolkit](https://huggingface.co/nishan-chatterjee/aspect-based-sentiment-analysis)
|
| 19 |
- [GitHub repository](https://github.com/nishan-chatterjee/aspect-based-sentiment-analysis)
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
## Input contract
|
| 22 |
|
| 23 |
Every article must mark the target using literal `<aspect>...</aspect>` tags:
|
|
@@ -445,3 +469,21 @@ published only for independently trained variants.
|
|
| 445 |
The public repositories are linked in the table near the top of this card and
|
| 446 |
grouped in the AspectBench model collection. `scripts/download.py` restores the
|
| 447 |
complete repository layout automatically.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- aspect-based-sentiment-analysis
|
| 5 |
- south-slavic
|
| 6 |
- text-classification
|
| 7 |
+
license: mit
|
| 8 |
---
|
| 9 |
|
| 10 |
# AspectBench: reusable document-level ABSA inference
|
|
|
|
| 18 |
- [Reusable inference toolkit](https://huggingface.co/nishan-chatterjee/aspect-based-sentiment-analysis)
|
| 19 |
- [GitHub repository](https://github.com/nishan-chatterjee/aspect-based-sentiment-analysis)
|
| 20 |
|
| 21 |
+
## Licensing
|
| 22 |
+
|
| 23 |
+
This repository contains the shared **MIT-licensed software toolkit**, not the
|
| 24 |
+
fine-tuned weight files. Its license does not grant commercial rights to the
|
| 25 |
+
separately downloaded AspectBench model contributions.
|
| 26 |
+
|
| 27 |
+
The six non-Slavic-specific model families and the HBS BERTić checkpoint
|
| 28 |
+
contributions are [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/):
|
| 29 |
+
noncommercial research and redistribution with attribution are allowed;
|
| 30 |
+
commercial use requires separate permission. Consult each model card and
|
| 31 |
+
`LICENSE` for exact scope and upstream attribution. Third-party base models,
|
| 32 |
+
tokenizers and code retain their own licenses; the frozen BGE-M3 encoder remains
|
| 33 |
+
upstream MIT while the trained AspectBench MLP heads are CC BY-NC 4.0.
|
| 34 |
+
|
| 35 |
+
**Slovenian SloBERTa exception:** upstream EMBEDDIA/SloBERTa is CC BY-SA 4.0,
|
| 36 |
+
which cannot simply be replaced with a noncommercial restriction. Those
|
| 37 |
+
checkpoints are not relabeled CC BY-NC and need rights-holder/legal review to
|
| 38 |
+
resolve the project's intended restriction. See the
|
| 39 |
+
[Slavic-specific model card](https://huggingface.co/nishan-chatterjee/aspectbench-slavic-specific).
|
| 40 |
+
|
| 41 |
+
Noncommercial is about the purpose of use, not academic/company affiliation.
|
| 42 |
+
Dataset access terms are separate. Software remains MIT pending a separate
|
| 43 |
+
licensing decision; earlier grants are not retroactively revoked.
|
| 44 |
+
|
| 45 |
## Input contract
|
| 46 |
|
| 47 |
Every article must mark the target using literal `<aspect>...</aspect>` tags:
|
|
|
|
| 469 |
The public repositories are linked in the table near the top of this card and
|
| 470 |
grouped in the AspectBench model collection. `scripts/download.py` restores the
|
| 471 |
complete repository layout automatically.
|
| 472 |
+
|
| 473 |
+
## Citation
|
| 474 |
+
|
| 475 |
+
Please cite the accompanying article when using AspectBench:
|
| 476 |
+
|
| 477 |
+
```bibtex
|
| 478 |
+
@article{chatterjee2026aspectbench,
|
| 479 |
+
title = {Evaluating Fine-Tuned, Embedding-Based, and Zero-Shot Models for
|
| 480 |
+
Aspect-Based Sentiment Analysis in South Slavic News},
|
| 481 |
+
author = {Chatterjee, Nishan and Koloski, Boshko and Doucet, Antoine and
|
| 482 |
+
Pollak, Senja and Purver, Matthew},
|
| 483 |
+
journal = {Frontiers in Artificial Intelligence},
|
| 484 |
+
volume = {9},
|
| 485 |
+
year = {2026},
|
| 486 |
+
doi = {10.3389/frai.2026.1844418},
|
| 487 |
+
url = {https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2026.1844418/abstract}
|
| 488 |
+
}
|
| 489 |
+
```
|
scripts/license_policy.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Release licensing and citation notices; never relicense upstream assets."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import re
|
| 6 |
+
|
| 7 |
+
from model_registry import MODEL_SPECS
|
| 8 |
+
|
| 9 |
+
ARTICLE_URL = "https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2026.1844418/abstract"
|
| 10 |
+
NC_URL = "https://creativecommons.org/licenses/by-nc/4.0/"
|
| 11 |
+
NC_LEGAL_URL = NC_URL + "legalcode.en"
|
| 12 |
+
BIBTEX = """@article{chatterjee2026aspectbench,
|
| 13 |
+
title = {Evaluating Fine-Tuned, Embedding-Based, and Zero-Shot Models for
|
| 14 |
+
Aspect-Based Sentiment Analysis in South Slavic News},
|
| 15 |
+
author = {Chatterjee, Nishan and Koloski, Boshko and Doucet, Antoine and
|
| 16 |
+
Pollak, Senja and Purver, Matthew},
|
| 17 |
+
journal = {Frontiers in Artificial Intelligence},
|
| 18 |
+
volume = {9},
|
| 19 |
+
year = {2026},
|
| 20 |
+
doi = {10.3389/frai.2026.1844418},
|
| 21 |
+
url = {https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2026.1844418/abstract}
|
| 22 |
+
}"""
|
| 23 |
+
|
| 24 |
+
# Public upstream card metadata inspected 2026-09-16. These are not new grants.
|
| 25 |
+
UPSTREAM_LICENSES = {
|
| 26 |
+
"FacebookAI/xlm-roberta-base": "MIT",
|
| 27 |
+
"markussagen/xlm-roberta-longformer-base-4096": "Apache-2.0",
|
| 28 |
+
"microsoft/mdeberta-v3-base": "MIT",
|
| 29 |
+
"google/mt5-base": "Apache-2.0",
|
| 30 |
+
"classla/bcms-bertic": "Apache-2.0",
|
| 31 |
+
"EMBEDDIA/sloberta": "CC BY-SA 4.0",
|
| 32 |
+
"BAAI/bge-m3": "MIT",
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def model_license_notice(model_name: str) -> str:
|
| 37 |
+
scope = (
|
| 38 |
+
"the HBS BERTić masked and unmasked checkpoint contributions only"
|
| 39 |
+
if model_name == "slavic-specific"
|
| 40 |
+
else "the AspectBench fine-tuned checkpoint contributions / trained heads"
|
| 41 |
+
)
|
| 42 |
+
text = f"""## License
|
| 43 |
+
|
| 44 |
+
Copyright (c) 2026 the AspectBench model contributors.
|
| 45 |
+
|
| 46 |
+
{scope[0].upper() + scope[1:]} are licensed under
|
| 47 |
+
[Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)]({NC_URL}).
|
| 48 |
+
The [official legal code]({NC_LEGAL_URL}) is incorporated by reference.
|
| 49 |
+
Noncommercial research, evaluation, adaptation and redistribution are allowed
|
| 50 |
+
subject to attribution and the license terms. Commercial use is not granted
|
| 51 |
+
under this license; contact the project for separate permission.
|
| 52 |
+
|
| 53 |
+
Noncommercial describes the purpose of a use, not whether its user is a
|
| 54 |
+
university or a company. Academic affiliation does not automatically make a
|
| 55 |
+
commercial project noncommercial. The legal code controls, including its
|
| 56 |
+
exceptions and limitations. The material is provided as-is without warranties.
|
| 57 |
+
|
| 58 |
+
This notice does not relicense third-party base weights, tokenizers, code or
|
| 59 |
+
configuration assets, and does not revoke any rights previously granted.
|
| 60 |
+
AspectBench adapted the listed base models for aspect-based sentiment analysis;
|
| 61 |
+
retain their original attribution and license notices when redistributing.
|
| 62 |
+
"""
|
| 63 |
+
bases = MODEL_SPECS[model_name]["base_model"]
|
| 64 |
+
if isinstance(bases, str):
|
| 65 |
+
bases = {"HBS and Slovenian": bases}
|
| 66 |
+
for language, repo in bases.items():
|
| 67 |
+
text += f"\n- {language}: [{repo}](https://huggingface.co/{repo}) — upstream {UPSTREAM_LICENSES[repo]}."
|
| 68 |
+
if model_name == "slavic-specific":
|
| 69 |
+
text += """
|
| 70 |
+
|
| 71 |
+
**Slovenian SloBERTa exception:** the upstream EMBEDDIA/SloBERTa model is
|
| 72 |
+
CC BY-SA 4.0. No CC BY-NC grant or noncommercial restriction is applied here to
|
| 73 |
+
the Slovenian checkpoints. Its ShareAlike terms cannot simply be replaced with
|
| 74 |
+
CC BY-NC. Their licensing needs rights-holder/legal review before the project
|
| 75 |
+
can promise a noncommercial-only release. Obtain an alternative upstream grant,
|
| 76 |
+
use a compatible base model, or agree to retain ShareAlike (which permits
|
| 77 |
+
commercial use). See the [upstream license](https://creativecommons.org/licenses/by-sa/4.0/legalcode.en).
|
| 78 |
+
"""
|
| 79 |
+
if model_name == "bge-m3-mlp":
|
| 80 |
+
text += "\n\nThe frozen BGE-M3 encoder is downloaded separately and remains upstream MIT; the noncommercial grant covers the trained AspectBench MLP heads.\n"
|
| 81 |
+
return text.strip() + "\n"
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def citation_section() -> str:
|
| 85 |
+
return "## Citation\n\nPlease cite the accompanying article when using AspectBench:\n\n```bibtex\n" + BIBTEX + "\n```\n"
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def decorate_model_card(card: str, model_name: str) -> str:
|
| 89 |
+
"""Add notices to generated cards as well as existing curated cards."""
|
| 90 |
+
metadata = (
|
| 91 |
+
"license: other\nlicense_name: aspectbench-language-specific\nlicense_link: LICENSE"
|
| 92 |
+
if model_name == "slavic-specific"
|
| 93 |
+
else "license: cc-by-nc-4.0"
|
| 94 |
+
)
|
| 95 |
+
card = re.sub(r"^license:.*$", metadata, card, count=1, flags=re.MULTILINE)
|
| 96 |
+
# Insert before first body section, immediately after the model introduction.
|
| 97 |
+
index = card.find("\n## ")
|
| 98 |
+
if index == -1:
|
| 99 |
+
index = len(card)
|
| 100 |
+
card = card[:index].rstrip() + "\n\n" + model_license_notice(model_name) + "\n" + card[index:].lstrip()
|
| 101 |
+
return card.rstrip() + "\n\n" + citation_section()
|
scripts/prepare_models.py
CHANGED
|
@@ -90,6 +90,12 @@ def export_state(source: Path, destination: Path, force: bool) -> dict[str, Any]
|
|
| 90 |
|
| 91 |
|
| 92 |
def family_readme(model_name: str, entries: list[dict[str, Any]]) -> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
spec = MODEL_SPECS[model_name]
|
| 94 |
available = sum(item["available"] for item in entries)
|
| 95 |
rows = []
|
|
@@ -355,6 +361,11 @@ def main() -> None:
|
|
| 355 |
(family_dir / "README.md").write_text(
|
| 356 |
family_readme(model_name, family_entries), encoding="utf-8"
|
| 357 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 358 |
|
| 359 |
manifest["available_slots"] = sum(
|
| 360 |
entry["available"] for entry in manifest["entries"]
|
|
|
|
| 90 |
|
| 91 |
|
| 92 |
def family_readme(model_name: str, entries: list[dict[str, Any]]) -> str:
|
| 93 |
+
from license_policy import decorate_model_card
|
| 94 |
+
|
| 95 |
+
return decorate_model_card(_family_readme(model_name, entries), model_name)
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def _family_readme(model_name: str, entries: list[dict[str, Any]]) -> str:
|
| 99 |
spec = MODEL_SPECS[model_name]
|
| 100 |
available = sum(item["available"] for item in entries)
|
| 101 |
rows = []
|
|
|
|
| 361 |
(family_dir / "README.md").write_text(
|
| 362 |
family_readme(model_name, family_entries), encoding="utf-8"
|
| 363 |
)
|
| 364 |
+
from license_policy import model_license_notice
|
| 365 |
+
|
| 366 |
+
(family_dir / "LICENSE").write_text(
|
| 367 |
+
model_license_notice(model_name), encoding="utf-8"
|
| 368 |
+
)
|
| 369 |
|
| 370 |
manifest["available_slots"] = sum(
|
| 371 |
entry["available"] for entry in manifest["entries"]
|