task_categories:text-classification license:mit size_categories:10K<n<100K region:us
---
license: mit
task_categories:
- text-classification
size_categories:
- 10K<n<100K
---

# OSS-License-Terms

## Introduction
We collected 55,183 unique license sentences from 3,238 open-source software (OSS) licenses.  From these, we randomly selected 19,883 sentences (36.03%) for joint annotation of license terms and attitudes, forming our supervised dataset. The remaining 35,300 license sentences constitute our unsupervised dataset. This unsupervised dataset is used exclusively for Domain-Adaptive Pre-Training (DAPT) to enhance the model's domain adaptability.  During the Supervised Fine-Tuning (SFT) stage, we randomly split the 19,883 annotated sentences from the supervised dataset into training, validation, and test sets at a ratio of 7:1:2, comprising 13,919, 1,988, and 3,976 license sentences, respectively.

## Definition of License Terms and Attitudes
License terms refer to the formal and standardized descriptions of software usage conditions, with each term representing a type of action a user (licensee) may perform. We collected 27 common license terms, covering 14 rights and 13 obligations.

We categorize the attitudes expressed in license terms into three types: MUST, CANNOT, and CAN. These represent what a licensee is obligated to do, prohibited from doing, and permitted to do, respectively, when using and distributing software protected by an OSS license.

```python
Terms = {
	'Place Warranty': 'offer warranty protection (or other support), place warranty on the software licensed',
	'Add License Terms': 'provide additional license terms',
	'Add Own Notices': 'add own notices in derivative works',
	'Ask Distribution Fee': 'ask a fee to distribute a copy',
	'Combine Libraries': 'place side by side with a library (that is not an application or covered work)',
	'Copy': 'reproduce the original work in copies',
	'Distribute': 'distribute original or modified derivative works',
	'Modify': 'modify the software and create derivatives',
	'Grant Patents': 'grant rights to use copyrighted patents by the licensor, practice patent claims of contributors to the code',
	'Publicly Display': 'display the original work publicly',
	'Publicly Perform': 'perform the original work publicly',
	'Sublicense': 'incorporate the work into something that has a more restrictive license',
	'Commercial Use': 'use the software for commercial purposes',
	'Private Use': 'use or modify the software freely or privately without distributing it',
	'State Changes': 'state significant changes made to the software, cause modified files to carry prominent notices',
	'Add Statement For Additional Terms': 'place a statement of the additional terms that apply',
	'Retain Copyright Notice': 'retain the copyright notice in all copies or substantial uses of the work.',
	'Include License': 'include the full text of license(license copy) in modified software',
	'Include Notice': 'notice text needs to be distributed (if it exists) with any derivative work',
	'Offer Source Code': 'disclose your source code when you distribute the software and make the source for the library available',
	'Rename': 'the name of the derivative work must differ from original, change software name as to not misrepresent them as the original software',
	'Retain Disclaimer': 'redistributions of source code must retain disclaimer',
	'Use TradeMark': 'use contributor’s name, trademark or logo',
	'Give Credit': 'give explicit credit or acknowledgement to the author with the software',
	'Include Install Instructions': 'include build & install instructions necessary to modify and reinstall the software',
	'Liable for Damages': 'the licensor cannot be held liable for any damages arising from the use of the software',
	'Keep Same License': 'distribute the modified or derived work of the software under the terms and conditions of this license'
}


Attitudes = {"CAN": "Indicates that the licensee can perform the actions, commonly used expressions include: hereby grants to you, you may, you can",
             "CANNOT": "Indicates that the licensee is not allowed to perform the actions, commonly used expressions include: you may not, you can not, without, prohibit, refuse, disallow, decline, against",
             "MUST": "Indicates that the licensee must perform the actions, commonly used expressions include: you must, you should, as long as, shall, provided that, ensure that, ask that, have to"}
```