joshdk / licensor Goto Github PK
View Code? Open in Web Editor NEW๐ Detect what license a project is distributed under
License: MIT License
๐ Detect what license a project is distributed under
License: MIT License
Many projects use an abbreviated form of certain licenses (specifically Apache 2.0). Add additional (non-SPDX?) examples for training/classification.
The goal is to classify licenses correctly, not enforce the license body perfectionism.
It is nice to have spdx.License.JenValue()
for locality reasons, but it's ugly to have in the public API. Consider moving this helper somewhere, as the spdx.License
struct won't change very often.
Using regex to split on whitespace is slow. Write benchmarks for current implementation and then optimize. Possible optimizations:
map[[]byte]struct{}
instead of map[string]struct{}
go generate
timeRaw data currently pollutes the SPDX namespace, specifically, with auto-generated package comments. Move it into an internal sub-package.
license
`- spdx
`- internal
`- index
|- mit.gen.go
|- apache.gen.go
`- bsd.gen.go
Given an arbitrary license body, attempt to extract something that looks like a copyright notice, for attribution purposes.
Importing the project as license
often conflicts during usage. Consider:
licenses := license.All()
for _, license := range licenses { // Oops, can't do that
...
}
``
Other libraries do this. Given the root directory of some project, look for files that look like LICENSE
, LICENSE.txt
, COPYING.txt
, etc.
Would make more sense for this to be local to the module it's generating, and not at project top-level.
Explore alternate text comparison methods. Benchmark different methods. Possible optimizations include:
[{;:#+
etc)Current index file is sufficiently large that Github refuses to display it (not counting raw mode). Split this file into multiple files for clarity. May also speed up incremental compilation? Benchmark the resulting increase in init()
functions.
For example; If you only consider matches with > 0.9 confidence as "acceptable", you probably don't need to compare additional licenses after finding the first that meets the confidence bar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.