Categorygithub.com/pulumi/licenseclassifier
modulepackage
2.0.1+incompatible
Repository: https://github.com/pulumi/licenseclassifier.git
Documentation: pkg.go.dev

# README

License Classifier

This is a fork of github.com/google/licenseclassifier

It has been updated to appropriately detect BUSL license texts that are actively in use.

Only the v2 version has been updated. v1 has been marked as deprecated.

# Packages

Package commentparser does a basic parse over a source file and returns all of the comments from the code.
No description provided by the author
Package serializer normalizes the license text and calculates the hash values for all substrings in the license.
Package stringclassifier finds the nearest match between a string and a set of known values.
No description provided by the author

# Functions

Archive is an OptionFunc to specify the location of the license archive file.
ArchiveBytes is an OptionFunc that provides the contents of the license archive file.
ArchiveFunc is an OptionFunc that provides a function that must return the contents of the license archive file.
CopyrightHolder finds a copyright notification, if it exists, and returns the copyright holder.
LicenseType returns the type the license has.
New creates a license classifier and pre-loads it with known open source licenses.
NewWithForbiddenLicenses creates a license classifier and pre-loads it with known open source licenses which are forbidden.
NormalizeEquivalentWords normalizes equivalent words that are interchangeable.
NormalizePunctuation takes all hyphens and quotes and normalizes them.
RemoveNonWords removes non-words from the string.
TrimExtraneousTrailingText removes text after an obvious end of the license and does not include substantive text of the license.

# Constants

The names come from the https://spdx.org/licenses website, and are also the filenames of the licenses in licenseclassifier/licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
DefaultConfidenceThreshold is the minimum confidence percentage we're willing to accept in order to say that a match is good.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
ForbiddenLicenseArchive is the name of the archive containing preprocessed forbidden license texts only.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
LicenseArchive is the name of the archive containing preprocessed license texts.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.
Canonical names of the licenses.

# Variables

LicenseTypes is a set of the types of licenses Google recognizes.
Normalizers is a list of functions that get applied to the strings before they are registered with the string classifier.
ReadLicenseDir reads directory containing the license files.
ReadLicenseFile locates and reads the license archive file.

# Structs

License is a classifier pre-loaded with known open source licenses.

# Type aliases

OptionFunc set options on a License struct.