mit_license = "MIT license"
bsd_license = "BSD license"
bsd_license_v3 = "BSD 3-clause license"
bsd_license_v2 = "BSD 2-clause license"
apache_license = "Apache license"
apache_license_v1 = "Apache license 1.0"
apache_license_v2 = "Apache license 2.0"
gnu_affero = "GNU Affero general public license (apl)"
gnu_affero_v3 = "GNU Affero general public license v3 (aplv3)"
gnu_lesser_public_license = "GNU lesser general public license"
gnu_lesser_public_license_v2 = "GNU lesser general public license v2 (lgplv2)"
gnu_lesser_public_license_v3 = "GNU lesser general public license v3 (lgplv3)"
gnu_public_license = "GNU general public license"
gnu_public_license_v2 = "GNU general public license v2 (gplv2)"
gnu_public_license_v3 = "GNU general public license v3 (gplv3)"
python_license = "Python software foundation license"
eclipse_public_license_v1 = "Eclipse public license 1.0 (epl-1.0)"
eclipse_public_license_v2 = "Eclipse public license 2.0 (epl-2.0)"
repoze_license = "Repoze public license"
mozilla_publice_license = "Mozilla public license (mpl)"
mozilla_publice_license_v2 = "Mozilla public license 2.0 (mpl 2.0)"
iscl_license = "ISC license (iscl)"
historical_permission_notice = "Historical Permission Notice and Disclaimer (HPND)"

other = "other/proprietary license"
unknown = "UNKNOWN"

