{"action":"opened","issue":{"url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/80","labels_url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/80/comments","events_url":"https://api.github.com/repos/nexB/scancode-toolkit/issues/80/events","html_url":"https://github.com/nexB/scancode-toolkit/issues/80","id":108454406,"number":80,"title":"When detecting a license report if a full license text, or only a notice or mention was detected","user":{"login":"pombredanne","id":675997,"avatar_url":"https://avatars.githubusercontent.com/u/675997?v=3","gravatar_id":"","url":"https://api.github.com/users/pombredanne","html_url":"https://github.com/pombredanne","followers_url":"https://api.github.com/users/pombredanne/followers","following_url":"https://api.github.com/users/pombredanne/following{/other_user}","gists_url":"https://api.github.com/users/pombredanne/gists{/gist_id}","starred_url":"https://api.github.com/users/pombredanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pombredanne/subscriptions","organizations_url":"https://api.github.com/users/pombredanne/orgs","repos_url":"https://api.github.com/users/pombredanne/repos","events_url":"https://api.github.com/users/pombredanne/events{/privacy}","received_events_url":"https://api.github.com/users/pombredanne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-26T10:30:24Z","updated_at":"2015-09-26T10:30:24Z","closed_at":null,"body":"Knowing if we detected a whole license text, or only a notice or mention is a relevant data to later bring some automated summarization and reasoning on what was detected.\r\n\r\nFor instance, say you have a directory with a COPYING file at the root with a full LGPL 2.1 license text and that all or most source files have a simple notice in a comment `Licensed under the LGPL` and that one file carries a BSD text.\r\n\r\nWith this data in hand, you could conclude that the code is overall LGPL-2.1 licensed inferring the version from the top level full text and that one file is BSD-licensed .\r\n\r\nTo implement this there are a possible avenues:\r\n\r\n1. automated using the size of a match and comparing that to the size of a corresponding full license text:\r\n - if matched to a full text or if bigger or equal to the license text size: this is a full text match\r\n - a small match of a few line significantly smaller than than the text, this could be a mention, such as `licensed under the same license as Perl` or `license: BSD` .\r\n - a medium match of a several lines and still smaller than than the full text, this could be a notice \r\n\r\n2. data driven using tagged rules\r\nwe would tag each rule YAML as a full text, notice or mention and report that\r\n\r\nThe two approach can be combined and we could start with 1. and progressively adopt 2. (that requires updating several thousands rules... ;) )"}}