sentimentdemo
AI BOM example. A simple sentiment analysis application, published solely as an artifact for the purpose of demonstrating a software bill of materials. Not recommended for any serious text classification task.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Repository
AI BOM example. A simple sentiment analysis application, published solely as an artifact for the purpose of demonstrating a software bill of materials. Not recommended for any serious text classification task.
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
SPDX-FileContributor: Arthit Suriyawongkul SPDX-FileCopyrightText: 2024-present Arthit Suriyawongkul suriyawa@tcd.ie SPDX-FileType: DOCUMENTATION
SPDX-License-Identifier: CC0-1.0
Sentiment Demo: A Simple AI Application and its AI BOM Example
A simple text classification application, published solely to demonstrate a software bill of materials (SBOM) in SPDX 3.0 format.
The main content of the package is its software bill of materials at bom.spdx3.json. Other files are given just to complete the illustration.
Not recommended for actual text classification tasks.
SBOM demonstration design goals:
- Comprehensible: Small enough for a human to understand easily.
- Informative: Elaborate enough to showcase the use of various information fields within an SBOM.
- Testable: Designed to facilitate testing and evaluation against specific use case requirements.
Since May 2025, this AI SBOM example is accepted to the *SPDX Examples** repository,* as ai/example02.
For more information about implementing AI BOM using SPDX specification, see Karen Bennet, Gopi Krishnan Rajbahadur, Arthit Suriyawongkul, and Kate Stewart, “Implementing AI Bill of Materials (AI BOM) with SPDX 3.0: A Comprehensive Guide to Creating AI and Dataset Bill of Materials”, The Linux Foundation, October 2024.
Content
text
.
├── LICENSE License information
├── README.md This README file
├── bom.spdx3.json Software bill of materials, in SPDX 3 format
├── data Dataset, preprocessed and tokenized
│ ├── test.txt Testing data
│ ├── train.txt Training data
│ └── valid.txt Validation data
├── model.bin A sentiment analysis model
├── rawdata Raw dataset, before preprocessing
│ ├── test Testing data
│ │ ├── neg.txt Testing samples for label "neg" (negative)
│ │ ├── neu.txt Testing samples for label "neu" (neutral)
│ │ ├── pos.txt Testing samples for label "pos" (positive)
│ │ └── q.txt Testing samples for label "q" (question)
│ ├── train Training data
│ │ └── ...
│ └── valid Validation data
│ └── ...
├── requirements.txt List of required Python libraries
├── src
│ ├── evaluate.py A script to evaluate prediction performance
│ ├── predict.py A script to predict a label of a text
│ ├── preprocess.py A script to prepare training data
│ └── train.py A script to build a model
└── techdocs Technical documentation
├── dataprepare.md Data preparation
└── instructions.md Instruction for use
Usage
See instruction for use for how to use the application.
Data preparation
See data preparation.
Notes
- Development is in the
mainbranch. - Will eventually be submitted to spdx/spdx-examples repo.
- The diagram is generated from a PlantUML file: bom.spdx.puml. The PlantUML file is generated by spdx3ToGraph. To brevity, spdxIds and long strings are shortened by the shortenid.sh script in tools/, and all but one hyperparameter have been manually removed.
- The energy used by the computer during model training is tracked by energy-tracker. It measures how much energy the computer uses during the training. This means the actual energy used for training the model might be a bit less than the reported amount.
- The SPDX 3.0.1 SBOM is validated structurally against the JSON Schema at https://spdx.org/schema/3.0.1/spdx-json-schema.json and semantically against the SHACL model at https://spdx.org/rdf/3.0.1/spdx-model.ttl.
- Next steps:
- Add external dependency relationships
(e.g.
dependsOn,hasProvidedDependency) - Get tested with an SBOM quality check tool like sbomsq (once it supports SPDX 3.0).
- Using information requirements and obligations in the EU AI Act as a target, labeling all relevant properties and relationships with corresponding difficulty levels and support levels, based on the BOM Maturity Model.
- Add external dependency relationships
(e.g.
Licenses
Apart from the data and components listed in the table below, the code and content in this repository are dedicated to the public domain under the terms of Creative Commons Zero ("CC0") 1.0 Universal, which have no copyright and related or neighboring rights worldwide to the extent allowed by law.
| Component | Name | License | Notes |
| --------- | ---- | ------- | ----- |
| Training data | Wisesight Sentiment Corpus | Creative Commons Zero v1.0 Universal | Samples from the corpus are in rawdata/. Preprocessed data is in data/. See data preparation for details. |
| Text preprocessor | th-simple-preprocessor | Apache License 2.0 | |
| Word tokenizer | newmm-tokenizer | Apache License 2.0 | Inherited the license from PyThaiNLP. |
| Text classifier | fastText | MIT License | |
| Array package | NumPy | BSD License | |
The specific version information can be found in requirements.txt.
Citation
If you use this software, including its software bill of materials (SBOM), please cite it as follows:
Suriyawongkul, Arthit. “Sentiment Demo: A Simple AI Application and Its AI BOM Example”. Zenodo, 8 November 2024. https://doi.org/10.5281/zenodo.14055332.
BibTeX:
bibtex
@software{Suriyawongkul_Sentiment_Demo_A_2024,
author = {Suriyawongkul, Arthit},
doi = {10.5281/zenodo.14055332},
license = {CC0-1.0},
month = nov,
title = {{Sentiment Demo: A Simple AI Application and its AI BOM Example}},
url = {https://github.com/bact/sentimentdemo/},
version = {0.1},
year = {2024}
}
Owner
- Name: Arthit Suriyawongkul
- Login: bact
- Kind: user
- Location: Dublin and Bangkok
- Company: ADAPT Centre
- Website: https://bact.cc
- Twitter: bact
- Repositories: 138
- Profile: https://github.com/bact
Digital rights and civic tech at @thainetizen and @mekongict. Now doing PhD in AI ethics and data governance at Trinity College Dublin.
Citation (CITATION.cff)
cff-version: "1.2.0"
title: "Sentiment Demo: A Simple AI Application and its AI BOM Example"
message: >-
If you use this software, please cite it using these
metadata.
type: software
authors:
- family-names: Suriyawongkul
given-names: Arthit
orcid: "https://orcid.org/0000-0002-9698-1899"
repository-code: "https://github.com/bact/sentimentdemo/"
repository: "https://github.com/bact/sentimentdemo/"
url: "https://github.com/bact/sentimentdemo/"
abstract: "A simple sentiment analysis application, published solely as an artifact for the purpose of demonstrating a software bill of materials. Not recommended for critical text classification tasks."
keywords:
- "natural language processing"
- Python
- "text processing"
- "text classification"
- "sentiment analysis"
- "software bill of materials"
- "software traceability"
- "artificial intelligence"
- "machine learning"
- "SPDX"
- "AI BOM"
identifiers:
- description: This is the collection of archived snapshots of all versions of the software.
type: doi
value: "10.5281/zenodo.14055332"
- description: This is the archived snapshot of version 0.1 of the software.
type: doi
value: "10.5281/zenodo.14055333"
license: CC0-1.0
version: "0.1"
date-released: "2024-11-08"
GitHub Events
Total
- Create event: 7
- Release event: 1
- Issues event: 1
- Watch event: 2
- Delete event: 8
- Push event: 28
- Pull request event: 15
Last Year
- Create event: 7
- Release event: 1
- Issues event: 1
- Watch event: 2
- Delete event: 8
- Push event: 28
- Pull request event: 15
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 1
- Total pull requests: 12
- Average time to close issues: 3 months
- Average time to close pull requests: 5 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 12
- Average time to close issues: N/A
- Average time to close pull requests: 5 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bact (1)
Pull Request Authors
- bact (18)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- fasttext ==0.9.3
- newmm-tokenizer ==0.2.2
- numpy ==1.26.4
- th-simple-preprocessor ==0.10.1
- actions/checkout v4 composite
- actions/setup-python v3 composite
- pytest ==8.2.2
- scikit-learn ==1.5.0