LICENSES_SYNONYMS = {
    "mit license": mit_license,
    "the mit license": mit_license,
    "mit license ": mit_license,
    "mit -  see license.txt": mit_license,
    "mit license (mit)": mit_license,
    "mit": mit_license,
    "mit licensed, as found in the license file": mit_license,
    "the mit license: http://www.opensource.org/licenses/mit-license.php": mit_license,
    "http://www.opensource.org/licenses/mit-license.php": mit_license,
    "the mit license (mit)": mit_license,
    "mit licence": mit_license,
    "bsd license": bsd_license,
    "3-clause bsd license": bsd_license_v3,
    "new bsd": bsd_license,
    "bsd": bsd_license,
    "bsd 3-clause": bsd_license_v3,
    "bsd-3-clause": bsd_license_v3,
    "3-bsd": bsd_license_v3,
    "bsd 3": bsd_license_v3,
    "bsd (3-clause)": bsd_license_v3,
    "bsd 2-clause (see license file)": bsd_license_v2,
    "bsd 3 clause": bsd_license_v3,
    "apache-2.0 or bsd": bsd_license_v2,
    "3-clause bsd <http://www.opensource.org/licenses/bsd-license.php>": bsd_license_v3,
    "bsd 3-clause license": bsd_license_v3,
    "3-clause bsd": bsd_license_v3,
    "bsd (2-clause)": bsd_license_v2,
    "bsd 2-clause": bsd_license_v2,
    "bsd-2-clause": bsd_license_v2,
    "apache software license": apache_license,
    "apache license 2.0": apache_license_v2,
    "apache 2.0": apache_license_v2,
    "apache license version 2.0": apache_license_v2,
    "apache-2.0": apache_license_v2,
    "apache license, version 2.0": apache_license_v2,
    "http://www.apache.org/licenses/license-2.0": apache_license_v2,
    "apache2": apache_license_v2,
    "apache license, v2.0": apache_license_v2,
    "apache license v2.0": apache_license_v2,
    "apache software license v2": apache_license_v2,
    "apache 2": apache_license_v2,
    "apache license 2": apache_license_v2,
    "apache software license (apache 2.0)": apache_license_v2,
    "apache2.0": apache_license_v2,
    "apache license": apache_license,
    "apache 2.0.": apache_license_v2,
    "apache": apache_license,
    "apache v2": apache_license_v2,
    "apache 2 license": apache_license_v2,
    '"apache 2.0"': apache_license_v2,
    "apache 2.0 license": apache_license_v2,
    "apache licence 2.0": apache_license_v2,
    "apache license (2.0)": apache_license_v2,
    "apache license version 2.0, january 2004 http://www.apache.org/licenses/": apache_license_v2,
    'apache license version 2.0, january 2004 http://www.apache.org/licenses/  terms and conditions for use, reproduction, and distribution  1. definitions.  "license" shall mean the terms and conditions for use, reproduction, and distribution as defined by sections 1 through 9 of this document.  "licens': apache_license_v2,
    "apache software license 2.0": apache_license_v2,
    "apache software license v2.0": apache_license_v2,
    "apache software license, version 2.0, http://www.apache.org/licenses/license-2.0": apache_license_v2,
    "apache-1.0": apache_license_v1,
    "apache-2": apache_license_v2,
    "apache-2.0 license": apache_license_v2,
    "agpl": gnu_affero,
    "agpl 3.0": gnu_affero_v3,
    "agpl v3": gnu_affero_v3,
    "agpl-3.0": gnu_affero_v3,
    "agpl-3.0+": gnu_affero_v3,
    "agpl-3.0-only": gnu_affero_v3,
    "agplv3": gnu_affero_v3,
    "agplv3 (see license file)": gnu_affero_v3,
    "apgl3": gnu_affero_v3,
    "gnu affero general public license version 3, 19 november 2007 copyright (c) 2007 free software foundation, inc. <http://fsf.org/> everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. preamble the gnu affero general public license is a": gnu_affero_v3,
    "gnu agplv3": gnu_affero_v3,
    "gnu affero general public license version 3 (agpl-3.0)": gnu_affero_v3,
    "gnu affero general public license v3": gnu_affero_v3,
    "gnu affero general public license v3.0": gnu_affero_v3,
    "gnu affero general public license, version 3": gnu_affero_v3,
    "gnu affero gpl 3.0": gnu_affero_v3,
    "gnu affero general public license v3 or later (agplv3+)": gnu_affero_v3,
    "gnu library or lesser general public license (lgpl)": gnu_lesser_public_license,
    "gnu lesser general public license v2 (lgplv2)": gnu_lesser_public_license_v2,
    "lgpl-2.1-only": gnu_lesser_public_license_v2,
    "gnu lesser general public license v3 (lgplv3)": gnu_lesser_public_license_v3,
    "lgpl, see also license.txt": gnu_lesser_public_license,
    "lgpl-2.1 license": gnu_lesser_public_license_v2,
    "lgpl-3.0": gnu_lesser_public_license_v3,
    "https://www.gnu.org/licenses/lgpl.html": gnu_lesser_public_license_v3,
    "lgpl-3.0 license": gnu_lesser_public_license_v3,
    "gnu lesser general public license version 3, 29 june 2007  copyright (c) 2007 free software foundation, inc. <https://fsf.org/> everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.   this version of the gnu lesser general public licen": gnu_lesser_public_license_v3,
    "gnu lesser general public license v2 or later (lgplv2+)": gnu_lesser_public_license_v2,
    "gnu lesser general public license v3 or later (lgplv3+)": gnu_lesser_public_license_v3,
    "lgplv3+": gnu_lesser_public_license_v3,
    "lgpl v3": gnu_lesser_public_license_v3,
    "GNU lesser general public license (lgpl)": gnu_lesser_public_license,
    "lgpl": gnu_lesser_public_license,
    "lgpl-3.0-or-later": gnu_lesser_public_license_v3,
    "lgpl-2.1+": gnu_lesser_public_license_v2,
    "lgpl 2.1": gnu_lesser_public_license_v2,
    "lgpl3": gnu_lesser_public_license_v3,
    "lgplv2+": gnu_lesser_public_license_v2,
    "lgplv3": gnu_lesser_public_license_v3,
    "gpl 2.0/lgpl 2.1": gnu_lesser_public_license_v2,
    "lgpl-2.1": gnu_lesser_public_license_v2,
    "gnu general public license (gpl)": gnu_public_license,
    "gnu general public license v2 (gplv2)": gnu_public_license_v2,
    "gnu general public license v2 or later (gplv2+)": gnu_public_license_v2,
    "gnu general public license v3 or later (gplv3+)": gnu_public_license_v3,
    "https://www.gnu.org/licenses/gpl-3.0.txt": gnu_public_license_v3,
    "['gplv3 or any later version']": gnu_public_license_v3,
    "gpl 2": gnu_public_license_v2,
    "gnu general public license v3 (gplv3)": gnu_public_license_v3,
    "gpl3": gnu_public_license_v3,
    "gpl2": gnu_public_license_v2,
    "gpl v3": gnu_public_license_v3,
    "gplv3": gnu_public_license_v3,
    "gplv2": gnu_public_license_v2,
    "gpl": gnu_public_license,
    "gpl 3.0": gnu_public_license_v3,
    "gpl v2": gnu_public_license_v2,
    "gnu-gpl": gnu_public_license,
    "gpl-3.0": gnu_public_license_v3,
    "gnu": gnu_public_license,
    "gnu 3.0": gnu_public_license_v3,
    "gnu general public license": gnu_public_license,
    "gnu general public license v3": gnu_public_license_v3,
    "gnuv3": gnu_public_license_v3,
    "gnu general public license version 3, 29 june 2007  copyright (c) 2007 free software foundation, inc. <https://fsf.org/> everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.  preamble  the gnu general public license is a free, copylef": gnu_public_license_v3,
    "gnu general public license version 3, 29 june 2007 copyright (c) 2007 free software foundation, inc. <http://fsf.org/> everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. preamble the gnu general public license is a free, copyleft li": gnu_public_license_v3,
    "gnu general public license version 3, 29 june 2007 copyright (c) 2007 free software foundation, inc. <https://fsf.org/> everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. preamble the gnu general public license is a free, copyleft l": gnu_public_license_v3,
    "gnu gpl 3.0": gnu_public_license_v3,
    "gnu gpl v3.0": gnu_public_license_v3,
    "gnu gpl v2 or later": gnu_public_license_v2,
    "gnu gpl v3": gnu_public_license_v3,
    "gnu gpl version 3": gnu_public_license_v3,
    "gnu gplv2": gnu_public_license_v2,
    "gnu gplv3": gnu_public_license_v3,
    "gnu gplv3 or any higher": gnu_public_license_v3,
    "gnu general license version 3": gnu_public_license_v3,
    "gnu general public licence v3.0": gnu_public_license_v3,
    "gnu general public license v2.0": gnu_public_license_v2,
    "gnu general public license v3 or later": gnu_public_license_v3,
    "gnu general public license v3.0": gnu_public_license_v3,
    "gnu general public license version 3 or later (gplv3+)": gnu_public_license_v3,
    "gnu general public license, version 3": gnu_public_license_v3,
    "gnu general public license, version 3, 29 june 2007": gnu_public_license_v3,
    "gnu-gplv3": gnu_public_license_v3,
    "gpl 2.0": gnu_public_license_v2,
    "gpl 3": gnu_public_license_v3,
    "gpl license": gnu_public_license,
    "gpl version 2": gnu_public_license_v2,
    "gpl version 3": gnu_public_license_v3,
    "gpl-2": gnu_public_license_v2,
    "gpl-2.0": gnu_public_license_v2,
    "gpl-2.0+": gnu_public_license_v2,
    "gpl-2.0-or-later or agpl-3.0-or-later or cern-ohl-s-2.0+": gnu_public_license,
    "gpl-3": gnu_public_license_v3,
    "gpl-3.0 license": gnu_public_license_v3,
    "gpl-3.0+": gnu_public_license_v3,
    "gpl-3.0-or-later": gnu_public_license_v3,
    "gpl-3.0-orlater": gnu_public_license_v3,
    "gpl-v3": gnu_public_license_v3,
    "gpl3+": gnu_public_license_v3,
    "gpl3.0": gnu_public_license_v3,
    "gpl>=3": gnu_public_license_v3,
    "gplv03": gnu_public_license_v3,
    "gplv2+": gnu_public_license_v2,
    "gplv3 license": gnu_public_license_v3,
    "gplv3+": gnu_public_license_v3,
    "python software foundation license": python_license,
    "psf": python_license,
    "python": python_license,
    "python style": python_license,
    "psf license": python_license,
    "eclipse public license 2.0 (epl-2.0)": eclipse_public_license_v2,
    "eclipse public license v2.0": eclipse_public_license_v2,
    "eclipse public license v2.0 / eclipse distribution license v1.0": eclipse_public_license_v2,
    "eclipse public license 1.0 (epl-1.0)": eclipse_public_license_v1,
    'eclipse public license - v 1.0\n\nthe accompanying program is provided under the terms of this eclipse public\nlicense ("agreement"). any use, reproduction or distribution of the program\nconstitutes recipient"s acceptance of this agreement.\n\n1. definitions\n\n"contribution" means:\n\na) in the case of the ': eclipse_public_license_v1,
    "licence.txt": unknown,
    "repoze public license": repoze_license,
    "bsd-derived (http://www.repoze.org/license.txt)": repoze_license,
    "mozilla public license 2.0 (mpl 2.0)": mozilla_publice_license_v2,
    "mpl-2.0": mozilla_publice_license_v2,
    "mpl": mozilla_publice_license,
    "mpl2": mozilla_publice_license_v2,
    "mpl 2.0": mozilla_publice_license_v2,
    "mozilla": mozilla_publice_license,
    "mozilla public license 2.0": mozilla_publice_license_v2,
    "mozilla public license version 2.0": mozilla_publice_license_v2,
    "isc license (iscl)": iscl_license,
    "isc": iscl_license,
    "iscl": iscl_license,
    "historical permission notice and disclaimer (hpnd)": historical_permission_notice,
    "hpnd": historical_permission_notice,
    "historical permission notice and disclaimer": historical_permission_notice,
    "other/proprietary license": other,
    "proprietary": other,
    "proprietary license": other,
}
