http://www.apache.org/licenses/LICENSE-2.0.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_927.RULE b/src/licensedcode/data/rules/apache-2.0_927.RULE
index c17e6cd145..0898b6fe86 100644
--- a/src/licensedcode/data/rules/apache-2.0_927.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_927.RULE
@@ -7,6 +7,6 @@ referenced_filenames:
notes: Seen in https://github.com/swagger-api/swagger-codegen/blob/ca9a00261f08f024dd19fa45c9ff2098fed67451/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java#L6980
---
-* The following code adds default LICENSE (Apache-2.0) for all generators
+* The following code adds default LICENSE ({{Apache-2.0}}) for all generators
* To use license other than Apache2.0, update the following file:
* modules/swagger-codegen/src/main/resources/_common/LICENSE
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_945.RULE b/src/licensedcode/data/rules/apache-2.0_945.RULE
index f3916c6092..f74c8be83a 100644
--- a/src/licensedcode/data/rules/apache-2.0_945.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_945.RULE
@@ -5,5 +5,5 @@ referenced_filenames:
- /usr/share/common-licenses/Apache-2.0
---
-On Debian systems a full copy of the Apache 2.0 can be found at
+On Debian systems a full copy of the {{Apache 2.0}} can be found at
/usr/share/common-licenses/Apache-2.0
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_947.RULE b/src/licensedcode/data/rules/apache-2.0_947.RULE
index cf6cfe45d2..367fdceeb1 100644
--- a/src/licensedcode/data/rules/apache-2.0_947.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_947.RULE
@@ -7,5 +7,5 @@ notes: the inbound == outbound CLA is already built-in in the Apache license.
---
License
-[Apache-2.0](LICENSE). By providing a contribution, you agree the contribution is licensed under Apache-2.0.
+[{{Apache-2.0}}](LICENSE). By providing a contribution, you agree the contribution is licensed under {{Apache-2.0}}.
This code is provided as-is with no warranty. Use at your own risk.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_962.RULE b/src/licensedcode/data/rules/apache-2.0_962.RULE
index 78326b72ed..fbd4ea41b2 100644
--- a/src/licensedcode/data/rules/apache-2.0_962.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_962.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
---
License
-This project is licensed under the Apache-2.0
+This project is licensed under the {{Apache-2.0}}
license (http://www.apache.org/licenses/LICENSE-2.0).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_963.RULE b/src/licensedcode/data/rules/apache-2.0_963.RULE
index 3534d154f4..9490f7b07a 100644
--- a/src/licensedcode/data/rules/apache-2.0_963.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_963.RULE
@@ -5,6 +5,5 @@ ignorable_urls:
- http://www.apache.org/licenses/LICENSE-2.0
---
-This project is licensed under the {{ Apache-2.0 }}
-license ( {{ http://www.apache.org/licenses/LICENSE-2.0 }}).
-
+This project is licensed under the {{Apache-2.0}}
+license (http://www.apache.org/licenses/LICENSE-2.0).
diff --git a/src/licensedcode/data/rules/apache-2.0_967.RULE b/src/licensedcode/data/rules/apache-2.0_967.RULE
index b36250fd28..91f9e44e3d 100644
--- a/src/licensedcode/data/rules/apache-2.0_967.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_967.RULE
@@ -8,7 +8,7 @@ ignorable_urls:
-License Agreement For Open Source Computer Vision Library (Apache 2.0 License)
+License Agreement For Open Source Computer Vision Library ({{Apache 2.0}} License)
http://opencv.org/license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_973.RULE b/src/licensedcode/data/rules/apache-2.0_973.RULE
index 1fc984038b..28217f5185 100644
--- a/src/licensedcode/data/rules/apache-2.0_973.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_973.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
- http://www.apache.org/licenses/LICENSE-2.0
---
-License: Apache-2.0
+License: {{Apache-2.0}}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -22,4 +22,4 @@ License: Apache-2.0
.
On Debian GNU/Linux systems, the full text of the Apache License, Version 2.0 can be
found in the file
- `/usr/share/common-licenses/Apache-2.0'.
\ No newline at end of file
+ `/usr/share/common-licenses/{{Apache-2.0}}'.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_985.RULE b/src/licensedcode/data/rules/apache-2.0_985.RULE
index 0568311d0b..d3f64e7c99 100644
--- a/src/licensedcode/data/rules/apache-2.0_985.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_985.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
- https://www.apache.org/licenses/LICENSE-2.0
---
-License: Apache-2.0
+License: {{Apache-2.0}}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -22,4 +22,4 @@ License: Apache-2.0
.
On Debian GNU/Linux systems, the full text of the Apache License, Version 2.0 can be
found in the file
- `/usr/share/common-licenses/Apache-2.0'.
\ No newline at end of file
+ `/usr/share/common-licenses/{{Apache-2.0}}'.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_993.RULE b/src/licensedcode/data/rules/apache-2.0_993.RULE
index b98f52c9ab..bfacf21cbd 100644
--- a/src/licensedcode/data/rules/apache-2.0_993.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_993.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- /usr/share/common-licenses/Apache-2.0
---
-License: Apache-2.0
+License: {{Apache-2.0}}
On Debian GNU/Linux systems the complete text of the license can be found in
/usr/share/common-licenses/Apache-2.0
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_994.RULE b/src/licensedcode/data/rules/apache-2.0_994.RULE
index 20d655bf66..f79d490c37 100644
--- a/src/licensedcode/data/rules/apache-2.0_994.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_994.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- /usr/share/common-licenses/Apache-2.0
---
-On Debian GNU/Linux systems a full copy of the Apache 2.0 can be found at
+On Debian GNU/Linux systems a full copy of the {{Apache 2.0}} can be found at
/usr/share/common-licenses/Apache-2.0
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_995.RULE b/src/licensedcode/data/rules/apache-2.0_995.RULE
index a75a76d48d..49f116256c 100644
--- a/src/licensedcode/data/rules/apache-2.0_995.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_995.RULE
@@ -8,7 +8,7 @@ ignorable_urls:
- https://www.apache.org/licenses/LICENSE-2.0
---
-License: Apache-2.0
+License: {{Apache-2.0}}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
diff --git a/src/licensedcode/data/rules/apache-2.0_999.RULE b/src/licensedcode/data/rules/apache-2.0_999.RULE
index f1ff391fc5..e2ea3753a0 100644
--- a/src/licensedcode/data/rules/apache-2.0_999.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_999.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://spdx.org/licenses/Apache-2.0.html
---
-license: https://spdx.org/licenses/Apache-2.0.html Apache-2.0
\ No newline at end of file
+license: https://spdx.org/licenses/Apache-2.0.html {{Apache-2.0}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/apache-2.0_governed.RULE b/src/licensedcode/data/rules/apache-2.0_governed.RULE
index 8420f8f2c5..4025ce323a 100644
--- a/src/licensedcode/data/rules/apache-2.0_governed.RULE
+++ b/src/licensedcode/data/rules/apache-2.0_governed.RULE
@@ -5,4 +5,4 @@ referenced_filenames:
- LICENSE
---
-Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
\ No newline at end of file
+Use of this source code is governed by the {{Apache 2.0}} license that can be found in the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/cclrc_1.RULE b/src/licensedcode/data/rules/cclrc_1.RULE
new file mode 100644
index 0000000000..946ef31c9c
--- /dev/null
+++ b/src/licensedcode/data/rules/cclrc_1.RULE
@@ -0,0 +1,10 @@
+---
+license_expression: cclrc
+is_license_notice: yes
+referenced_filenames:
+ - External_License/CCLRC_CDAT_License.txt
+---
+
+* This software may be distributed under the terms of the
+ * {{CCLRC Licence}} for CCLRC Software
+ *
/External_License/CCLRC_CDAT_License.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/cclrc_2.RULE b/src/licensedcode/data/rules/cclrc_2.RULE
new file mode 100644
index 0000000000..ed360a2c09
--- /dev/null
+++ b/src/licensedcode/data/rules/cclrc_2.RULE
@@ -0,0 +1,7 @@
+---
+license_expression: cclrc
+is_license_notice: yes
+---
+
+* This software may be distributed under the terms of the
+ * {{CCLRC Licence}} for CCLRC Software
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/maven_pom_18.RULE b/src/licensedcode/data/rules/maven_pom_18.RULE
index a4eebcfc1a..9fd0902af8 100644
--- a/src/licensedcode/data/rules/maven_pom_18.RULE
+++ b/src/licensedcode/data/rules/maven_pom_18.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-License: MIT License (MIT) (http://opensource.org/licenses/mit-license.php)
\ No newline at end of file
+License: {{MIT License (MIT}}) (http://opensource.org/licenses/mit-license.php)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/maven_pom_3.RULE b/src/licensedcode/data/rules/maven_pom_3.RULE
index 44eef70404..b3a8415757 100644
--- a/src/licensedcode/data/rules/maven_pom_3.RULE
+++ b/src/licensedcode/data/rules/maven_pom_3.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.apache.org/licenses/LICENSE-2.0.txt
---
-License: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
\ No newline at end of file
+License: {{Apache License 2.0}} (http://www.apache.org/licenses/LICENSE-2.0.txt)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/maven_pom_35.RULE b/src/licensedcode/data/rules/maven_pom_35.RULE
index 8b80c248ec..1c070d45c1 100644
--- a/src/licensedcode/data/rules/maven_pom_35.RULE
+++ b/src/licensedcode/data/rules/maven_pom_35.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://jsoup.com/license
---
-License: The MIT License (http://jsoup.com/license)
\ No newline at end of file
+License: {{The MIT License}} (http://jsoup.com/license)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_0.RULE b/src/licensedcode/data/rules/mit_0.RULE
index 7348150198..cf75036594 100644
--- a/src/licensedcode/data/rules/mit_0.RULE
+++ b/src/licensedcode/data/rules/mit_0.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-is released under the MIT license. See the LICENSE
+is released {{under the MIT license}}. See the LICENSE
file for the complete license.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1002.RULE b/src/licensedcode/data/rules/mit_1002.RULE
index 5bb295f521..2a2b7cb7c4 100644
--- a/src/licensedcode/data/rules/mit_1002.RULE
+++ b/src/licensedcode/data/rules/mit_1002.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-See the LICENSE file. It's under the MIT License.
\ No newline at end of file
+See the LICENSE file. It's {{under the MIT License}}.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1009.RULE b/src/licensedcode/data/rules/mit_1009.RULE
index ecf9ccfe15..59ed4de1d4 100644
--- a/src/licensedcode/data/rules/mit_1009.RULE
+++ b/src/licensedcode/data/rules/mit_1009.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-The package is licensed under the MIT licence https://opensource.org/licenses/​MIT
\ No newline at end of file
+The package is {{licensed under the MIT}} licence https://opensource.org/licenses/​MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_101.RULE b/src/licensedcode/data/rules/mit_101.RULE
index 3a9e40b310..eccb4c2b10 100644
--- a/src/licensedcode/data/rules/mit_101.RULE
+++ b/src/licensedcode/data/rules/mit_101.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This source code is licensed under the MIT license found in the
+This source code is {{licensed under the MIT}} license found in the
LICENSE file in the root directory of this source tree.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1023.RULE b/src/licensedcode/data/rules/mit_1023.RULE
index 0e50b6b459..0ec8848320 100644
--- a/src/licensedcode/data/rules/mit_1023.RULE
+++ b/src/licensedcode/data/rules/mit_1023.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-licensed under MIT Licence
+{{licensed under MIT}} Licence
(https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1024.RULE b/src/licensedcode/data/rules/mit_1024.RULE
index a228cf9c9b..bc1a3b8c68 100644
--- a/src/licensedcode/data/rules/mit_1024.RULE
+++ b/src/licensedcode/data/rules/mit_1024.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENCE
---
-This project is licensed under the MIT licence. See the LICENCE file for more details.
\ No newline at end of file
+This project is {{licensed under the MIT}} licence. See the LICENCE file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1026.RULE b/src/licensedcode/data/rules/mit_1026.RULE
index eefd2790ea..dcef406759 100644
--- a/src/licensedcode/data/rules/mit_1026.RULE
+++ b/src/licensedcode/data/rules/mit_1026.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Licensed under MIT Licence - See LICENSE
\ No newline at end of file
+{{Licensed under MIT}} Licence - See LICENSE
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1027.RULE b/src/licensedcode/data/rules/mit_1027.RULE
index 47a80feddc..804764a2f1 100644
--- a/src/licensedcode/data/rules/mit_1027.RULE
+++ b/src/licensedcode/data/rules/mit_1027.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- License.txt
---
-Licensed under MIT licence. See License.txt in the project root for license information.
\ No newline at end of file
+{{Licensed under MIT}} licence. See License.txt in the project root for license information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1028.RULE b/src/licensedcode/data/rules/mit_1028.RULE
index 7180b65648..161a9ecb43 100644
--- a/src/licensedcode/data/rules/mit_1028.RULE
+++ b/src/licensedcode/data/rules/mit_1028.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-This software is licensed under the MIT licence (see LICENSE.md )
\ No newline at end of file
+This software is {{licensed under the MIT}} licence (see LICENSE.md )
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1034.RULE b/src/licensedcode/data/rules/mit_1034.RULE
index 54e49066bc..ba286f19fe 100644
--- a/src/licensedcode/data/rules/mit_1034.RULE
+++ b/src/licensedcode/data/rules/mit_1034.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://en.wikipedia.org/wiki/MIT_License
---
-Licensed under The MIT License
+{{Licensed under The MIT}} License
http://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1035.RULE b/src/licensedcode/data/rules/mit_1035.RULE
index 1825296f8c..50481a8420 100644
--- a/src/licensedcode/data/rules/mit_1035.RULE
+++ b/src/licensedcode/data/rules/mit_1035.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://en.wikipedia.org/wiki/MIT_License
---
-Licensed under The MIT License
+{{Licensed under The MIT}} License
https://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1040.RULE b/src/licensedcode/data/rules/mit_1040.RULE
index 14d4e9cda5..5fe148e2f4 100644
--- a/src/licensedcode/data/rules/mit_1040.RULE
+++ b/src/licensedcode/data/rules/mit_1040.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-Project licenses this product to you under the MIT License (the "License"). You may not use this product except in compliance with the License. You may obtain a copy of the License at:
+Project licenses this product to you {{under the MIT License}} (the "License"). You may not use this product except in compliance with the License. You may obtain a copy of the License at:
http://opensource.org/licenses/MIT
diff --git a/src/licensedcode/data/rules/mit_1045.RULE b/src/licensedcode/data/rules/mit_1045.RULE
index e66480dfef..fce7a856c0 100644
--- a/src/licensedcode/data/rules/mit_1045.RULE
+++ b/src/licensedcode/data/rules/mit_1045.RULE
@@ -9,5 +9,5 @@ ignorable_urls:
The following is the 'standard copyright' agreed upon by most contributors,
and is currently the canonical license preferred by the X.Org Foundation.
-This is a slight variant of the common MIT license form published by the
+This is a slight variant of the common {{MIT license}} form published by the
Open Source Initiative at http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1047.RULE b/src/licensedcode/data/rules/mit_1047.RULE
index 281f853c5c..7b53cbc38b 100644
--- a/src/licensedcode/data/rules/mit_1047.RULE
+++ b/src/licensedcode/data/rules/mit_1047.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
notes: Seen in https://github.com/Wind4/vlmcsd/blob/65228e5c7916acd947ffb53be18abadafbc1be56/src/tap-windows.h
---
-licensed using the MIT license (see COPYRIGHT.MIT).
\ No newline at end of file
+licensed using {{the MIT license}} (see COPYRIGHT.MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1051.RULE b/src/licensedcode/data/rules/mit_1051.RULE
index f045f93bc6..5f2189b6e1 100644
--- a/src/licensedcode/data/rules/mit_1051.RULE
+++ b/src/licensedcode/data/rules/mit_1051.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
LICENSE
-is made available under the MIT License. For more details, see `LICENSE.txt
\ No newline at end of file
+is made available {{under the MIT License}}. For more details, see `LICENSE.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1052.RULE b/src/licensedcode/data/rules/mit_1052.RULE
index 6f0592b23c..d4b73fc415 100644
--- a/src/licensedcode/data/rules/mit_1052.RULE
+++ b/src/licensedcode/data/rules/mit_1052.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-made available under the MIT License. For more details, see `LICENSE.txt
\ No newline at end of file
+made available {{under the MIT License}}. For more details, see `LICENSE.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1057.RULE b/src/licensedcode/data/rules/mit_1057.RULE
index e76f45634e..c8629ab9df 100644
--- a/src/licensedcode/data/rules/mit_1057.RULE
+++ b/src/licensedcode/data/rules/mit_1057.RULE
@@ -9,5 +9,5 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
+{{Distributed under the MIT License}} (MIT) (See accompanying file LICENSE.txt
or copy at http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1068.RULE b/src/licensedcode/data/rules/mit_1068.RULE
index 29e033eb07..a2e2bba9f8 100644
--- a/src/licensedcode/data/rules/mit_1068.RULE
+++ b/src/licensedcode/data/rules/mit_1068.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
## License
-This software is published under the [MIT License](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+This software is published {{under the [MIT License}}](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1069.RULE b/src/licensedcode/data/rules/mit_1069.RULE
index 13869a8c72..1afdcd6771 100644
--- a/src/licensedcode/data/rules/mit_1069.RULE
+++ b/src/licensedcode/data/rules/mit_1069.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-This software is published under the [MIT License](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+This software is published {{under the [MIT License}}](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1071.RULE b/src/licensedcode/data/rules/mit_1071.RULE
index 47583eec3e..4461fc9572 100644
--- a/src/licensedcode/data/rules/mit_1071.RULE
+++ b/src/licensedcode/data/rules/mit_1071.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
---
This software may be distributed under the terms
-* of the MIT license. See the LICENSE file for details.
\ No newline at end of file
+* of {{the MIT license}}. See the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1074.RULE b/src/licensedcode/data/rules/mit_1074.RULE
index 9abfe96f02..63200900ae 100644
--- a/src/licensedcode/data/rules/mit_1074.RULE
+++ b/src/licensedcode/data/rules/mit_1074.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-distributed under the MIT license, please see LICENSE for more information.
\ No newline at end of file
+{{distributed under the MIT license}}, please see LICENSE for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1075.RULE b/src/licensedcode/data/rules/mit_1075.RULE
index 3a9f43a78a..e89450c04a 100644
--- a/src/licensedcode/data/rules/mit_1075.RULE
+++ b/src/licensedcode/data/rules/mit_1075.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-license: MIT, see LICENSE for more details.
\ No newline at end of file
+{{license: MIT}}, see LICENSE for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1076.RULE b/src/licensedcode/data/rules/mit_1076.RULE
index 6e9502ea71..a62f6c84bc 100644
--- a/src/licensedcode/data/rules/mit_1076.RULE
+++ b/src/licensedcode/data/rules/mit_1076.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
---
License
-This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file
\ No newline at end of file
+This work is released {{under the MIT license}}. A copy of the license is provided in the [LICENSE](./LICENSE) file
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1077.RULE b/src/licensedcode/data/rules/mit_1077.RULE
index c82e5ec594..59c264ae38 100644
--- a/src/licensedcode/data/rules/mit_1077.RULE
+++ b/src/licensedcode/data/rules/mit_1077.RULE
@@ -5,4 +5,4 @@ referenced_filenames:
- LICENSE
---
-This work is released under the MIT license. A copy of the license is provided in the LICENSE file.
\ No newline at end of file
+This work is released {{under the MIT license}}. A copy of the license is provided in the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1088.RULE b/src/licensedcode/data/rules/mit_1088.RULE
index ddc1c2810d..9261efd618 100644
--- a/src/licensedcode/data/rules/mit_1088.RULE
+++ b/src/licensedcode/data/rules/mit_1088.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Licensed under the terms of the [MIT license](./LICENSE).
\ No newline at end of file
+Licensed under the terms of {{the [MIT license}}](./LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1091.RULE b/src/licensedcode/data/rules/mit_1091.RULE
index f7c00f9616..50e5647701 100644
--- a/src/licensedcode/data/rules/mit_1091.RULE
+++ b/src/licensedcode/data/rules/mit_1091.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://spdx.org/licenses/MIT
---
-LICENSE: MIT (https://spdx.org/licenses/MIT)
\ No newline at end of file
+{{LICENSE: MIT}} (https://spdx.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1093.RULE b/src/licensedcode/data/rules/mit_1093.RULE
index a03f4fe2e7..d49986073d 100644
--- a/src/licensedcode/data/rules/mit_1093.RULE
+++ b/src/licensedcode/data/rules/mit_1093.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE.txt
---
-Distributed under the MIT License. See
+{{Distributed under the MIT License}}. See
LICENSE.txt for further details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1095.RULE b/src/licensedcode/data/rules/mit_1095.RULE
index e460ba5f7a..c9caea6d6b 100644
--- a/src/licensedcode/data/rules/mit_1095.RULE
+++ b/src/licensedcode/data/rules/mit_1095.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-under MIT License: http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{under MIT License}}: http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1096.RULE b/src/licensedcode/data/rules/mit_1096.RULE
index 7ddfcf301d..f5c82ef7f9 100644
--- a/src/licensedcode/data/rules/mit_1096.RULE
+++ b/src/licensedcode/data/rules/mit_1096.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-This code is licensed under the MIT license see LICENSE.txt
\ No newline at end of file
+This code is {{licensed under the MIT}} license see LICENSE.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_112.RULE b/src/licensedcode/data/rules/mit_112.RULE
index 78274f5d64..fce204f43d 100644
--- a/src/licensedcode/data/rules/mit_112.RULE
+++ b/src/licensedcode/data/rules/mit_112.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://jedwatson.github.io/classnames
---
-Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames
\ No newline at end of file
+{{Licensed under the MIT}} {{License (MIT}}), see http://jedwatson.github.io/classnames
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1120.RULE b/src/licensedcode/data/rules/mit_1120.RULE
index 1154a9c81a..6bbce41bd4 100644
--- a/src/licensedcode/data/rules/mit_1120.RULE
+++ b/src/licensedcode/data/rules/mit_1120.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
- LICENSE.md
---
-MIT License, see LICENSE.md for details
\ No newline at end of file
+{{MIT License}}, see LICENSE.md for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1121.RULE b/src/licensedcode/data/rules/mit_1121.RULE
index 9c09f642ee..4ea631e822 100644
--- a/src/licensedcode/data/rules/mit_1121.RULE
+++ b/src/licensedcode/data/rules/mit_1121.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
- LICENSE.md
---
-MIT License, see LICENSE.md for details': 'MIT
\ No newline at end of file
+{{MIT License}}, see LICENSE.md for details': 'MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1132.RULE b/src/licensedcode/data/rules/mit_1132.RULE
index 565f18ac31..67feec1b6c 100644
--- a/src/licensedcode/data/rules/mit_1132.RULE
+++ b/src/licensedcode/data/rules/mit_1132.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-MIT License (http://opensource.org/licenses/MIT): MIT
\ No newline at end of file
+{{MIT License}} (http://opensource.org/licenses/MIT): MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1133.RULE b/src/licensedcode/data/rules/mit_1133.RULE
index 6488bfe1f8..ff08a8c6f6 100644
--- a/src/licensedcode/data/rules/mit_1133.RULE
+++ b/src/licensedcode/data/rules/mit_1133.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/MIT
---
-MIT License http://www.opensource.org/licenses/MIT: MIT
\ No newline at end of file
+{{MIT License}} http://www.opensource.org/licenses/MIT: MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1139.RULE b/src/licensedcode/data/rules/mit_1139.RULE
index 39148cad46..ec1afb472e 100644
--- a/src/licensedcode/data/rules/mit_1139.RULE
+++ b/src/licensedcode/data/rules/mit_1139.RULE
@@ -7,6 +7,6 @@ ignorable_urls:
---
-
- MIT License
+ <{{license>
+ MIT}} License
https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1142.RULE b/src/licensedcode/data/rules/mit_1142.RULE
index 904550b032..0e43782b3c 100644
--- a/src/licensedcode/data/rules/mit_1142.RULE
+++ b/src/licensedcode/data/rules/mit_1142.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
---
-
- MIT License
+ <{{license>
+ MIT}} License
http://httpunit.sourceforge.net/doc/license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1148.RULE b/src/licensedcode/data/rules/mit_1148.RULE
index 1410558c18..c8fe7d4488 100644
--- a/src/licensedcode/data/rules/mit_1148.RULE
+++ b/src/licensedcode/data/rules/mit_1148.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://mths.be/mit
---
-Available under MIT license
\ No newline at end of file
+Available {{under MIT license}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1160.RULE b/src/licensedcode/data/rules/mit_1160.RULE
index 80cdb1d6a5..d8309f9441 100644
--- a/src/licensedcode/data/rules/mit_1160.RULE
+++ b/src/licensedcode/data/rules/mit_1160.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_tag: yes
+is_required_phrase: yes
is_continuous: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_1161.RULE b/src/licensedcode/data/rules/mit_1161.RULE
index 5e878e494a..3acbfa470b 100644
--- a/src/licensedcode/data/rules/mit_1161.RULE
+++ b/src/licensedcode/data/rules/mit_1161.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_tag: yes
+is_required_phrase: yes
is_continuous: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_1162.RULE b/src/licensedcode/data/rules/mit_1162.RULE
index 665337fcc5..e868950724 100644
--- a/src/licensedcode/data/rules/mit_1162.RULE
+++ b/src/licensedcode/data/rules/mit_1162.RULE
@@ -6,6 +6,6 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license
---
-license": {
- "name": "MIT",
+{{license": {
+ "name": "MIT}}",
"url": "http://opensource.org/licenses/mit-license"
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1165.RULE b/src/licensedcode/data/rules/mit_1165.RULE
index ade2cf49c9..1cb2a1c205 100644
--- a/src/licensedcode/data/rules/mit_1165.RULE
+++ b/src/licensedcode/data/rules/mit_1165.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_tag: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_1182.RULE b/src/licensedcode/data/rules/mit_1182.RULE
index df2bde0548..dd1ca6e9ca 100644
--- a/src/licensedcode/data/rules/mit_1182.RULE
+++ b/src/licensedcode/data/rules/mit_1182.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_1183.RULE b/src/licensedcode/data/rules/mit_1183.RULE
index 7c8e68629b..82943e1fdf 100644
--- a/src/licensedcode/data/rules/mit_1183.RULE
+++ b/src/licensedcode/data/rules/mit_1183.RULE
@@ -5,5 +5,5 @@ referenced_filenames:
- doc/otp-base-license.txt
---
-Portions of the following files are licensed under the MIT License:
+Portions of the following files are {{licensed under the MIT}} License:
Please see {{doc/otp-base-license.txt}} for the full terms of this license.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1186.RULE b/src/licensedcode/data/rules/mit_1186.RULE
index caabf5df61..d85c8ea1f3 100644
--- a/src/licensedcode/data/rules/mit_1186.RULE
+++ b/src/licensedcode/data/rules/mit_1186.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
notes: seen in Python bottle
---
-License: MIT (see LICENSE for details)
\ No newline at end of file
+{{License: MIT}} (see LICENSE for details)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1187.RULE b/src/licensedcode/data/rules/mit_1187.RULE
index 62d84447d8..822a09eaba 100644
--- a/src/licensedcode/data/rules/mit_1187.RULE
+++ b/src/licensedcode/data/rules/mit_1187.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
notes: seen in Python bottle
---
-License: MIT (see LICENSE)
\ No newline at end of file
+{{License: MIT}} (see LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1192.RULE b/src/licensedcode/data/rules/mit_1192.RULE
index ca3c069020..145a61afe2 100644
--- a/src/licensedcode/data/rules/mit_1192.RULE
+++ b/src/licensedcode/data/rules/mit_1192.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
- [MIT License](LICENSE)
\ No newline at end of file
+ [{{MIT License}}](LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_120.RULE b/src/licensedcode/data/rules/mit_120.RULE
index 04d645b7ba..97d4af1838 100644
--- a/src/licensedcode/data/rules/mit_120.RULE
+++ b/src/licensedcode/data/rules/mit_120.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit
---
-Licensed under the MIT License at: * http://www.opensource.org/licenses/mit
\ No newline at end of file
+{{Licensed under the MIT}} License at: * http://www.opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_121.RULE b/src/licensedcode/data/rules/mit_121.RULE
index c5b6eadd08..4a5d9ca4c9 100644
--- a/src/licensedcode/data/rules/mit_121.RULE
+++ b/src/licensedcode/data/rules/mit_121.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-MIT License http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{MIT License}} http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1214.RULE b/src/licensedcode/data/rules/mit_1214.RULE
index 3973223ede..c244077f1b 100644
--- a/src/licensedcode/data/rules/mit_1214.RULE
+++ b/src/licensedcode/data/rules/mit_1214.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
## License
-This project source code is available under MIT license. See [LICENSE](LICENSE).
\ No newline at end of file
+This project source code is available {{under MIT license}}. See [LICENSE](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1215.RULE b/src/licensedcode/data/rules/mit_1215.RULE
index 0a00432580..c7e974f1b9 100644
--- a/src/licensedcode/data/rules/mit_1215.RULE
+++ b/src/licensedcode/data/rules/mit_1215.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project source code is available under MIT license. See [LICENSE](LICENSE).
\ No newline at end of file
+This project source code is available {{under MIT license}}. See [LICENSE](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1232.RULE b/src/licensedcode/data/rules/mit_1232.RULE
index 3787697ace..5652192597 100644
--- a/src/licensedcode/data/rules/mit_1232.RULE
+++ b/src/licensedcode/data/rules/mit_1232.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
---
This file is part of [zig](https://ziglang.org/), which is MIT licensed.
-The MIT license requires this copyright notice to be included in all copies
+{{The MIT license}} requires this copyright notice to be included in all copies
and substantial portions of the software.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1237.RULE b/src/licensedcode/data/rules/mit_1237.RULE
index 7944fa918c..d632100f74 100644
--- a/src/licensedcode/data/rules/mit_1237.RULE
+++ b/src/licensedcode/data/rules/mit_1237.RULE
@@ -5,5 +5,5 @@ ignorable_urls:
- https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
---
-Ported from musl, which is licensed under the MIT license:
+Ported from musl, which is {{licensed under the MIT}} license:
https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_124.RULE b/src/licensedcode/data/rules/mit_124.RULE
index 4ba7a8d610..5a4ab78b3e 100644
--- a/src/licensedcode/data/rules/mit_124.RULE
+++ b/src/licensedcode/data/rules/mit_124.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://codemirror.net/LICENSE
---
-Distributed under an MIT license: http://codemirror.net/LICENSE
\ No newline at end of file
+Distributed under an {{MIT license}}: http://codemirror.net/LICENSE
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1247.RULE b/src/licensedcode/data/rules/mit_1247.RULE
index 3319a1b2ab..84c6f9af51 100644
--- a/src/licensedcode/data/rules/mit_1247.RULE
+++ b/src/licensedcode/data/rules/mit_1247.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
License
-This project is licensed under the terms of the [MIT license](LICENSE.md).
\ No newline at end of file
+This project is licensed under the terms of {{the [MIT license}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1248.RULE b/src/licensedcode/data/rules/mit_1248.RULE
index a359c3a183..cdfb3fd00d 100644
--- a/src/licensedcode/data/rules/mit_1248.RULE
+++ b/src/licensedcode/data/rules/mit_1248.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-This project is licensed under the terms of the [MIT license](LICENSE.md).
\ No newline at end of file
+This project is licensed under the terms of {{the [MIT license}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1249.RULE b/src/licensedcode/data/rules/mit_1249.RULE
index 80a3986988..693ebe0d50 100644
--- a/src/licensedcode/data/rules/mit_1249.RULE
+++ b/src/licensedcode/data/rules/mit_1249.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.rst
---
-licensed under the MIT License - see the LICENSE.rst file for details.
\ No newline at end of file
+{{licensed under the MIT}} License - see the LICENSE.rst file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1250.RULE b/src/licensedcode/data/rules/mit_1250.RULE
index d6487573ec..19d6735808 100644
--- a/src/licensedcode/data/rules/mit_1250.RULE
+++ b/src/licensedcode/data/rules/mit_1250.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-This file is distributed under the MIT License. See LICENSE.md for details.
\ No newline at end of file
+This file is {{distributed under the MIT License}}. See LICENSE.md for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1251.RULE b/src/licensedcode/data/rules/mit_1251.RULE
index b922c77226..3118f2f76a 100644
--- a/src/licensedcode/data/rules/mit_1251.RULE
+++ b/src/licensedcode/data/rules/mit_1251.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-distributed under the MIT License. See LICENSE.md for details.
\ No newline at end of file
+{{distributed under the MIT License}}. See LICENSE.md for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1252.RULE b/src/licensedcode/data/rules/mit_1252.RULE
index 83bb5258c4..3cf7b843ce 100644
--- a/src/licensedcode/data/rules/mit_1252.RULE
+++ b/src/licensedcode/data/rules/mit_1252.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-distributed under the MIT License. See LICENSE.
\ No newline at end of file
+{{distributed under the MIT License}}. See LICENSE.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1254.RULE b/src/licensedcode/data/rules/mit_1254.RULE
index 0f23cbc120..61bb36567f 100644
--- a/src/licensedcode/data/rules/mit_1254.RULE
+++ b/src/licensedcode/data/rules/mit_1254.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Each individual file, unless otherwise noted, is released under the terms of the [MIT License](https://opensource.org/licenses/MIT).
+Each individual file, unless otherwise noted, is released under the terms of {{the [MIT License}}](https://opensource.org/licenses/MIT).
A copy of this license can be found in [LICENSE.mit](LICENSE.mit).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1259.RULE b/src/licensedcode/data/rules/mit_1259.RULE
index 41fd889210..42a524908e 100644
--- a/src/licensedcode/data/rules/mit_1259.RULE
+++ b/src/licensedcode/data/rules/mit_1259.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
- https://github.com/twbs/bootstrap/blob/main/LICENSE
---
-Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE).
\ No newline at end of file
+Code released {{under the [MIT License}}](https://github.com/twbs/bootstrap/blob/main/LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1260.RULE b/src/licensedcode/data/rules/mit_1260.RULE
index 76ad29c7e2..9da331d1fe 100644
--- a/src/licensedcode/data/rules/mit_1260.RULE
+++ b/src/licensedcode/data/rules/mit_1260.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
- https://github.com/twbs/bootstrap/blob/main/LICENSE
---
-Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
\ No newline at end of file
+{{Licensed under MIT}} (https://github.com/twbs/bootstrap/blob/main/LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1265.RULE b/src/licensedcode/data/rules/mit_1265.RULE
index 641f4b0483..af17340176 100644
--- a/src/licensedcode/data/rules/mit_1265.RULE
+++ b/src/licensedcode/data/rules/mit_1265.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-MIT License (MIT) (http://opensource.org/licenses/mit-license.php)
\ No newline at end of file
+{{MIT License (MIT}}) (http://opensource.org/licenses/mit-license.php)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1271.RULE b/src/licensedcode/data/rules/mit_1271.RULE
index 61f2a19156..bb10376e19 100644
--- a/src/licensedcode/data/rules/mit_1271.RULE
+++ b/src/licensedcode/data/rules/mit_1271.RULE
@@ -6,6 +6,6 @@ ignorable_urls:
- http://opensource.org/licenses/mit
---
-
- MIT License
+<{{license>
+ MIT}} License
(http://opensource.org/licenses/mit)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1272.RULE b/src/licensedcode/data/rules/mit_1272.RULE
index 011559361f..50a4ba4b6c 100644
--- a/src/licensedcode/data/rules/mit_1272.RULE
+++ b/src/licensedcode/data/rules/mit_1272.RULE
@@ -6,6 +6,6 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-
- MIT License
+<{{license>
+ MIT}} License
(http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_128.RULE b/src/licensedcode/data/rules/mit_128.RULE
index 8aa45f36a5..68dd2f80f8 100644
--- a/src/licensedcode/data/rules/mit_128.RULE
+++ b/src/licensedcode/data/rules/mit_128.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.MIT
---
-Licensed under MIT - see LICENSE.MIT file for details
\ No newline at end of file
+{{Licensed under MIT}} - see LICENSE.MIT file for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1287.RULE b/src/licensedcode/data/rules/mit_1287.RULE
index c7c2776eb1..1347042594 100644
--- a/src/licensedcode/data/rules/mit_1287.RULE
+++ b/src/licensedcode/data/rules/mit_1287.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-Feel free to use as you please, see [MIT License](./LICENSE.md).
\ No newline at end of file
+Feel free to use as you please, see [{{MIT License}}](./LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_129.RULE b/src/licensedcode/data/rules/mit_129.RULE
index 3972dbb554..7c34ecb35d 100644
--- a/src/licensedcode/data/rules/mit_129.RULE
+++ b/src/licensedcode/data/rules/mit_129.RULE
@@ -9,4 +9,4 @@ ignorable_urls:
- https://angular.io/license
---
-Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license
\ No newline at end of file
+Use of this source code is governed by an {{MIT-style license}} that can be * found in the LICENSE file at https://angular.io/license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1292.RULE b/src/licensedcode/data/rules/mit_1292.RULE
index b94222b1a1..d303fae24e 100644
--- a/src/licensedcode/data/rules/mit_1292.RULE
+++ b/src/licensedcode/data/rules/mit_1292.RULE
@@ -9,5 +9,5 @@ ignorable_urls:
---
// Source: http://opensource.org/
-// This code is distributed under MIT license.
+// This code is {{distributed under MIT license}}.
// See license.txt or http://opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1296.RULE b/src/licensedcode/data/rules/mit_1296.RULE
index 5eb7125a13..f3cf4ecff4 100644
--- a/src/licensedcode/data/rules/mit_1296.RULE
+++ b/src/licensedcode/data/rules/mit_1296.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-# Licensed under the MIT License;
+# {{Licensed under the MIT}} License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
diff --git a/src/licensedcode/data/rules/mit_130.RULE b/src/licensedcode/data/rules/mit_130.RULE
index c92c8262f6..f7610c7bae 100644
--- a/src/licensedcode/data/rules/mit_130.RULE
+++ b/src/licensedcode/data/rules/mit_130.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file
\ No newline at end of file
+Use of this source code is governed by an {{MIT-style license}} that can be * found in the LICENSE file
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1301.RULE b/src/licensedcode/data/rules/mit_1301.RULE
index 093c581932..fe67410183 100644
--- a/src/licensedcode/data/rules/mit_1301.RULE
+++ b/src/licensedcode/data/rules/mit_1301.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_tag: yes
+is_required_phrase: yes
is_continuous: yes
---
diff --git a/src/licensedcode/data/rules/mit_1302.RULE b/src/licensedcode/data/rules/mit_1302.RULE
index 7d7ea4e0bd..5fc649420e 100644
--- a/src/licensedcode/data/rules/mit_1302.RULE
+++ b/src/licensedcode/data/rules/mit_1302.RULE
@@ -5,4 +5,4 @@ referenced_filenames:
- LICENSE
---
-is free software: you can redistribute it and/or modify it under the terms of {{the MIT License}} as published by the Open Source Initiative. See the {{ LICENSE file }} for more details.
\ No newline at end of file
+is free software: you can redistribute it and/or modify it under the terms of {{the MIT License}} as published by the Open Source Initiative. See the LICENSE file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1305.RULE b/src/licensedcode/data/rules/mit_1305.RULE
index 23914dca70..dae356c043 100644
--- a/src/licensedcode/data/rules/mit_1305.RULE
+++ b/src/licensedcode/data/rules/mit_1305.RULE
@@ -5,5 +5,5 @@ referenced_filenames:
- LICENSES/MIT.txt
---
-// This file is Free Software under the MIT License
+// This file is Free Software {{under the MIT License}}
// without warranty, see README.md and LICENSES/MIT.txt for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1308.RULE b/src/licensedcode/data/rules/mit_1308.RULE
index 9a9ee144a0..0824bd5054 100644
--- a/src/licensedcode/data/rules/mit_1308.RULE
+++ b/src/licensedcode/data/rules/mit_1308.RULE
@@ -5,5 +5,5 @@ referenced_filenames:
- LICENSE
---
-All the files in this distribution are covered under either the MIT
-license (see the file LICENSE) except some files mentioned below.
\ No newline at end of file
+All the files in this distribution are covered under either {{the MIT
+license}} (see the file LICENSE) except some files mentioned below.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1314.RULE b/src/licensedcode/data/rules/mit_1314.RULE
index 21298a8c7b..9e64c57109 100644
--- a/src/licensedcode/data/rules/mit_1314.RULE
+++ b/src/licensedcode/data/rules/mit_1314.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/license/mit
---
-The custom code in this repo is governed by [The MIT License](https://opensource.org/license/mit/)
\ No newline at end of file
+The custom code in this repo is governed by [{{The MIT License}}](https://opensource.org/license/mit/)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1315.RULE b/src/licensedcode/data/rules/mit_1315.RULE
index 595b0568c3..c32aee12ce 100644
--- a/src/licensedcode/data/rules/mit_1315.RULE
+++ b/src/licensedcode/data/rules/mit_1315.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/license/mit
---
-governed by [The MIT License](https://opensource.org/license/mit/)
\ No newline at end of file
+governed by [{{The MIT License}}](https://opensource.org/license/mit/)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_1318.RULE b/src/licensedcode/data/rules/mit_1318.RULE
index a89933468a..4cde87fe08 100644
--- a/src/licensedcode/data/rules/mit_1318.RULE
+++ b/src/licensedcode/data/rules/mit_1318.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_tag: yes
+is_required_phrase: yes
is_continuous: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_1319.RULE b/src/licensedcode/data/rules/mit_1319.RULE
index 5ed04d6f2e..0d47949ac0 100644
--- a/src/licensedcode/data/rules/mit_1319.RULE
+++ b/src/licensedcode/data/rules/mit_1319.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- COPYING
---
-released under the MIT license with disclaimer of warranty, included in the COPYING file.
\ No newline at end of file
+released under the {{MIT license with disclaimer}} of warranty, included in the COPYING file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_136.RULE b/src/licensedcode/data/rules/mit_136.RULE
index 1ef86b3883..478235179e 100644
--- a/src/licensedcode/data/rules/mit_136.RULE
+++ b/src/licensedcode/data/rules/mit_136.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-is released under the terms of the MIT license. See [COPYING](COPYING) for more
+is released under the terms of {{the MIT license}}. See [COPYING](COPYING) for more
information or see https://opensource.org/licenses/MIT.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_139.RULE b/src/licensedcode/data/rules/mit_139.RULE
index 9866004ea9..d6d6618432 100644
--- a/src/licensedcode/data/rules/mit_139.RULE
+++ b/src/licensedcode/data/rules/mit_139.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
---
## License
-This library is under the [MIT License](http://opensource.org/licenses/MIT)
\ No newline at end of file
+This library is {{under the [MIT License}}](http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_14.RULE b/src/licensedcode/data/rules/mit_14.RULE
index bdc21ac2e2..427652ef1f 100644
--- a/src/licensedcode/data/rules/mit_14.RULE
+++ b/src/licensedcode/data/rules/mit_14.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
minimum_coverage: 100
---
diff --git a/src/licensedcode/data/rules/mit_142.RULE b/src/licensedcode/data/rules/mit_142.RULE
index 522851684f..d405791ba2 100644
--- a/src/licensedcode/data/rules/mit_142.RULE
+++ b/src/licensedcode/data/rules/mit_142.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-This library is under the [MIT License](http://opensource.org/licenses/MIT)
\ No newline at end of file
+This library is {{under the [MIT License}}](http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_144.RULE b/src/licensedcode/data/rules/mit_144.RULE
index 940aeaef1e..4457fc3b01 100644
--- a/src/licensedcode/data/rules/mit_144.RULE
+++ b/src/licensedcode/data/rules/mit_144.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_148.RULE b/src/licensedcode/data/rules/mit_148.RULE
index 6083abc60d..8c1012b98d 100644
--- a/src/licensedcode/data/rules/mit_148.RULE
+++ b/src/licensedcode/data/rules/mit_148.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
\ No newline at end of file
+It is available {{under the [MIT license}}](http://www.opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_149.RULE b/src/licensedcode/data/rules/mit_149.RULE
index 1e1fd97163..05b0a48dd4 100644
--- a/src/licensedcode/data/rules/mit_149.RULE
+++ b/src/licensedcode/data/rules/mit_149.RULE
@@ -6,8 +6,8 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
+It is available {{under the [MIT license}}](http://www.opensource.org/licenses/mit-license.php).
--
-The MIT License (MIT)
\ No newline at end of file
+{{The MIT License}} (MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_150.RULE b/src/licensedcode/data/rules/mit_150.RULE
index d434660a63..cf9ad65c17 100644
--- a/src/licensedcode/data/rules/mit_150.RULE
+++ b/src/licensedcode/data/rules/mit_150.RULE
@@ -9,8 +9,8 @@ ignorable_urls:
## License
This code is made available under the same license as Bootstrap.
- It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
+ It is available {{under the [MIT license}}](http://www.opensource.org/licenses/mit-license.php).
--
-The MIT License (MIT)
\ No newline at end of file
+{{The MIT License}} (MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_151.RULE b/src/licensedcode/data/rules/mit_151.RULE
index 000b597e96..9a60cd93a7 100644
--- a/src/licensedcode/data/rules/mit_151.RULE
+++ b/src/licensedcode/data/rules/mit_151.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## License
-[MIT License](LICENSE.md)
\ No newline at end of file
+[{{MIT License}}](LICENSE.md)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_153.RULE b/src/licensedcode/data/rules/mit_153.RULE
index 5ede67c3cf..562da2d8bf 100644
--- a/src/licensedcode/data/rules/mit_153.RULE
+++ b/src/licensedcode/data/rules/mit_153.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://choosealicense.com/licenses/mit
---
-License: [`mit`](http://choosealicense.com/licenses/mit/)
\ No newline at end of file
+{{License: [`mit}}`](http://choosealicense.com/licenses/mit/)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_155.RULE b/src/licensedcode/data/rules/mit_155.RULE
index b6988aa25c..9f57843083 100644
--- a/src/licensedcode/data/rules/mit_155.RULE
+++ b/src/licensedcode/data/rules/mit_155.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-is released under the [MIT License](LICENSE.md).
\ No newline at end of file
+is released {{under the [MIT License}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_159.RULE b/src/licensedcode/data/rules/mit_159.RULE
index 1abe5aa960..772cd3dac9 100644
--- a/src/licensedcode/data/rules/mit_159.RULE
+++ b/src/licensedcode/data/rules/mit_159.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-is available under the [MIT license](http://opensource.org/licenses/MIT).
\ No newline at end of file
+is available {{under the [MIT license}}](http://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_160.RULE b/src/licensedcode/data/rules/mit_160.RULE
index 2da9b6eb7d..ab171d583c 100644
--- a/src/licensedcode/data/rules/mit_160.RULE
+++ b/src/licensedcode/data/rules/mit_160.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
## License
-is licensed under the MIT license. (http://opensource.org/licenses/MIT)
\ No newline at end of file
+is {{licensed under the MIT}} license. (http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_161.RULE b/src/licensedcode/data/rules/mit_161.RULE
index 3e1e2e1271..67cc004be9 100644
--- a/src/licensedcode/data/rules/mit_161.RULE
+++ b/src/licensedcode/data/rules/mit_161.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
#### License
-This repository has been released under the [MIT License](LICENSE)
\ No newline at end of file
+This repository has been released {{under the [MIT License}}](LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_162.RULE b/src/licensedcode/data/rules/mit_162.RULE
index 3daa899f8b..9d21371571 100644
--- a/src/licensedcode/data/rules/mit_162.RULE
+++ b/src/licensedcode/data/rules/mit_162.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://en.wikipedia.org/wiki/MIT_License
---
-Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
\ No newline at end of file
+Available for use {{under the [MIT License}}](http://en.wikipedia.org/wiki/MIT_License)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_167.RULE b/src/licensedcode/data/rules/mit_167.RULE
index e36cb3075b..c11dc6fdba 100644
--- a/src/licensedcode/data/rules/mit_167.RULE
+++ b/src/licensedcode/data/rules/mit_167.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-is licensed under the [MIT License](https://opensource.org/licenses/MIT).
\ No newline at end of file
+is {{licensed under the [MIT}} License](https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_168.RULE b/src/licensedcode/data/rules/mit_168.RULE
index b9eff152bc..96ff624dda 100644
--- a/src/licensedcode/data/rules/mit_168.RULE
+++ b/src/licensedcode/data/rules/mit_168.RULE
@@ -9,4 +9,4 @@ referenced_filenames:
License
-------
-Composer is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
\ No newline at end of file
+Composer is {{licensed under the MIT}} License - see the [LICENSE](LICENSE) file for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_168_1.RULE b/src/licensedcode/data/rules/mit_168_1.RULE
index 812aea3661..162c42f51c 100644
--- a/src/licensedcode/data/rules/mit_168_1.RULE
+++ b/src/licensedcode/data/rules/mit_168_1.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-licensed under the MIT License - see the [LICENSE](LICENSE) file for details
\ No newline at end of file
+{{licensed under the MIT}} License - see the [LICENSE](LICENSE) file for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_169.RULE b/src/licensedcode/data/rules/mit_169.RULE
index 9092eefb7e..5686c9c7d2 100644
--- a/src/licensedcode/data/rules/mit_169.RULE
+++ b/src/licensedcode/data/rules/mit_169.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.TXT
---
-is licensed under the [MIT license](LICENSE.TXT).
\ No newline at end of file
+is {{licensed under the [MIT}} license](LICENSE.TXT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_170.RULE b/src/licensedcode/data/rules/mit_170.RULE
index 0c51a20fca..5db7700640 100644
--- a/src/licensedcode/data/rules/mit_170.RULE
+++ b/src/licensedcode/data/rules/mit_170.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- MIT-LICENSE
---
-uses the MIT license. Please check the MIT-LICENSE file for more details.
\ No newline at end of file
+uses {{the MIT license}}. Please check the MIT-LICENSE file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_172.RULE b/src/licensedcode/data/rules/mit_172.RULE
index 2dd3653230..fe5fa663de 100644
--- a/src/licensedcode/data/rules/mit_172.RULE
+++ b/src/licensedcode/data/rules/mit_172.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_notice: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_175.RULE b/src/licensedcode/data/rules/mit_175.RULE
index d85f708a5b..93c2de2bc0 100644
--- a/src/licensedcode/data/rules/mit_175.RULE
+++ b/src/licensedcode/data/rules/mit_175.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
License
---
-Open source licensed under the [MIT License](https://opensource.org/licenses/MIT).
\ No newline at end of file
+Open source {{licensed under the [MIT}} License](https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_178.RULE b/src/licensedcode/data/rules/mit_178.RULE
index 6b1d578235..91af0e4a69 100644
--- a/src/licensedcode/data/rules/mit_178.RULE
+++ b/src/licensedcode/data/rules/mit_178.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-is released under the MIT License, as described at http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
+is released {{under the MIT License}}, as described at http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_179.RULE b/src/licensedcode/data/rules/mit_179.RULE
index a3570adfb5..afd3cc4741 100644
--- a/src/licensedcode/data/rules/mit_179.RULE
+++ b/src/licensedcode/data/rules/mit_179.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://github.com/twbs/bootstrap/blob/master/LICENSE
---
-Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
\ No newline at end of file
+{{Licensed under MIT}} (https://github.com/twbs/bootstrap/blob/master/LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_183.RULE b/src/licensedcode/data/rules/mit_183.RULE
index 3921ac09e2..ca74f8c681 100644
--- a/src/licensedcode/data/rules/mit_183.RULE
+++ b/src/licensedcode/data/rules/mit_183.RULE
@@ -6,6 +6,6 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-## License
+## {{License
-[MIT](http://opensource.org/licenses/MIT)
\ No newline at end of file
+[MIT}}](http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_185.RULE b/src/licensedcode/data/rules/mit_185.RULE
index 0da098127b..49af106e57 100644
--- a/src/licensedcode/data/rules/mit_185.RULE
+++ b/src/licensedcode/data/rules/mit_185.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-License: MIT (http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file
+{{License: MIT}} (http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_187.RULE b/src/licensedcode/data/rules/mit_187.RULE
index bafb95fc3e..1d5dc8da87 100644
--- a/src/licensedcode/data/rules/mit_187.RULE
+++ b/src/licensedcode/data/rules/mit_187.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- License.txt
---
-Licensed under the MIT License. See License.txt in the project root for license information.
\ No newline at end of file
+{{Licensed under the MIT}} License. See License.txt in the project root for license information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_189.RULE b/src/licensedcode/data/rules/mit_189.RULE
index 006ae3bd8f..850eb970a4 100644
--- a/src/licensedcode/data/rules/mit_189.RULE
+++ b/src/licensedcode/data/rules/mit_189.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-// Licensed under the MIT license. See LICENSE file in the project root for details.
\ No newline at end of file
+// {{Licensed under the MIT}} license. See LICENSE file in the project root for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_192.RULE b/src/licensedcode/data/rules/mit_192.RULE
index 09be6c90d2..ebc1d45535 100644
--- a/src/licensedcode/data/rules/mit_192.RULE
+++ b/src/licensedcode/data/rules/mit_192.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-* Licensed under the MIT License. See LICENSE in the project root for license information.
\ No newline at end of file
+* {{Licensed under the MIT}} License. See LICENSE in the project root for license information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_193.RULE b/src/licensedcode/data/rules/mit_193.RULE
index 3e1c85b45d..deea65081e 100644
--- a/src/licensedcode/data/rules/mit_193.RULE
+++ b/src/licensedcode/data/rules/mit_193.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Licensed under the MIT license. See LICENSE file in the project root for full license information.
\ No newline at end of file
+{{Licensed under the MIT}} license. See LICENSE file in the project root for full license information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_194.RULE b/src/licensedcode/data/rules/mit_194.RULE
index 70aa9d9c80..f92a98eba4 100644
--- a/src/licensedcode/data/rules/mit_194.RULE
+++ b/src/licensedcode/data/rules/mit_194.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
\ No newline at end of file
+{{Licensed under the MIT}} license. See LICENSE.txt file in the project root for full license information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_195.RULE b/src/licensedcode/data/rules/mit_195.RULE
index c368c3008d..87e227c8cb 100644
--- a/src/licensedcode/data/rules/mit_195.RULE
+++ b/src/licensedcode/data/rules/mit_195.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-licenses this file to you under the MIT license. See the LICENSE file in the project root for more information.
\ No newline at end of file
+licenses this file to you {{under the MIT license}}. See the LICENSE file in the project root for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_196.RULE b/src/licensedcode/data/rules/mit_196.RULE
index af4b084dcc..1d34e15b00 100644
--- a/src/licensedcode/data/rules/mit_196.RULE
+++ b/src/licensedcode/data/rules/mit_196.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
---
// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
+// The .NET Foundation licenses this file to you {{under the MIT license}}.
// See the LICENSE file in the project root for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_197.RULE b/src/licensedcode/data/rules/mit_197.RULE
index 2370b0d24f..0092ce99a8 100644
--- a/src/licensedcode/data/rules/mit_197.RULE
+++ b/src/licensedcode/data/rules/mit_197.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- License.txt
---
-This project is subject to the MIT License. A copy of this license can be found in [License.txt](License.txt) at the root of this repo.
\ No newline at end of file
+This project is subject to {{the MIT License}}. A copy of this license can be found in [License.txt](License.txt) at the root of this repo.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_198.RULE b/src/licensedcode/data/rules/mit_198.RULE
index 06cafdb18f..9bfe6619e7 100644
--- a/src/licensedcode/data/rules/mit_198.RULE
+++ b/src/licensedcode/data/rules/mit_198.RULE
@@ -5,7 +5,7 @@ ignorable_urls:
- https://github.com/Microsoft/visualfsharp/blob/master/License.txt
---
-Licensed under the MIT License (the "License"); you
+{{Licensed under the MIT}} License (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at
diff --git a/src/licensedcode/data/rules/mit_202.RULE b/src/licensedcode/data/rules/mit_202.RULE
index abad35d946..21a21d5c45 100644
--- a/src/licensedcode/data/rules/mit_202.RULE
+++ b/src/licensedcode/data/rules/mit_202.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- license.txt
---
-Yes, it is free under MIT license. It can be used in commercial applications. Please check the details in [license.txt]
\ No newline at end of file
+Yes, it is free {{under MIT license}}. It can be used in commercial applications. Please check the details in [license.txt]
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_206.RULE b/src/licensedcode/data/rules/mit_206.RULE
index 5b99a72868..03132d8075 100644
--- a/src/licensedcode/data/rules/mit_206.RULE
+++ b/src/licensedcode/data/rules/mit_206.RULE
@@ -5,5 +5,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-This project bundles the following dependencies under the MIT license. (https://opensource.org/licenses/MIT)
+This project bundles the following dependencies {{under the MIT license}}. (https://opensource.org/licenses/MIT)
See bundled license files for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_207.RULE b/src/licensedcode/data/rules/mit_207.RULE
index b7d2d91a5f..63e3d94e52 100644
--- a/src/licensedcode/data/rules/mit_207.RULE
+++ b/src/licensedcode/data/rules/mit_207.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project is licenced under the MIT license, see LICENSE for details.
\ No newline at end of file
+This project is licenced {{under the MIT license}}, see LICENSE for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_208.RULE b/src/licensedcode/data/rules/mit_208.RULE
index c6b8f269bb..51845c50d0 100644
--- a/src/licensedcode/data/rules/mit_208.RULE
+++ b/src/licensedcode/data/rules/mit_208.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project is licensed under the MIT license, see LICENSE for details.
\ No newline at end of file
+This project is {{licensed under the MIT}} license, see LICENSE for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_209.RULE b/src/licensedcode/data/rules/mit_209.RULE
index 6b956ecb5e..78a59331ca 100644
--- a/src/licensedcode/data/rules/mit_209.RULE
+++ b/src/licensedcode/data/rules/mit_209.RULE
@@ -7,10 +7,10 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-# This program is distributed under the terms of the MIT License as found
+# This program is distributed under the terms of {{the MIT License}} as found
# in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.org/licenses/mit-license.php.
#
# This program is distributed in the hope that it will be useful, but
# without any warrenty; without even the implied warranty of merchantability
-# or fitness for a particular purpose. See the MIT License for full details.
\ No newline at end of file
+# or fitness for a particular purpose. See {{the MIT License}} for full details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_211.RULE b/src/licensedcode/data/rules/mit_211.RULE
index ff7fb32b78..d9f1884f68 100644
--- a/src/licensedcode/data/rules/mit_211.RULE
+++ b/src/licensedcode/data/rules/mit_211.RULE
@@ -7,6 +7,6 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-# This program is distributed under the terms of the MIT License as found
+# This program is distributed under the terms of {{the MIT License}} as found
# in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_213.RULE b/src/licensedcode/data/rules/mit_213.RULE
index 7964d17770..3e4e75bf8b 100644
--- a/src/licensedcode/data/rules/mit_213.RULE
+++ b/src/licensedcode/data/rules/mit_213.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-* Licensed under the MIT:
+* {{Licensed under the MIT}}:
* http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_214.RULE b/src/licensedcode/data/rules/mit_214.RULE
index 5f16e5a247..6e09568de4 100644
--- a/src/licensedcode/data/rules/mit_214.RULE
+++ b/src/licensedcode/data/rules/mit_214.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.php
---
-* Licensed under the MIT:
+* {{Licensed under the MIT}}:
* https://opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_215.RULE b/src/licensedcode/data/rules/mit_215.RULE
index 210fca25c8..beeb0e6f97 100644
--- a/src/licensedcode/data/rules/mit_215.RULE
+++ b/src/licensedcode/data/rules/mit_215.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-All the files in this distribution are covered under either the MIT
-license (see the file LICENSE)
\ No newline at end of file
+All the files in this distribution are covered under either {{the MIT
+license}} (see the file LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_217.RULE b/src/licensedcode/data/rules/mit_217.RULE
index 8fca464dbe..33cafebf6f 100644
--- a/src/licensedcode/data/rules/mit_217.RULE
+++ b/src/licensedcode/data/rules/mit_217.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-// Released as open source under the MIT License. See LICENSE file.
\ No newline at end of file
+// Released as open source {{under the MIT License}}. See LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_218.RULE b/src/licensedcode/data/rules/mit_218.RULE
index 17456d024c..8f9ff284f8 100644
--- a/src/licensedcode/data/rules/mit_218.RULE
+++ b/src/licensedcode/data/rules/mit_218.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-is licensed under the MIT license. Check the LICENSE file for details.
\ No newline at end of file
+is {{licensed under the MIT}} license. Check the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_233.RULE b/src/licensedcode/data/rules/mit_233.RULE
index f47782ecbe..1c33e27f48 100644
--- a/src/licensedcode/data/rules/mit_233.RULE
+++ b/src/licensedcode/data/rules/mit_233.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://github.com/hector/hector-client/wiki/License
---
-License: MIT License (https://github.com/hector/hector-client/wiki/License
\ No newline at end of file
+License: {{MIT License}} (https://github.com/hector/hector-client/wiki/License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_234.RULE b/src/licensedcode/data/rules/mit_234.RULE
index cf064c378b..f2d71c74ee 100644
--- a/src/licensedcode/data/rules/mit_234.RULE
+++ b/src/licensedcode/data/rules/mit_234.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://raw.githubusercontent.com/irmen/Pyrolite/master/LICENSE
---
-License: MIT License (https://raw.githubusercontent.com/irmen/Pyrolite/master/LICENSE
\ No newline at end of file
+License: {{MIT License}} (https://raw.githubusercontent.com/irmen/Pyrolite/master/LICENSE
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_235.RULE b/src/licensedcode/data/rules/mit_235.RULE
index 2fcbbd784c..e3dc0a6a41 100644
--- a/src/licensedcode/data/rules/mit_235.RULE
+++ b/src/licensedcode/data/rules/mit_235.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-License: The MIT License (http://opensource.org/licenses/MIT
\ No newline at end of file
+License: {{The MIT License}} (http://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_237.RULE b/src/licensedcode/data/rules/mit_237.RULE
index 42b08827f1..78be01150b 100644
--- a/src/licensedcode/data/rules/mit_237.RULE
+++ b/src/licensedcode/data/rules/mit_237.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
diff --git a/src/licensedcode/data/rules/mit_243.RULE b/src/licensedcode/data/rules/mit_243.RULE
index 073c525e00..905cc28b05 100644
--- a/src/licensedcode/data/rules/mit_243.RULE
+++ b/src/licensedcode/data/rules/mit_243.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.html
---
-files are licensed under MIT License -
+files are {{licensed under MIT}} License -
* http://opensource.org/licenses/mit-license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_246.RULE b/src/licensedcode/data/rules/mit_246.RULE
index 2cbfdb20ae..0bf14bdfa3 100644
--- a/src/licensedcode/data/rules/mit_246.RULE
+++ b/src/licensedcode/data/rules/mit_246.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-You are free to use this code under the MIT license:
+You are free to use this code {{under the MIT license}}:
http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_249.RULE b/src/licensedcode/data/rules/mit_249.RULE
index 46b60dda43..9b78c3d9e0 100644
--- a/src/licensedcode/data/rules/mit_249.RULE
+++ b/src/licensedcode/data/rules/mit_249.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-licensed under the MIT license. (http://opensource.org/licenses/MIT)
\ No newline at end of file
+{{licensed under the MIT}} license. (http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_253.RULE b/src/licensedcode/data/rules/mit_253.RULE
index e9d822f889..aa55cf9395 100644
--- a/src/licensedcode/data/rules/mit_253.RULE
+++ b/src/licensedcode/data/rules/mit_253.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-// Use of this source code is governed by a MIT style
-// license that can be found in the LICENSE file.
\ No newline at end of file
+// Use of this source code is governed by a {{MIT style
+// license}} that can be found in the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_254.RULE b/src/licensedcode/data/rules/mit_254.RULE
index f822e17532..b48ed2eda1 100644
--- a/src/licensedcode/data/rules/mit_254.RULE
+++ b/src/licensedcode/data/rules/mit_254.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-[MIT License]: LICENSE.txt
\ No newline at end of file
+[{{MIT License}}]: LICENSE.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_255.RULE b/src/licensedcode/data/rules/mit_255.RULE
index 7a4d415f0b..f3be76c372 100644
--- a/src/licensedcode/data/rules/mit_255.RULE
+++ b/src/licensedcode/data/rules/mit_255.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE.txt
---
-Released under the [MIT License].
+Released {{under the [MIT License}}].
-[MIT License]: LICENSE.txt
\ No newline at end of file
+[{{MIT License}}]: LICENSE.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_256.RULE b/src/licensedcode/data/rules/mit_256.RULE
index cc127d9cc1..9eaac0f868 100644
--- a/src/licensedcode/data/rules/mit_256.RULE
+++ b/src/licensedcode/data/rules/mit_256.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-Released under the [MIT License](LICENSE.txt).
\ No newline at end of file
+Released {{under the [MIT License}}](LICENSE.txt).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_257.RULE b/src/licensedcode/data/rules/mit_257.RULE
index 31effab607..8543f164ff 100644
--- a/src/licensedcode/data/rules/mit_257.RULE
+++ b/src/licensedcode/data/rules/mit_257.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
## License
-The MIT License (MIT). Read [LICENSE](LICENSE).
\ No newline at end of file
+{{The MIT License}} (MIT). Read [LICENSE](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_261.RULE b/src/licensedcode/data/rules/mit_261.RULE
index ee111d5f04..74de1778f9 100644
--- a/src/licensedcode/data/rules/mit_261.RULE
+++ b/src/licensedcode/data/rules/mit_261.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_notice: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_264.RULE b/src/licensedcode/data/rules/mit_264.RULE
index 7d03d1d26a..6888976eeb 100644
--- a/src/licensedcode/data/rules/mit_264.RULE
+++ b/src/licensedcode/data/rules/mit_264.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-// Use of this source code is governed by the MIT
-// license which can be found in the LICENSE file.
\ No newline at end of file
+// Use of this source code is governed by {{the MIT
+// license}} which can be found in the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_267.RULE b/src/licensedcode/data/rules/mit_267.RULE
index c7b1a51720..2cf3a5dbec 100644
--- a/src/licensedcode/data/rules/mit_267.RULE
+++ b/src/licensedcode/data/rules/mit_267.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE
---
-## License
+## {{License
-MIT -- see `LICENSE` for more information.
\ No newline at end of file
+MIT}} -- see `LICENSE` for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_268.RULE b/src/licensedcode/data/rules/mit_268.RULE
index 8f2081bb82..0bd0e34f9d 100644
--- a/src/licensedcode/data/rules/mit_268.RULE
+++ b/src/licensedcode/data/rules/mit_268.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+is released {{under
+# the MIT License}}: http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_269.RULE b/src/licensedcode/data/rules/mit_269.RULE
index 9489489e2e..dfded6f89a 100644
--- a/src/licensedcode/data/rules/mit_269.RULE
+++ b/src/licensedcode/data/rules/mit_269.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_notice: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_27.RULE b/src/licensedcode/data/rules/mit_27.RULE
index 2db99c715d..e667bf64b7 100644
--- a/src/licensedcode/data/rules/mit_27.RULE
+++ b/src/licensedcode/data/rules/mit_27.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_28.RULE b/src/licensedcode/data/rules/mit_28.RULE
index 2ae308c7b5..c214c19d0c 100644
--- a/src/licensedcode/data/rules/mit_28.RULE
+++ b/src/licensedcode/data/rules/mit_28.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-The MIT License (http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file
+{{The MIT License}} (http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_30.RULE b/src/licensedcode/data/rules/mit_30.RULE
index da2ec700d9..22843f3f3f 100644
--- a/src/licensedcode/data/rules/mit_30.RULE
+++ b/src/licensedcode/data/rules/mit_30.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_tag: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_306.RULE b/src/licensedcode/data/rules/mit_306.RULE
index 2a82fd7f82..a56011397f 100644
--- a/src/licensedcode/data/rules/mit_306.RULE
+++ b/src/licensedcode/data/rules/mit_306.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-The distribution is licensed under the MIT License (http://opensource.org/licenses/mit-license.php).
+The distribution is {{licensed under the MIT}} License (http://opensource.org/licenses/mit-license.php).
mozilla
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_32.RULE b/src/licensedcode/data/rules/mit_32.RULE
index 295d1e8792..56ea60aa2a 100644
--- a/src/licensedcode/data/rules/mit_32.RULE
+++ b/src/licensedcode/data/rules/mit_32.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
---
* This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See LICENSE for details.
\ No newline at end of file
+ * it under the terms of {{the MIT license}}. See LICENSE for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_320.RULE b/src/licensedcode/data/rules/mit_320.RULE
index 4dfa670ede..5faf4085ab 100644
--- a/src/licensedcode/data/rules/mit_320.RULE
+++ b/src/licensedcode/data/rules/mit_320.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://gomakethings.com/mit/
---
-Licensed under MIT: http://gomakethings.com/mit/
\ No newline at end of file
+{{Licensed under MIT}}: http://gomakethings.com/mit/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_323.RULE b/src/licensedcode/data/rules/mit_323.RULE
index 0bff0545df..1bf4e923d7 100644
--- a/src/licensedcode/data/rules/mit_323.RULE
+++ b/src/licensedcode/data/rules/mit_323.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.php
---
-MIT License - https://opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{MIT License}} - https://opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_324.RULE b/src/licensedcode/data/rules/mit_324.RULE
index 8c1962a33b..afd5607769 100644
--- a/src/licensedcode/data/rules/mit_324.RULE
+++ b/src/licensedcode/data/rules/mit_324.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-MIT License - http://opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{MIT License}} - http://opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_325.RULE b/src/licensedcode/data/rules/mit_325.RULE
index e1c6ee3ef8..1e1766ee52 100644
--- a/src/licensedcode/data/rules/mit_325.RULE
+++ b/src/licensedcode/data/rules/mit_325.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-* The MIT License
+* {{The MIT License}}
http://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_326.RULE b/src/licensedcode/data/rules/mit_326.RULE
index 7b1ef283ac..d85f775051 100644
--- a/src/licensedcode/data/rules/mit_326.RULE
+++ b/src/licensedcode/data/rules/mit_326.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-* The MIT License
+* {{The MIT License}}
https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_330.RULE b/src/licensedcode/data/rules/mit_330.RULE
index 4c4f80e18d..cf5a16687f 100644
--- a/src/licensedcode/data/rules/mit_330.RULE
+++ b/src/licensedcode/data/rules/mit_330.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
- http://appsattic.mit-license.org/2012/
---
-# License #
-MIT: [http://appsattic.mit-license.org/2012/](http://appsattic.mit-license.org/2012/)
\ No newline at end of file
+# {{License #
+MIT}}: [http://appsattic.mit-license.org/2012/](http://appsattic.mit-license.org/2012/)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_331.RULE b/src/licensedcode/data/rules/mit_331.RULE
index c8bc59c348..9a09439bfd 100644
--- a/src/licensedcode/data/rules/mit_331.RULE
+++ b/src/licensedcode/data/rules/mit_331.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://appsattic.mit-license.org/2012/
---
-License
-MIT: http://appsattic.mit-license.org/2012/
\ No newline at end of file
+{{License
+MIT}}: http://appsattic.mit-license.org/2012/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_333.RULE b/src/licensedcode/data/rules/mit_333.RULE
index 4d0d5ffeb7..5a9ca14fd1 100644
--- a/src/licensedcode/data/rules/mit_333.RULE
+++ b/src/licensedcode/data/rules/mit_333.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://appsattic.mit-license.org/2012/
---
-This software is published under the MIT license as published here:
+This software is published {{under the MIT license}} as published here:
* http://appsattic.mit-license.org/2012/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_334.RULE b/src/licensedcode/data/rules/mit_334.RULE
index 390316fcb1..23d3bad87d 100644
--- a/src/licensedcode/data/rules/mit_334.RULE
+++ b/src/licensedcode/data/rules/mit_334.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This software is released under the MIT software license.
+This software is released under the {{MIT software license}}.
This license, including disclaimer, is available in the 'LICENSE' file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_337.RULE b/src/licensedcode/data/rules/mit_337.RULE
index d1a902255a..e3249d273e 100644
--- a/src/licensedcode/data/rules/mit_337.RULE
+++ b/src/licensedcode/data/rules/mit_337.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-This is the http://www.opensource.org/licenses/mit-license.php MIT Software License
+This is the http://www.opensource.org/licenses/mit-license.php {{MIT Software License}}
which is OSI-certified, and GPL-compatible.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_339.RULE b/src/licensedcode/data/rules/mit_339.RULE
index 20c21760d9..c35d107416 100644
--- a/src/licensedcode/data/rules/mit_339.RULE
+++ b/src/licensedcode/data/rules/mit_339.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
## License
-The app is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
\ No newline at end of file
+The app is available as open source under the terms of {{the [MIT License}}](https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_34.RULE b/src/licensedcode/data/rules/mit_34.RULE
index 5a61f10c32..6341265a8b 100644
--- a/src/licensedcode/data/rules/mit_34.RULE
+++ b/src/licensedcode/data/rules/mit_34.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Distributed under MIT license.
+{{Distributed under MIT license}}.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_341.RULE b/src/licensedcode/data/rules/mit_341.RULE
index 1afbe293ca..71d70cead5 100644
--- a/src/licensedcode/data/rules/mit_341.RULE
+++ b/src/licensedcode/data/rules/mit_341.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE.txt
---
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE.txt file.
\ No newline at end of file
+// Use of this source code is governed by an {{MIT-style
+// license}} that can be found in the LICENSE.txt file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_342.RULE b/src/licensedcode/data/rules/mit_342.RULE
index e4c851de69..6123968686 100644
--- a/src/licensedcode/data/rules/mit_342.RULE
+++ b/src/licensedcode/data/rules/mit_342.RULE
@@ -9,4 +9,4 @@ ignorable_urls:
---
License
-This library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE.txt for more information.
\ No newline at end of file
+This library is {{distributed under the [MIT License}}](https://opensource.org/licenses/MIT), see LICENSE.txt for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_348.RULE b/src/licensedcode/data/rules/mit_348.RULE
index 686255ea8c..a08b5da80e 100644
--- a/src/licensedcode/data/rules/mit_348.RULE
+++ b/src/licensedcode/data/rules/mit_348.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project is licensed under the terms of the MIT license. See the LICENSE file.
\ No newline at end of file
+This project is licensed under the terms of {{the MIT license}}. See the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_352.RULE b/src/licensedcode/data/rules/mit_352.RULE
index d2b1a4b3e4..fbcde98f3f 100644
--- a/src/licensedcode/data/rules/mit_352.RULE
+++ b/src/licensedcode/data/rules/mit_352.RULE
@@ -8,6 +8,6 @@ referenced_filenames:
## License
-This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file.
+This project is licensed under the terms of {{the MIT license}}. See the [LICENSE](LICENSE) file.
-> This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.
\ No newline at end of file
+> This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source {{under the MIT license}}, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_353.RULE b/src/licensedcode/data/rules/mit_353.RULE
index 9536df9069..a7572c5e65 100644
--- a/src/licensedcode/data/rules/mit_353.RULE
+++ b/src/licensedcode/data/rules/mit_353.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file.
\ No newline at end of file
+This project is licensed under the terms of {{the MIT license}}. See the [LICENSE](LICENSE) file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_355.RULE b/src/licensedcode/data/rules/mit_355.RULE
index 6ac6938649..d2687d4b6e 100644
--- a/src/licensedcode/data/rules/mit_355.RULE
+++ b/src/licensedcode/data/rules/mit_355.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
---
SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG
-Font-Awesome-SVG-PNG is licensed under the MIT license (see file license
+Font-Awesome-SVG-PNG is {{licensed under the MIT}} license (see file license
in current folder).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_356.RULE b/src/licensedcode/data/rules/mit_356.RULE
index 1c64f9c70b..7c7cb7663d 100644
--- a/src/licensedcode/data/rules/mit_356.RULE
+++ b/src/licensedcode/data/rules/mit_356.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://en.wikipedia.org/wiki/MIT_License
---
-MIT License: https://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
+{{MIT License}}: https://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_357.RULE b/src/licensedcode/data/rules/mit_357.RULE
index 485b9f60ba..132a69f287 100644
--- a/src/licensedcode/data/rules/mit_357.RULE
+++ b/src/licensedcode/data/rules/mit_357.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://en.wikipedia.org/wiki/MIT_License
---
-MIT License: http://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
+{{MIT License}}: http://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_362.RULE b/src/licensedcode/data/rules/mit_362.RULE
index 6ec7f4e6cc..2e75df0cd9 100644
--- a/src/licensedcode/data/rules/mit_362.RULE
+++ b/src/licensedcode/data/rules/mit_362.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://jquery.org/license/
---
-MIT license
+{{MIT license}}
https://jquery.org/license/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_363.RULE b/src/licensedcode/data/rules/mit_363.RULE
index 975e617671..db3d9a3daf 100644
--- a/src/licensedcode/data/rules/mit_363.RULE
+++ b/src/licensedcode/data/rules/mit_363.RULE
@@ -8,7 +8,7 @@ ignorable_urls:
- https://tldrlegal.com/license/mit-license
---
-MIT license
+{{MIT license}}
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
diff --git a/src/licensedcode/data/rules/mit_369.RULE b/src/licensedcode/data/rules/mit_369.RULE
index 52d024626d..3ce8b0613d 100644
--- a/src/licensedcode/data/rules/mit_369.RULE
+++ b/src/licensedcode/data/rules/mit_369.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://github.com/geertw/php-ip-anonymizer
---
-Modified from https://github.com/geertw/php-ip-anonymizer, MIT license.
\ No newline at end of file
+Modified from https://github.com/geertw/php-ip-anonymizer, {{MIT license}}.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_370.RULE b/src/licensedcode/data/rules/mit_370.RULE
index 36178b8ec7..7d435cdcad 100644
--- a/src/licensedcode/data/rules/mit_370.RULE
+++ b/src/licensedcode/data/rules/mit_370.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-Licensed under the MIT license
+{{Licensed under the MIT}} license
http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_371.RULE b/src/licensedcode/data/rules/mit_371.RULE
index 9b4c6c3321..f0b2fc82fb 100644
--- a/src/licensedcode/data/rules/mit_371.RULE
+++ b/src/licensedcode/data/rules/mit_371.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-Licensed under the MIT license
+{{Licensed under the MIT}} license
https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_373.RULE b/src/licensedcode/data/rules/mit_373.RULE
index 61741d5983..6f86fe8f2b 100644
--- a/src/licensedcode/data/rules/mit_373.RULE
+++ b/src/licensedcode/data/rules/mit_373.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-released under the MIT License
\ No newline at end of file
+released {{under the MIT License}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_374.RULE b/src/licensedcode/data/rules/mit_374.RULE
index 177290e89b..00d20f548e 100644
--- a/src/licensedcode/data/rules/mit_374.RULE
+++ b/src/licensedcode/data/rules/mit_374.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-is released under the MIT License
\ No newline at end of file
+is released {{under the MIT License}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_375.RULE b/src/licensedcode/data/rules/mit_375.RULE
index f53723d4a0..71e3453932 100644
--- a/src/licensedcode/data/rules/mit_375.RULE
+++ b/src/licensedcode/data/rules/mit_375.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.php
---
-released under the MIT License
\ No newline at end of file
+released {{under the MIT License}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_38.RULE b/src/licensedcode/data/rules/mit_38.RULE
index 954e233c3a..390374cd85 100644
--- a/src/licensedcode/data/rules/mit_38.RULE
+++ b/src/licensedcode/data/rules/mit_38.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
minimum_coverage: 100
---
diff --git a/src/licensedcode/data/rules/mit_386.RULE b/src/licensedcode/data/rules/mit_386.RULE
index eb97a70258..5b497dc334 100644
--- a/src/licensedcode/data/rules/mit_386.RULE
+++ b/src/licensedcode/data/rules/mit_386.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- FindCUDA.cmake
---
-This code is licensed under the MIT License. See the FindCUDA.cmake script
+This code is {{licensed under the MIT}} License. See the FindCUDA.cmake script
for the text of the license.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_389.RULE b/src/licensedcode/data/rules/mit_389.RULE
index ae7458bc44..62ebea819c 100644
--- a/src/licensedcode/data/rules/mit_389.RULE
+++ b/src/licensedcode/data/rules/mit_389.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-License
-MIT licensed. https://opensource.org/licenses/MIT
\ No newline at end of file
+{{License
+MIT}} licensed. https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_390.RULE b/src/licensedcode/data/rules/mit_390.RULE
index c7ea73afb5..6be6c19b19 100644
--- a/src/licensedcode/data/rules/mit_390.RULE
+++ b/src/licensedcode/data/rules/mit_390.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE
---
-License
+{{License
-MIT licensed. See the bundled LICENSE file for more details.
\ No newline at end of file
+MIT}} licensed. See the bundled LICENSE file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_392.RULE b/src/licensedcode/data/rules/mit_392.RULE
index bbfcd57def..3a3ec354e0 100644
--- a/src/licensedcode/data/rules/mit_392.RULE
+++ b/src/licensedcode/data/rules/mit_392.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-"Distributed under the MIT software license, see the accompanying file COPYING or
+"Distributed under the {{MIT software license}}, see the accompanying file COPYING or
http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_393.RULE b/src/licensedcode/data/rules/mit_393.RULE
index be538fe026..93e96d235e 100644
--- a/src/licensedcode/data/rules/mit_393.RULE
+++ b/src/licensedcode/data/rules/mit_393.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-"Distributed under the MIT license, see the accompanying file COPYING or
+"{{Distributed under the MIT license}}, see the accompanying file COPYING or
http://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_394.RULE b/src/licensedcode/data/rules/mit_394.RULE
index 6edc927963..fb1fc64e6f 100644
--- a/src/licensedcode/data/rules/mit_394.RULE
+++ b/src/licensedcode/data/rules/mit_394.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Released under the MIT license. See the LICENSE file for details.
\ No newline at end of file
+Released {{under the MIT license}}. See the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_396.RULE b/src/licensedcode/data/rules/mit_396.RULE
index b4b8c0c880..82a0008f29 100644
--- a/src/licensedcode/data/rules/mit_396.RULE
+++ b/src/licensedcode/data/rules/mit_396.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- COPYING
---
-// Distributed under the MIT software license, see the accompanying
+// Distributed under the {{MIT software license}}, see the accompanying
// file COPYING
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_397.RULE b/src/licensedcode/data/rules/mit_397.RULE
index dbf533d09b..2e78ea0e5e 100644
--- a/src/licensedcode/data/rules/mit_397.RULE
+++ b/src/licensedcode/data/rules/mit_397.RULE
@@ -5,8 +5,8 @@ relevance: 100
referenced_filenames:
- COPYING
ignorable_urls:
- - http://www.opensource.org/licenses/mit-license.php
+ - https://www.opensource.org/licenses/mit-license.php
---
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or shttp://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
+// Distributed under the {{MIT software license}}, see the accompanying
+// file COPYING or https://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_399.RULE b/src/licensedcode/data/rules/mit_399.RULE
index 67645d3f5d..28b1599959 100644
--- a/src/licensedcode/data/rules/mit_399.RULE
+++ b/src/licensedcode/data/rules/mit_399.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-The MIT License: https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{The MIT License}}: https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_400.RULE b/src/licensedcode/data/rules/mit_400.RULE
index 6c196ac4bd..6939adbdf4 100644
--- a/src/licensedcode/data/rules/mit_400.RULE
+++ b/src/licensedcode/data/rules/mit_400.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://creativecommons.org/licenses/MIT/
---
-MIT License (MIT)
+{{MIT License (MIT}})
link: http://creativecommons.org/licenses/MIT/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_401.RULE b/src/licensedcode/data/rules/mit_401.RULE
index b5672ca0ff..3a8da0a729 100644
--- a/src/licensedcode/data/rules/mit_401.RULE
+++ b/src/licensedcode/data/rules/mit_401.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://neekware.com/license/MIT.html
---
-* Use of this source code is governed by an MIT-style license that can be
+* Use of this source code is governed by an {{MIT-style license}} that can be
* found in the LICENSE file at http://neekware.com/license/MIT.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_402.RULE b/src/licensedcode/data/rules/mit_402.RULE
index 819f3d38c8..bf28072212 100644
--- a/src/licensedcode/data/rules/mit_402.RULE
+++ b/src/licensedcode/data/rules/mit_402.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-This library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE.txt for more information.
\ No newline at end of file
+This library is {{distributed under the [MIT License}}](https://opensource.org/licenses/MIT), see LICENSE.txt for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_403.RULE b/src/licensedcode/data/rules/mit_403.RULE
index 8e85d5c10f..a03d2f4323 100644
--- a/src/licensedcode/data/rules/mit_403.RULE
+++ b/src/licensedcode/data/rules/mit_403.RULE
@@ -6,6 +6,6 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Use of this source code is governed by an MIT-style
-license that can be found in the LICENSE file or at
+Use of this source code is governed by an {{MIT-style
+license}} that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_404.RULE b/src/licensedcode/data/rules/mit_404.RULE
index 448bb5228d..184fd443f1 100644
--- a/src/licensedcode/data/rules/mit_404.RULE
+++ b/src/licensedcode/data/rules/mit_404.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-This library is distributed under the MIT License, see LICENSE.txt for more information.
\ No newline at end of file
+This library is {{distributed under the MIT License}}, see LICENSE.txt for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_405.RULE b/src/licensedcode/data/rules/mit_405.RULE
index 78edc03d3d..8e75180a38 100644
--- a/src/licensedcode/data/rules/mit_405.RULE
+++ b/src/licensedcode/data/rules/mit_405.RULE
@@ -10,4 +10,4 @@ ignorable_urls:
## License
-This library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE for more information.
\ No newline at end of file
+This library is {{distributed under the [MIT License}}](https://opensource.org/licenses/MIT), see LICENSE for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_406.RULE b/src/licensedcode/data/rules/mit_406.RULE
index ea6fec377b..561c968fee 100644
--- a/src/licensedcode/data/rules/mit_406.RULE
+++ b/src/licensedcode/data/rules/mit_406.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-This library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE for more information.
\ No newline at end of file
+This library is {{distributed under the [MIT License}}](https://opensource.org/licenses/MIT), see LICENSE for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_407.RULE b/src/licensedcode/data/rules/mit_407.RULE
index a35075efd5..02b6e86b07 100644
--- a/src/licensedcode/data/rules/mit_407.RULE
+++ b/src/licensedcode/data/rules/mit_407.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
## License
-This library is distributed under the [MIT License](httpss://opensource.org/licenses/MIT), see LICENSE.txt for more information.
\ No newline at end of file
+This library is {{distributed under the [MIT License}}](httpss://opensource.org/{{licenses/MIT}}), see LICENSE.txt for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_408.RULE b/src/licensedcode/data/rules/mit_408.RULE
index c69b504942..984f16683f 100644
--- a/src/licensedcode/data/rules/mit_408.RULE
+++ b/src/licensedcode/data/rules/mit_408.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-This library is distributed under the [MIT License](httpss://opensource.org/licenses/MIT), see LICENSE.txt for more information.
\ No newline at end of file
+This library is {{distributed under the [MIT License}}](httpss://opensource.org/{{licenses/MIT}}), see LICENSE.txt for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_412.RULE b/src/licensedcode/data/rules/mit_412.RULE
index a6a88125f3..622432a219 100644
--- a/src/licensedcode/data/rules/mit_412.RULE
+++ b/src/licensedcode/data/rules/mit_412.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-Use of this source code is governed by the MIT license that can be found
+Use of this source code is governed by {{the MIT license}} that can be found
in the LICENSE file
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_428.RULE b/src/licensedcode/data/rules/mit_428.RULE
index 2254ca1def..3aa28499b5 100644
--- a/src/licensedcode/data/rules/mit_428.RULE
+++ b/src/licensedcode/data/rules/mit_428.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-The MIT License (MIT) - http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{The MIT License}} (MIT) - http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_429.RULE b/src/licensedcode/data/rules/mit_429.RULE
index 58a98a51ad..cf88c22459 100644
--- a/src/licensedcode/data/rules/mit_429.RULE
+++ b/src/licensedcode/data/rules/mit_429.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-The MIT License (MIT) - https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{The MIT License}} (MIT) - https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_431.RULE b/src/licensedcode/data/rules/mit_431.RULE
index 584e5a0ef8..965830222b 100644
--- a/src/licensedcode/data/rules/mit_431.RULE
+++ b/src/licensedcode/data/rules/mit_431.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.html
---
-files are licensed under the MIT License:
+files are {{licensed under the MIT}} License:
http://opensource.org/licenses/mit-license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_432.RULE b/src/licensedcode/data/rules/mit_432.RULE
index d6e51e3d07..20204356bc 100644
--- a/src/licensedcode/data/rules/mit_432.RULE
+++ b/src/licensedcode/data/rules/mit_432.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.html
---
-files are licensed under the MIT License:
+files are {{licensed under the MIT}} License:
https://opensource.org/licenses/mit-license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_433.RULE b/src/licensedcode/data/rules/mit_433.RULE
index 4d7d75d21b..1562502f81 100644
--- a/src/licensedcode/data/rules/mit_433.RULE
+++ b/src/licensedcode/data/rules/mit_433.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.html
---
-Font Awesome CSS, LESS, and Sass files are licensed under the MIT License:
+Font Awesome CSS, LESS, and Sass files are {{licensed under the MIT}} License:
http://opensource.org/licenses/mit-license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_434.RULE b/src/licensedcode/data/rules/mit_434.RULE
index 72d6e01bb9..27dc2df47d 100644
--- a/src/licensedcode/data/rules/mit_434.RULE
+++ b/src/licensedcode/data/rules/mit_434.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-The MIT License (MIT): http://opensource.org/licenses/MIT
\ No newline at end of file
+{{The MIT License}} (MIT): http://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_435.RULE b/src/licensedcode/data/rules/mit_435.RULE
index defd851397..0da5d37d06 100644
--- a/src/licensedcode/data/rules/mit_435.RULE
+++ b/src/licensedcode/data/rules/mit_435.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-The MIT License (MIT): https://opensource.org/licenses/MIT
\ No newline at end of file
+{{The MIT License}} (MIT): https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_436.RULE b/src/licensedcode/data/rules/mit_436.RULE
index 0eb91ebb0b..89270dcfbf 100644
--- a/src/licensedcode/data/rules/mit_436.RULE
+++ b/src/licensedcode/data/rules/mit_436.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- COPYING
---
-## License
+## {{License
-MIT - see the **COPYING** file.
\ No newline at end of file
+MIT}} - see the **COPYING** file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_44.RULE b/src/licensedcode/data/rules/mit_44.RULE
index 01c5f0dc51..5904be140d 100644
--- a/src/licensedcode/data/rules/mit_44.RULE
+++ b/src/licensedcode/data/rules/mit_44.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
---
* is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See LICENSE for details.
+ * it under the terms of {{the MIT license}}. See LICENSE for details.
*
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_45.RULE b/src/licensedcode/data/rules/mit_45.RULE
index b9c99c071a..d987205b99 100644
--- a/src/licensedcode/data/rules/mit_45.RULE
+++ b/src/licensedcode/data/rules/mit_45.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-http://opensource.org/licenses/mit-license.php MIT License
\ No newline at end of file
+http://opensource.org/licenses/mit-license.php {{MIT License}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_46.RULE b/src/licensedcode/data/rules/mit_46.RULE
index 666fa9d32e..09f340d086 100644
--- a/src/licensedcode/data/rules/mit_46.RULE
+++ b/src/licensedcode/data/rules/mit_46.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/MIT
---
-Licensed under the MIT license:
+{{Licensed under the MIT}} license:
http://www.opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_464.RULE b/src/licensedcode/data/rules/mit_464.RULE
index 068e0f639a..1a922869df 100644
--- a/src/licensedcode/data/rules/mit_464.RULE
+++ b/src/licensedcode/data/rules/mit_464.RULE
@@ -9,4 +9,4 @@ referenced_filenames:
License
-This project is licensed under the MIT License - see the LICENSE file for details
\ No newline at end of file
+This project is {{licensed under the MIT}} License - see the LICENSE file for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_470.RULE b/src/licensedcode/data/rules/mit_470.RULE
index bf2c600b17..ea0955a0fe 100644
--- a/src/licensedcode/data/rules/mit_470.RULE
+++ b/src/licensedcode/data/rules/mit_470.RULE
@@ -6,6 +6,6 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-"license": {
- "name": "MIT",
+"{{license": {
+ "name": "MIT}}",
"url": "https://opensource.org/licenses/MIT"
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_471.RULE b/src/licensedcode/data/rules/mit_471.RULE
index 6441bcc78e..9368e6b0d8 100644
--- a/src/licensedcode/data/rules/mit_471.RULE
+++ b/src/licensedcode/data/rules/mit_471.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE.md
---
-License
+{{License
-MIT/X11, see LICENSE.md for details.
\ No newline at end of file
+MIT}}/X11, see LICENSE.md for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_472.RULE b/src/licensedcode/data/rules/mit_472.RULE
index 350701b2c6..d492defb0a 100644
--- a/src/licensedcode/data/rules/mit_472.RULE
+++ b/src/licensedcode/data/rules/mit_472.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license
---
-MIT License http://opensource.org/licenses/mit-license
\ No newline at end of file
+{{MIT License}} http://opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_473.RULE b/src/licensedcode/data/rules/mit_473.RULE
index c56a9ddbd7..a0ed86b203 100644
--- a/src/licensedcode/data/rules/mit_473.RULE
+++ b/src/licensedcode/data/rules/mit_473.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license
---
-MIT License http://www.opensource.org/licenses/mit-license
\ No newline at end of file
+{{MIT License}} http://www.opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_474.RULE b/src/licensedcode/data/rules/mit_474.RULE
index 184b7a213c..a460c7c1b6 100644
--- a/src/licensedcode/data/rules/mit_474.RULE
+++ b/src/licensedcode/data/rules/mit_474.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license
---
-MIT License https://opensource.org/licenses/mit-license
\ No newline at end of file
+{{MIT License}} https://opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_475.RULE b/src/licensedcode/data/rules/mit_475.RULE
index 86f2301cc8..ba0d24b702 100644
--- a/src/licensedcode/data/rules/mit_475.RULE
+++ b/src/licensedcode/data/rules/mit_475.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license
---
-MIT License https://www.opensource.org/licenses/mit-license
\ No newline at end of file
+{{MIT License}} https://www.opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_477.RULE b/src/licensedcode/data/rules/mit_477.RULE
index 3b35e64f86..4ccdb002e6 100644
--- a/src/licensedcode/data/rules/mit_477.RULE
+++ b/src/licensedcode/data/rules/mit_477.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://mit-license.org/
---
-* This code is licensed under the MIT
+* This code is {{licensed under the MIT}}
* For the full license see: http://mit-license.org/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_478.RULE b/src/licensedcode/data/rules/mit_478.RULE
index 1f7d44404a..e09304cfb8 100644
--- a/src/licensedcode/data/rules/mit_478.RULE
+++ b/src/licensedcode/data/rules/mit_478.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://mit-license.org/
---
-* This code is licensed under the MIT
+* This code is {{licensed under the MIT}}
* For the full license see: https://mit-license.org/
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_485.RULE b/src/licensedcode/data/rules/mit_485.RULE
index 61b78ec8bf..6f5bfada3a 100644
--- a/src/licensedcode/data/rules/mit_485.RULE
+++ b/src/licensedcode/data/rules/mit_485.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
- https://github.com/max-elia/licensr
---
-# This file is part of the project reuse-checker which is released under the MIT license.
+# This file is part of the project reuse-checker which is released {{under the MIT license}}.
# See file LICENSE or go to https://github.com/max-elia/licensr for full license details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_486.RULE b/src/licensedcode/data/rules/mit_486.RULE
index 07198eb5ae..aa8b691f61 100644
--- a/src/licensedcode/data/rules/mit_486.RULE
+++ b/src/licensedcode/data/rules/mit_486.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE.txt
---
-The software in this package is published under the terms of the MIT
-license, a copy of which has been included with this distribution in the
+The software in this package is published under the terms of {{the MIT
+license}}, a copy of which has been included with this distribution in the
LICENSE.txt file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_487.RULE b/src/licensedcode/data/rules/mit_487.RULE
index 9962335f60..c7a16bbf69 100644
--- a/src/licensedcode/data/rules/mit_487.RULE
+++ b/src/licensedcode/data/rules/mit_487.RULE
@@ -9,4 +9,4 @@ referenced_filenames:
License
-This library is licensed under the MIT license. For further information see LICENSE file.
\ No newline at end of file
+This library is {{licensed under the MIT}} license. For further information see LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_488.RULE b/src/licensedcode/data/rules/mit_488.RULE
index 1b81b624f0..d5b1b8c971 100644
--- a/src/licensedcode/data/rules/mit_488.RULE
+++ b/src/licensedcode/data/rules/mit_488.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This library is licensed under the MIT license. For further information see LICENSE file.
\ No newline at end of file
+This library is {{licensed under the MIT}} license. For further information see LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_489.RULE b/src/licensedcode/data/rules/mit_489.RULE
index 4624b22259..29e9a466d9 100644
--- a/src/licensedcode/data/rules/mit_489.RULE
+++ b/src/licensedcode/data/rules/mit_489.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
### License
-The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
\ No newline at end of file
+{{The MIT License}} (MIT). Please see [License File](LICENSE.md) for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_49.RULE b/src/licensedcode/data/rules/mit_49.RULE
index bf7bc511dc..3d2ca780a4 100644
--- a/src/licensedcode/data/rules/mit_49.RULE
+++ b/src/licensedcode/data/rules/mit_49.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-Licensed under the MIT License (LICENSE.txt).
\ No newline at end of file
+{{Licensed under the MIT}} License (LICENSE.txt).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_490.RULE b/src/licensedcode/data/rules/mit_490.RULE
index 977c2fc893..d39669cc0d 100644
--- a/src/licensedcode/data/rules/mit_490.RULE
+++ b/src/licensedcode/data/rules/mit_490.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
\ No newline at end of file
+{{The MIT License}} (MIT). Please see [License File](LICENSE.md) for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_494.RULE b/src/licensedcode/data/rules/mit_494.RULE
index 40ac835177..da62ebe49a 100644
--- a/src/licensedcode/data/rules/mit_494.RULE
+++ b/src/licensedcode/data/rules/mit_494.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-This project is licensed under the terms of the MIT license. For more details, see the LICENSE file.
\ No newline at end of file
+This project is licensed under the terms of {{the MIT license}}. For more details, see the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_496.RULE b/src/licensedcode/data/rules/mit_496.RULE
index 56c1b97a6e..07756c0395 100644
--- a/src/licensedcode/data/rules/mit_496.RULE
+++ b/src/licensedcode/data/rules/mit_496.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://jquery.org/license
---
-* Released under the MIT license
+* Released {{under the MIT license}}
* https://jquery.org/license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_50.RULE b/src/licensedcode/data/rules/mit_50.RULE
index 3251bd4af3..175d1ed248 100644
--- a/src/licensedcode/data/rules/mit_50.RULE
+++ b/src/licensedcode/data/rules/mit_50.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-licence MIT License - http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+licence {{MIT License}} - http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_51.RULE b/src/licensedcode/data/rules/mit_51.RULE
index 856f9f5c8c..6c5f88d706 100644
--- a/src/licensedcode/data/rules/mit_51.RULE
+++ b/src/licensedcode/data/rules/mit_51.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-License: MIT License - http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+License: {{MIT License}} - http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_52.RULE b/src/licensedcode/data/rules/mit_52.RULE
index 61cc3de71a..551c75fd7d 100644
--- a/src/licensedcode/data/rules/mit_52.RULE
+++ b/src/licensedcode/data/rules/mit_52.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_notice: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_520.RULE b/src/licensedcode/data/rules/mit_520.RULE
index f1f1cbcfcf..83cbee757a 100644
--- a/src/licensedcode/data/rules/mit_520.RULE
+++ b/src/licensedcode/data/rules/mit_520.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-Provided under the MIT License (MIT). See LICENSE for details.
\ No newline at end of file
+Provided {{under the MIT License}} (MIT). See LICENSE for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_521.RULE b/src/licensedcode/data/rules/mit_521.RULE
index 20724e6b50..133a60cc15 100644
--- a/src/licensedcode/data/rules/mit_521.RULE
+++ b/src/licensedcode/data/rules/mit_521.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Provided under the MIT License (MIT). See LICENSE for details.
\ No newline at end of file
+Provided {{under the MIT License}} (MIT). See LICENSE for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_526.RULE b/src/licensedcode/data/rules/mit_526.RULE
index dcf524998b..035e915cc9 100644
--- a/src/licensedcode/data/rules/mit_526.RULE
+++ b/src/licensedcode/data/rules/mit_526.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-Licence: This software is provided under the MIT Licence (http://opensource.org/licenses/MIT): The MIT License (MIT)
\ No newline at end of file
+Licence: This software is provided under the MIT Licence (http://opensource.org/licenses/MIT): {{The MIT License}} (MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_55.RULE b/src/licensedcode/data/rules/mit_55.RULE
index 01dd69cc1a..ae4b5dadea 100644
--- a/src/licensedcode/data/rules/mit_55.RULE
+++ b/src/licensedcode/data/rules/mit_55.RULE
@@ -9,4 +9,4 @@ ignorable_urls:
licenses
license
-The MIT License http://jsoup.com/license
\ No newline at end of file
+{{The MIT License}} http://jsoup.com/license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_551.RULE b/src/licensedcode/data/rules/mit_551.RULE
index a879729dc5..323b7ce732 100644
--- a/src/licensedcode/data/rules/mit_551.RULE
+++ b/src/licensedcode/data/rules/mit_551.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-provided under the MIT license. See LICENSE.
\ No newline at end of file
+provided {{under the MIT license}}. See LICENSE.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_556.RULE b/src/licensedcode/data/rules/mit_556.RULE
index 47ee21a7b0..ed57df03e0 100644
--- a/src/licensedcode/data/rules/mit_556.RULE
+++ b/src/licensedcode/data/rules/mit_556.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-provided under the MIT license, which is available to read in the [LICENSE][] file
\ No newline at end of file
+provided {{under the MIT license}}, which is available to read in the [LICENSE][] file
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_56.RULE b/src/licensedcode/data/rules/mit_56.RULE
index 6be8c6e458..fad6ab7459 100644
--- a/src/licensedcode/data/rules/mit_56.RULE
+++ b/src/licensedcode/data/rules/mit_56.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://jquery.org/license
---
-* Released under the MIT license
+* Released {{under the MIT license}}
* http://jquery.org/license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_566.RULE b/src/licensedcode/data/rules/mit_566.RULE
index f1978d8f15..2a352b8943 100644
--- a/src/licensedcode/data/rules/mit_566.RULE
+++ b/src/licensedcode/data/rules/mit_566.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
---
### License
-is an open source project by that is licensed under [MIT](http://opensource.org/licenses/MIT).
\ No newline at end of file
+is an open source project by that is {{licensed under [MIT}}](http://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_567.RULE b/src/licensedcode/data/rules/mit_567.RULE
index 369e2e7ecc..ee7a4e313f 100644
--- a/src/licensedcode/data/rules/mit_567.RULE
+++ b/src/licensedcode/data/rules/mit_567.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://raw.githubusercontent.com/
---
-License [MIT License](https://raw.githubusercontent.com/ /master/LICENSE)
\ No newline at end of file
+License [{{MIT License}}](https://raw.githubusercontent.com/ /master/LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_570.RULE b/src/licensedcode/data/rules/mit_570.RULE
index 5c4de8a6d0..74f1beb2c0 100644
--- a/src/licensedcode/data/rules/mit_570.RULE
+++ b/src/licensedcode/data/rules/mit_570.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
- https://raw.githubusercontent.com/master/LICENSE
---
-License MIT https://img.shields.io/badge/license-MIT https://raw.githubusercontent.com//master/LICENSE)
\ No newline at end of file
+{{License MIT}} https://img.shields.io/badge/license-MIT https://raw.githubusercontent.com//master/LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_571.RULE b/src/licensedcode/data/rules/mit_571.RULE
index f7020b5eea..0fda365c07 100644
--- a/src/licensedcode/data/rules/mit_571.RULE
+++ b/src/licensedcode/data/rules/mit_571.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-provided under the MIT license. See LICENSE file for details.
\ No newline at end of file
+provided {{under the MIT license}}. See LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_572.RULE b/src/licensedcode/data/rules/mit_572.RULE
index c0d45d2785..d1073d3791 100644
--- a/src/licensedcode/data/rules/mit_572.RULE
+++ b/src/licensedcode/data/rules/mit_572.RULE
@@ -9,7 +9,7 @@ ignorable_urls:
## Legal Issues
-This software is distributed under the [MIT license](https://raw.github.com/master/LICENSE.txt).
+This software is {{distributed under the [MIT license}}](https://raw.github.com/master/LICENSE.txt).
In particular, please be aware that
diff --git a/src/licensedcode/data/rules/mit_574.RULE b/src/licensedcode/data/rules/mit_574.RULE
index 696e98187b..03ac1f332d 100644
--- a/src/licensedcode/data/rules/mit_574.RULE
+++ b/src/licensedcode/data/rules/mit_574.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-released under the very permissive [MIT license](LICENSE)
\ No newline at end of file
+released under the very permissive [{{MIT license}}](LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_575.RULE b/src/licensedcode/data/rules/mit_575.RULE
index 776a830ec5..2cf591f24d 100644
--- a/src/licensedcode/data/rules/mit_575.RULE
+++ b/src/licensedcode/data/rules/mit_575.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
- is released under the very permissive [MIT license](LICENSE)
\ No newline at end of file
+ is released under the very permissive [{{MIT license}}](LICENSE)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_579.RULE b/src/licensedcode/data/rules/mit_579.RULE
index bc2e061ae3..9dc1dbba21 100644
--- a/src/licensedcode/data/rules/mit_579.RULE
+++ b/src/licensedcode/data/rules/mit_579.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
# License
-is licensed under the [MIT license](http://.mit-license.org).
+is {{licensed under the [MIT}} license](http://.{{mit-license}}.org).
Read more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_58.RULE b/src/licensedcode/data/rules/mit_58.RULE
index 65ee15289d..b228f5d380 100644
--- a/src/licensedcode/data/rules/mit_58.RULE
+++ b/src/licensedcode/data/rules/mit_58.RULE
@@ -8,6 +8,6 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-mit MIT License
+mit {{MIT License}}
http://www.opensource.org/licenses/mit-license.php
mpl10
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_591.RULE b/src/licensedcode/data/rules/mit_591.RULE
index cc08fac33b..573c16e14e 100644
--- a/src/licensedcode/data/rules/mit_591.RULE
+++ b/src/licensedcode/data/rules/mit_591.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://jquery.org/license
---
-is published under the terms of the [MIT license](https://jquery.org/license/).
\ No newline at end of file
+is published under the terms of {{the [MIT license}}](https://jquery.org/license/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_592.RULE b/src/licensedcode/data/rules/mit_592.RULE
index ce4e974441..a0949e00dd 100644
--- a/src/licensedcode/data/rules/mit_592.RULE
+++ b/src/licensedcode/data/rules/mit_592.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://jquery.org/license
---
-published under the terms of the [MIT license](https://jquery.org/license/).
\ No newline at end of file
+published under the terms of {{the [MIT license}}](https://jquery.org/license/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_595.RULE b/src/licensedcode/data/rules/mit_595.RULE
index e650938f68..461ab9bdef 100644
--- a/src/licensedcode/data/rules/mit_595.RULE
+++ b/src/licensedcode/data/rules/mit_595.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
- https://jquery.org/license
---
-published under the terms of the [MIT license](https://jquery.org/license/).
-## MIT License
\ No newline at end of file
+published under the terms of {{the [MIT license}}](https://jquery.org/license/).
+## {{MIT License}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_598.RULE b/src/licensedcode/data/rules/mit_598.RULE
index 11a5930247..c18dd64f11 100644
--- a/src/licensedcode/data/rules/mit_598.RULE
+++ b/src/licensedcode/data/rules/mit_598.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- system/lib/libc/musl/COPYRIGHT
---
-it has the MIT license, see
+it has {{the MIT license}}, see
system/lib/libc/musl/COPYRIGHT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_600.RULE b/src/licensedcode/data/rules/mit_600.RULE
index b1161d64ee..e80f56f9e4 100644
--- a/src/licensedcode/data/rules/mit_600.RULE
+++ b/src/licensedcode/data/rules/mit_600.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-# Code: MIT License (https://opensource.org/licenses/MIT)
\ No newline at end of file
+# Code: {{MIT License}} (https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_601.RULE b/src/licensedcode/data/rules/mit_601.RULE
index 64590a3d6c..a821653093 100644
--- a/src/licensedcode/data/rules/mit_601.RULE
+++ b/src/licensedcode/data/rules/mit_601.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-MIT License (https://opensource.org/licenses/MIT)
\ No newline at end of file
+{{MIT License}} (https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_609.RULE b/src/licensedcode/data/rules/mit_609.RULE
index 182a8cc2e9..e31461e4e4 100644
--- a/src/licensedcode/data/rules/mit_609.RULE
+++ b/src/licensedcode/data/rules/mit_609.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
- license/third_party/pcollections_LICENSE.txt
---
-License: MIT ([license/third_party/pcollections_LICENSE.txt][pcollections])
\ No newline at end of file
+{{License: MIT}} ([license/third_party/pcollections_LICENSE.txt][pcollections])
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_611.RULE b/src/licensedcode/data/rules/mit_611.RULE
index 3afaf82cda..1466d17063 100644
--- a/src/licensedcode/data/rules/mit_611.RULE
+++ b/src/licensedcode/data/rules/mit_611.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
- license/third_party/qunit_license.txt
---
-License: MIT ([license/third_party/qunit_license.txt][qunit])
\ No newline at end of file
+{{License: MIT}} ([license/third_party/qunit_license.txt][qunit])
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_613.RULE b/src/licensedcode/data/rules/mit_613.RULE
index 3a20594548..69f7209526 100644
--- a/src/licensedcode/data/rules/mit_613.RULE
+++ b/src/licensedcode/data/rules/mit_613.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
- license/third_party/testdata/lombok_license.txt
---
-License: MIT ([license/third_party/testdata/lombok_license.txt][lombok])
\ No newline at end of file
+{{License: MIT}} ([license/third_party/testdata/lombok_license.txt][lombok])
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_615.RULE b/src/licensedcode/data/rules/mit_615.RULE
index c6c878988b..9d3354eed6 100644
--- a/src/licensedcode/data/rules/mit_615.RULE
+++ b/src/licensedcode/data/rules/mit_615.RULE
@@ -8,5 +8,5 @@ referenced_filenames:
- license/third_party/karma-teamcity-reporter_LICENSE.txt
---
-License: MIT ([license/third_party/karma_LICENSE.txt](third_party/karma_LICENSE.txt)
+{{License: MIT}} ([license/third_party/karma_LICENSE.txt](third_party/karma_LICENSE.txt)
and [license/third_party/karma-teamcity-reporter_LICENSE.txt](third_party/karma-teamcity-reporter_LICENSE.txt))
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_616.RULE b/src/licensedcode/data/rules/mit_616.RULE
index 0b62e7ff6c..3ed29a92dd 100644
--- a/src/licensedcode/data/rules/mit_616.RULE
+++ b/src/licensedcode/data/rules/mit_616.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
- license/third_party/mocha-teamcity-reporter_LICENSE.txt
---
-License: MIT ([license/third_party/mocha-teamcity-reporter_LICENSE.txt](third_party/mocha-teamcity-reporter_LICENSE.txt))
\ No newline at end of file
+{{License: MIT}} ([license/third_party/mocha-teamcity-reporter_LICENSE.txt](third_party/mocha-teamcity-reporter_LICENSE.txt))
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_617.RULE b/src/licensedcode/data/rules/mit_617.RULE
index c9683937ba..c654618e0a 100644
--- a/src/licensedcode/data/rules/mit_617.RULE
+++ b/src/licensedcode/data/rules/mit_617.RULE
@@ -8,5 +8,5 @@ referenced_filenames:
- license/third_party/lodash_LICENSE.txt
---
-License: MIT ([license/third_party/teamcity-service-messages_LICENSE.txt](third_party/teamcity-service-messages_LICENSE.txt)
+{{License: MIT}} ([license/third_party/teamcity-service-messages_LICENSE.txt](third_party/teamcity-service-messages_LICENSE.txt)
and [license/third_party/lodash_LICENSE.txt](third_party/lodash_LICENSE.txt))
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_618.RULE b/src/licensedcode/data/rules/mit_618.RULE
index 40cb827915..9178fe6676 100644
--- a/src/licensedcode/data/rules/mit_618.RULE
+++ b/src/licensedcode/data/rules/mit_618.RULE
@@ -8,5 +8,5 @@ referenced_filenames:
- license/third_party/teamcity-service-messages_LICENSE.txt
---
-License: MIT ([license/third_party/mocha-teamcity-reporter_LICENSE.txt](third_party/mocha-teamcity-reporter_LICENSE.txt)
+{{License: MIT}} ([license/third_party/mocha-teamcity-reporter_LICENSE.txt](third_party/mocha-teamcity-reporter_LICENSE.txt)
and [license/third_party/teamcity-service-messages_LICENSE.txt](third_party/teamcity-service-messages_LICENSE.txt))
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_619.RULE b/src/licensedcode/data/rules/mit_619.RULE
index 3fb8b4d7bd..0251e87110 100644
--- a/src/licensedcode/data/rules/mit_619.RULE
+++ b/src/licensedcode/data/rules/mit_619.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
- license/third_party/source-map-loader_LICENSE.txt
---
-License: MIT ([license/third_party/source-map-loader_LICENSE.txt](third_party/source-map-loader_LICENSE.txt))
\ No newline at end of file
+{{License: MIT}} ([license/third_party/source-map-loader_LICENSE.txt](third_party/source-map-loader_LICENSE.txt))
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_62.RULE b/src/licensedcode/data/rules/mit_62.RULE
index 9458410a5c..3c2e869173 100644
--- a/src/licensedcode/data/rules/mit_62.RULE
+++ b/src/licensedcode/data/rules/mit_62.RULE
@@ -9,4 +9,4 @@ ignorable_urls:
The example programs and other software included in this repository are made available under the
[OSI](http://opensource.org)-approved
-[MIT license](http://opensource.org/licenses/mit-license.html).
\ No newline at end of file
+[{{MIT license}}](http://opensource.org/licenses/mit-license.html).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_620.RULE b/src/licensedcode/data/rules/mit_620.RULE
index 6034634a41..438e27efd8 100644
--- a/src/licensedcode/data/rules/mit_620.RULE
+++ b/src/licensedcode/data/rules/mit_620.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
- license/third_party/jquery_license.txt
---
-License: MIT ([license/third_party/jquery_license.txt][jquery])
\ No newline at end of file
+{{License: MIT}} ([license/third_party/jquery_license.txt][jquery])
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_622.RULE b/src/licensedcode/data/rules/mit_622.RULE
index 2fb8a8fdd1..6f0efe74a3 100644
--- a/src/licensedcode/data/rules/mit_622.RULE
+++ b/src/licensedcode/data/rules/mit_622.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-is an open source project by that is licensed under [MIT](http://opensource.org/licenses/MIT)
\ No newline at end of file
+is an open source project by that is {{licensed under [MIT}}](http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_624.RULE b/src/licensedcode/data/rules/mit_624.RULE
index 53d58ac4fe..f630a5aa7a 100644
--- a/src/licensedcode/data/rules/mit_624.RULE
+++ b/src/licensedcode/data/rules/mit_624.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-`MIT` - [MIT License](http://opensource.org/licenses/MIT)
\ No newline at end of file
+`MIT` - [{{MIT License}}](http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_626.RULE b/src/licensedcode/data/rules/mit_626.RULE
index 94e54dce2a..df71bb68e4 100644
--- a/src/licensedcode/data/rules/mit_626.RULE
+++ b/src/licensedcode/data/rules/mit_626.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
License
==============
- is provided under the MIT license. See LICENSE file for details.
\ No newline at end of file
+ is provided {{under the MIT license}}. See LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_627.RULE b/src/licensedcode/data/rules/mit_627.RULE
index 8428efeafb..0d5a58676d 100644
--- a/src/licensedcode/data/rules/mit_627.RULE
+++ b/src/licensedcode/data/rules/mit_627.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-is provided under the MIT license. See LICENSE file for details.
\ No newline at end of file
+is provided {{under the MIT license}}. See LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_630.RULE b/src/licensedcode/data/rules/mit_630.RULE
index 943f6a8e05..36c86fc647 100644
--- a/src/licensedcode/data/rules/mit_630.RULE
+++ b/src/licensedcode/data/rules/mit_630.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-released under the [MIT License](LICENSE.md).
\ No newline at end of file
+released {{under the [MIT License}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_631.RULE b/src/licensedcode/data/rules/mit_631.RULE
index b5e3f31c66..cb0b713001 100644
--- a/src/licensedcode/data/rules/mit_631.RULE
+++ b/src/licensedcode/data/rules/mit_631.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
license
-is released under the [MIT License](LICENSE.md).
\ No newline at end of file
+is released {{under the [MIT License}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_633.RULE b/src/licensedcode/data/rules/mit_633.RULE
index 0cb153ee5b..47c5db60f6 100644
--- a/src/licensedcode/data/rules/mit_633.RULE
+++ b/src/licensedcode/data/rules/mit_633.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## License
-repo is licensed under the [MIT license](LICENSE.TXT).
\ No newline at end of file
+repo is {{licensed under the [MIT}} license](LICENSE.TXT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_634.RULE b/src/licensedcode/data/rules/mit_634.RULE
index a426b211e7..2475d41f5b 100644
--- a/src/licensedcode/data/rules/mit_634.RULE
+++ b/src/licensedcode/data/rules/mit_634.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## License
-repo is licensed under the [MIT license](LICENSE).
\ No newline at end of file
+repo is {{licensed under the [MIT}} license](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_635.RULE b/src/licensedcode/data/rules/mit_635.RULE
index 2893218a69..d30e765c78 100644
--- a/src/licensedcode/data/rules/mit_635.RULE
+++ b/src/licensedcode/data/rules/mit_635.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.TXT
---
-repo is licensed under the [MIT license](LICENSE.TXT).
\ No newline at end of file
+repo is {{licensed under the [MIT}} license](LICENSE.TXT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_636.RULE b/src/licensedcode/data/rules/mit_636.RULE
index 6c2193b96f..6d22781ee4 100644
--- a/src/licensedcode/data/rules/mit_636.RULE
+++ b/src/licensedcode/data/rules/mit_636.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-repo is licensed under the [MIT license](LICENSE).
\ No newline at end of file
+repo is {{licensed under the [MIT}} license](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_637.RULE b/src/licensedcode/data/rules/mit_637.RULE
index 613b1ddfda..1af1268e31 100644
--- a/src/licensedcode/data/rules/mit_637.RULE
+++ b/src/licensedcode/data/rules/mit_637.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## License
- is licensed under the [MIT license](LICENSE.TXT).
\ No newline at end of file
+ is {{licensed under the [MIT}} license](LICENSE.TXT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_638.RULE b/src/licensedcode/data/rules/mit_638.RULE
index 06799c00d4..bb56cdddb7 100644
--- a/src/licensedcode/data/rules/mit_638.RULE
+++ b/src/licensedcode/data/rules/mit_638.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## License
- is licensed under the [MIT license](LICENSE).
\ No newline at end of file
+ is {{licensed under the [MIT}} license](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_642.RULE b/src/licensedcode/data/rules/mit_642.RULE
index 95a6175b0b..14da3b8030 100644
--- a/src/licensedcode/data/rules/mit_642.RULE
+++ b/src/licensedcode/data/rules/mit_642.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE.txt
---
-distributed under the MIT license which encourages both commercial
+{{distributed under the MIT license}} which encourages both commercial
and non-commercial usage. Please see the file called LICENSE.txt
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_652.RULE b/src/licensedcode/data/rules/mit_652.RULE
index 9fe61a7556..d2e3a34a50 100644
--- a/src/licensedcode/data/rules/mit_652.RULE
+++ b/src/licensedcode/data/rules/mit_652.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
## License
- is licensed under the [MIT License](https://github.com//LICENSE).
\ No newline at end of file
+ is {{licensed under the [MIT}} License](https://github.com//LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_653.RULE b/src/licensedcode/data/rules/mit_653.RULE
index 3fd6ab3fae..40a040de14 100644
--- a/src/licensedcode/data/rules/mit_653.RULE
+++ b/src/licensedcode/data/rules/mit_653.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://github.com/LICENSE
---
-licensed under the [MIT License](https://github.com//LICENSE).
\ No newline at end of file
+{{licensed under the [MIT}} License](https://github.com//LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_654.RULE b/src/licensedcode/data/rules/mit_654.RULE
index b81af1411f..1dd60b10c8 100644
--- a/src/licensedcode/data/rules/mit_654.RULE
+++ b/src/licensedcode/data/rules/mit_654.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-Code licensed under the MIT License: http://opensource.org/licenses/MIT
\ No newline at end of file
+Code {{licensed under the MIT}} License: http://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_655.RULE b/src/licensedcode/data/rules/mit_655.RULE
index 69efcb7e59..ed91a1f494 100644
--- a/src/licensedcode/data/rules/mit_655.RULE
+++ b/src/licensedcode/data/rules/mit_655.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Code licensed under the MIT License: https://opensource.org/licenses/MIT
\ No newline at end of file
+Code {{licensed under the MIT}} License: https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_656.RULE b/src/licensedcode/data/rules/mit_656.RULE
index 80248029ad..cfef3ddd40 100644
--- a/src/licensedcode/data/rules/mit_656.RULE
+++ b/src/licensedcode/data/rules/mit_656.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-licensed under the MIT License: https://opensource.org/licenses/MIT
\ No newline at end of file
+{{licensed under the MIT}} License: https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_657.RULE b/src/licensedcode/data/rules/mit_657.RULE
index ca0ed9f576..2c9d269023 100644
--- a/src/licensedcode/data/rules/mit_657.RULE
+++ b/src/licensedcode/data/rules/mit_657.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-open-source software, freely distributable under the terms of an [MIT-style license](LICENSE).
\ No newline at end of file
+open-source software, freely distributable under the terms of an [{{MIT-style license}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_658.RULE b/src/licensedcode/data/rules/mit_658.RULE
index 13a06aaf1e..350537628e 100644
--- a/src/licensedcode/data/rules/mit_658.RULE
+++ b/src/licensedcode/data/rules/mit_658.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-freely distributable under the terms of an [MIT-style license](LICENSE).
\ No newline at end of file
+freely distributable under the terms of an [{{MIT-style license}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_659.RULE b/src/licensedcode/data/rules/mit_659.RULE
index 3dd4deaa8a..22075c7f18 100644
--- a/src/licensedcode/data/rules/mit_659.RULE
+++ b/src/licensedcode/data/rules/mit_659.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-distributable under the terms of an [MIT-style license](LICENSE).
\ No newline at end of file
+distributable under the terms of an [{{MIT-style license}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_66.RULE b/src/licensedcode/data/rules/mit_66.RULE
index 2f1021d1ec..83bc2031f9 100644
--- a/src/licensedcode/data/rules/mit_66.RULE
+++ b/src/licensedcode/data/rules/mit_66.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-that is licensed under [MIT](http://opensource.org/licenses/MIT).
\ No newline at end of file
+that is {{licensed under [MIT}}](http://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_660.RULE b/src/licensedcode/data/rules/mit_660.RULE
index 18cda2473f..47283761a1 100644
--- a/src/licensedcode/data/rules/mit_660.RULE
+++ b/src/licensedcode/data/rules/mit_660.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-[MIT-style license](LICENSE).
\ No newline at end of file
+[{{MIT-style license}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_662.RULE b/src/licensedcode/data/rules/mit_662.RULE
index b17fc3413d..825058fa7c 100644
--- a/src/licensedcode/data/rules/mit_662.RULE
+++ b/src/licensedcode/data/rules/mit_662.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-The MIT License (http://www.opensource.org/licenses/mit-license.php)
+{{The MIT License}} (http://www.opensource.org/licenses/mit-license.php)
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/src/licensedcode/data/rules/mit_663.RULE b/src/licensedcode/data/rules/mit_663.RULE
index e8fef017aa..838976d91c 100644
--- a/src/licensedcode/data/rules/mit_663.RULE
+++ b/src/licensedcode/data/rules/mit_663.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
Use, reproduction, distribution, and
modification of this code is subject to the terms and * conditions
-of the MIT license, available at
+of {{the MIT license}}, available at
http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_665.RULE b/src/licensedcode/data/rules/mit_665.RULE
index 770503f3d0..42cdc00438 100644
--- a/src/licensedcode/data/rules/mit_665.RULE
+++ b/src/licensedcode/data/rules/mit_665.RULE
@@ -8,5 +8,5 @@ ignorable_urls:
Use, reproduction, distribution, and
modification of this code is subject to the terms and * conditions
-of the MIT license, available at
+of {{the MIT license}}, available at
https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_666.RULE b/src/licensedcode/data/rules/mit_666.RULE
index 933490921c..bce0908e70 100644
--- a/src/licensedcode/data/rules/mit_666.RULE
+++ b/src/licensedcode/data/rules/mit_666.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
---
this code is subject to the terms and * conditions
-of the MIT license, available at
+of {{the MIT license}}, available at
https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_667.RULE b/src/licensedcode/data/rules/mit_667.RULE
index 929782a097..4db0942f6a 100644
--- a/src/licensedcode/data/rules/mit_667.RULE
+++ b/src/licensedcode/data/rules/mit_667.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
---
this code is subject to the terms and * conditions
-of the MIT license, available at
+of {{the MIT license}}, available at
http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_67.RULE b/src/licensedcode/data/rules/mit_67.RULE
index 731ea0189b..f97fbf064a 100644
--- a/src/licensedcode/data/rules/mit_67.RULE
+++ b/src/licensedcode/data/rules/mit_67.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-that is licensed under [MIT](https://opensource.org/licenses/MIT).
\ No newline at end of file
+that is {{licensed under [MIT}}](https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_672.RULE b/src/licensedcode/data/rules/mit_672.RULE
index 01a33b13b7..e56732728c 100644
--- a/src/licensedcode/data/rules/mit_672.RULE
+++ b/src/licensedcode/data/rules/mit_672.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 99
---
diff --git a/src/licensedcode/data/rules/mit_674.RULE b/src/licensedcode/data/rules/mit_674.RULE
index 1f75f257fb..ca369423d2 100644
--- a/src/licensedcode/data/rules/mit_674.RULE
+++ b/src/licensedcode/data/rules/mit_674.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.html
---
-* - Font Awesome CSS, LESS, and SASS files are licensed under MIT License -
+* - Font Awesome CSS, LESS, and SASS files are {{licensed under MIT}} License -
* http://opensource.org/licenses/mit-license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_675.RULE b/src/licensedcode/data/rules/mit_675.RULE
index cdeff16ae9..2197fb134f 100644
--- a/src/licensedcode/data/rules/mit_675.RULE
+++ b/src/licensedcode/data/rules/mit_675.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.html
---
-files are licensed under MIT License -
+files are {{licensed under MIT}} License -
https://opensource.org/licenses/mit-license.html
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_676.RULE b/src/licensedcode/data/rules/mit_676.RULE
index 516a46b705..6063c580a5 100644
--- a/src/licensedcode/data/rules/mit_676.RULE
+++ b/src/licensedcode/data/rules/mit_676.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.libexpat.org/
---
-Licensed under MIT license http://www.libexpat.org
\ No newline at end of file
+{{Licensed under MIT}} license http://www.libexpat.org
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_682.RULE b/src/licensedcode/data/rules/mit_682.RULE
index 7a24d9a53f..57d0f71847 100644
--- a/src/licensedcode/data/rules/mit_682.RULE
+++ b/src/licensedcode/data/rules/mit_682.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-released under the MIT License. See LICENSE for more information.
\ No newline at end of file
+released {{under the MIT License}}. See LICENSE for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_687.RULE b/src/licensedcode/data/rules/mit_687.RULE
index 5702ed82a7..2197f0d2a2 100644
--- a/src/licensedcode/data/rules/mit_687.RULE
+++ b/src/licensedcode/data/rules/mit_687.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
\ No newline at end of file
+{{MIT license}} (LICENSE-MIT or http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_690.RULE b/src/licensedcode/data/rules/mit_690.RULE
index 2eed8422c3..335fb46c9b 100644
--- a/src/licensedcode/data/rules/mit_690.RULE
+++ b/src/licensedcode/data/rules/mit_690.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://en.wikipedia.org/wiki/MIT_License
---
-distributed under the [MIT License](https://en.wikipedia.org/wiki/MIT_License). This gives everyone the freedoms to use openFrameworks in any context: commercial or non-commercial, public or private, open or closed source.
\ No newline at end of file
+{{distributed under the [MIT License}}](https://en.wikipedia.org/wiki/MIT_License). This gives everyone the freedoms to use openFrameworks in any context: commercial or non-commercial, public or private, open or closed source.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_692.RULE b/src/licensedcode/data/rules/mit_692.RULE
index a7c11586c5..aa788c81be 100644
--- a/src/licensedcode/data/rules/mit_692.RULE
+++ b/src/licensedcode/data/rules/mit_692.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
* This software may be modified and distributed under the terms
- * of the MIT license. See the LICENSE file for details.
\ No newline at end of file
+ * of {{the MIT license}}. See the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_694.RULE b/src/licensedcode/data/rules/mit_694.RULE
index 126ec10f11..1e117eb954 100644
--- a/src/licensedcode/data/rules/mit_694.RULE
+++ b/src/licensedcode/data/rules/mit_694.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
This file may be modified and distributed under the terms
-of the MIT license. See the LICENSE file for details.
\ No newline at end of file
+of {{the MIT license}}. See the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_695.RULE b/src/licensedcode/data/rules/mit_695.RULE
index ead01bbcdb..f25a567362 100644
--- a/src/licensedcode/data/rules/mit_695.RULE
+++ b/src/licensedcode/data/rules/mit_695.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## This bootstrap script may be modified and distributed under the terms
-## of the MIT license. See the LICENSE file for details
\ No newline at end of file
+## of {{the MIT license}}. See the LICENSE file for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_696.RULE b/src/licensedcode/data/rules/mit_696.RULE
index d59a76fd12..9bc7a3fe14 100644
--- a/src/licensedcode/data/rules/mit_696.RULE
+++ b/src/licensedcode/data/rules/mit_696.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## This script may be modified and distributed under the terms
-## of the MIT license. See the LICENSE file for details
\ No newline at end of file
+## of {{the MIT license}}. See the LICENSE file for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_697.RULE b/src/licensedcode/data/rules/mit_697.RULE
index b5cddd1156..08bcb9e25c 100644
--- a/src/licensedcode/data/rules/mit_697.RULE
+++ b/src/licensedcode/data/rules/mit_697.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
## This Makefile may be modified and distributed under the terms
-## of the MIT license. See the LICENSE file for details.
\ No newline at end of file
+## of {{the MIT license}}. See the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_698.RULE b/src/licensedcode/data/rules/mit_698.RULE
index 3af612aa83..0bf6ea1383 100644
--- a/src/licensedcode/data/rules/mit_698.RULE
+++ b/src/licensedcode/data/rules/mit_698.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- License
---
-This software may be modified and distributed under the terms of the MIT license. To learn more, see the License.
\ No newline at end of file
+This software may be modified and distributed under the terms of {{the MIT license}}. To learn more, see the License.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_699.RULE b/src/licensedcode/data/rules/mit_699.RULE
index 1424c190cb..2720005084 100644
--- a/src/licensedcode/data/rules/mit_699.RULE
+++ b/src/licensedcode/data/rules/mit_699.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-* This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details.
\ No newline at end of file
+* This software may be modified and distributed under the terms * of {{the MIT license}}. See the LICENSE.txt file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_70.RULE b/src/licensedcode/data/rules/mit_70.RULE
index 11f9a61cf9..07e1bf7ec4 100644
--- a/src/licensedcode/data/rules/mit_70.RULE
+++ b/src/licensedcode/data/rules/mit_70.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
## License
-This program is free software and is distributed under an [MIT License](LICENSE).
\ No newline at end of file
+This program is free software and is distributed under an [{{MIT License}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_708.RULE b/src/licensedcode/data/rules/mit_708.RULE
index 86b05a20fa..ca8f661536 100644
--- a/src/licensedcode/data/rules/mit_708.RULE
+++ b/src/licensedcode/data/rules/mit_708.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- COPYING
---
-licensed under the terms of the MIT license.
+licensed under the terms of {{the MIT license}}.
See the file COPYING in the top directory.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_710.RULE b/src/licensedcode/data/rules/mit_710.RULE
index 8e2ac9250b..85fa8eccd7 100644
--- a/src/licensedcode/data/rules/mit_710.RULE
+++ b/src/licensedcode/data/rules/mit_710.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- COPYING.MIT
---
-Released under the MIT license (see COPYING.MIT for the terms)
\ No newline at end of file
+Released {{under the MIT license}} (see COPYING.MIT for the terms)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_711.RULE b/src/licensedcode/data/rules/mit_711.RULE
index b65ea73319..056e15b913 100644
--- a/src/licensedcode/data/rules/mit_711.RULE
+++ b/src/licensedcode/data/rules/mit_711.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-License: [MIT License](http://opensource.org/licenses/MIT)
\ No newline at end of file
+License: [{{MIT License}}](http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_713.RULE b/src/licensedcode/data/rules/mit_713.RULE
index 84c5507886..330f3388e1 100644
--- a/src/licensedcode/data/rules/mit_713.RULE
+++ b/src/licensedcode/data/rules/mit_713.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- COPYING.mit
---
-provided under the MIT license (see COPYING.mit).
\ No newline at end of file
+provided {{under the MIT license}} (see COPYING.mit).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_714.RULE b/src/licensedcode/data/rules/mit_714.RULE
index bc803ad780..73afcf13bb 100644
--- a/src/licensedcode/data/rules/mit_714.RULE
+++ b/src/licensedcode/data/rules/mit_714.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
- docs
---
-The code itself is licensed under the MIT which you can read in the LICENSE file.
+The code itself is {{licensed under the MIT}} which you can read in the LICENSE file.
Read more about the release licensing in the docs folder.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_717.RULE b/src/licensedcode/data/rules/mit_717.RULE
index 4e90540e63..4be85a2ba1 100644
--- a/src/licensedcode/data/rules/mit_717.RULE
+++ b/src/licensedcode/data/rules/mit_717.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-This software is provided under the terms of the MIT license, which is provided in the file "LICENSE.md".
\ No newline at end of file
+This software is provided under the terms of {{the MIT license}}, which is provided in the file "LICENSE.md".
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_725.RULE b/src/licensedcode/data/rules/mit_725.RULE
index 2dd3091e08..25f044dbf6 100644
--- a/src/licensedcode/data/rules/mit_725.RULE
+++ b/src/licensedcode/data/rules/mit_725.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-Licensed under the MIT license http://opensource.org/licenses/mit-license.php
\ No newline at end of file
+{{Licensed under the MIT}} license http://opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_734.RULE b/src/licensedcode/data/rules/mit_734.RULE
index 47245daf25..c5e2ff714e 100644
--- a/src/licensedcode/data/rules/mit_734.RULE
+++ b/src/licensedcode/data/rules/mit_734.RULE
@@ -7,6 +7,6 @@ referenced_filenames:
- LICENSE-MIT.txt
---
-The files are licensed under the **MIT** license - see the [LICENSE-MIT](LICENSE-MIT.txt) file for details.
+The files are {{licensed under the **MIT}}** license - see the [{{LICENSE-MIT}}](LICENSE-MIT.txt) file for details.
These files contain the following tag instead of the full license text:
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_736.RULE b/src/licensedcode/data/rules/mit_736.RULE
index fb1232762d..813debf9c3 100644
--- a/src/licensedcode/data/rules/mit_736.RULE
+++ b/src/licensedcode/data/rules/mit_736.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-you can redistribute it and/or modify it under the terms of the MIT License as
+you can redistribute it and/or modify it under the terms of {{the MIT License}} as
published by the Open Source Initiative. See the LICENSE file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_738.RULE b/src/licensedcode/data/rules/mit_738.RULE
index 9fc0d6c0f2..87f2d753ed 100644
--- a/src/licensedcode/data/rules/mit_738.RULE
+++ b/src/licensedcode/data/rules/mit_738.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This is free software you can redistribute it and/or modify it under the terms of the MIT License as
+This is free software you can redistribute it and/or modify it under the terms of {{the MIT License}} as
published by the Open Source Initiative. See the LICENSE file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_742.RULE b/src/licensedcode/data/rules/mit_742.RULE
index 0fc26b2b9b..15b627b8f7 100644
--- a/src/licensedcode/data/rules/mit_742.RULE
+++ b/src/licensedcode/data/rules/mit_742.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
This is free software: you can redistribute it and/or modify it under the terms of
-the MIT License as published by the Open Source Initiative. See the [LICENSE](LICENSE) file for more details.
\ No newline at end of file
+{{the MIT License}} as published by the Open Source Initiative. See the [LICENSE](LICENSE) file for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_744.RULE b/src/licensedcode/data/rules/mit_744.RULE
index d3fcd7cc05..1817d41ff1 100644
--- a/src/licensedcode/data/rules/mit_744.RULE
+++ b/src/licensedcode/data/rules/mit_744.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
- https://github.com/kr/pty
---
-This product contains software (https://github.com/kr/pty) developed by Keith Rarick, licensed under the MIT License.
\ No newline at end of file
+This product contains software (https://github.com/kr/pty) developed by Keith Rarick, {{licensed under the MIT}} License.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_75.RULE b/src/licensedcode/data/rules/mit_75.RULE
index 919d4baa6a..e77f52b565 100644
--- a/src/licensedcode/data/rules/mit_75.RULE
+++ b/src/licensedcode/data/rules/mit_75.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-[MIT License](LICENSE.md)
\ No newline at end of file
+[{{MIT License}}](LICENSE.md)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_753.RULE b/src/licensedcode/data/rules/mit_753.RULE
index cd1ef099b0..79bb9aaa25 100644
--- a/src/licensedcode/data/rules/mit_753.RULE
+++ b/src/licensedcode/data/rules/mit_753.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-* Licensed under the MIT License (the "License").
+* {{Licensed under the MIT}} License (the "License").
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
diff --git a/src/licensedcode/data/rules/mit_755.RULE b/src/licensedcode/data/rules/mit_755.RULE
index cfa909ebc1..a1355c89a8 100644
--- a/src/licensedcode/data/rules/mit_755.RULE
+++ b/src/licensedcode/data/rules/mit_755.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Licensed under the MIT License (the "License"); you may not use this file except
+{{Licensed under the MIT}} License (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
https://opensource.org/licenses/MIT
diff --git a/src/licensedcode/data/rules/mit_756.RULE b/src/licensedcode/data/rules/mit_756.RULE
index 481ee1d074..2049d7d346 100644
--- a/src/licensedcode/data/rules/mit_756.RULE
+++ b/src/licensedcode/data/rules/mit_756.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Licensed under the MIT License (the "License");
+{{Licensed under the MIT}} License (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
diff --git a/src/licensedcode/data/rules/mit_757.RULE b/src/licensedcode/data/rules/mit_757.RULE
index 55fcfef7c6..4396c1a9c0 100644
--- a/src/licensedcode/data/rules/mit_757.RULE
+++ b/src/licensedcode/data/rules/mit_757.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-Licensed under the MIT License (the "License");
+{{Licensed under the MIT}} License (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
diff --git a/src/licensedcode/data/rules/mit_759.RULE b/src/licensedcode/data/rules/mit_759.RULE
index 9dffcc1a05..c89cbca585 100644
--- a/src/licensedcode/data/rules/mit_759.RULE
+++ b/src/licensedcode/data/rules/mit_759.RULE
@@ -8,7 +8,7 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-Licensed under the MIT License(the "License"); you may not use this file except
+{{Licensed under the MIT}} License(the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License in the
README file or at
https://opensource.org/licenses/MIT
diff --git a/src/licensedcode/data/rules/mit_760.RULE b/src/licensedcode/data/rules/mit_760.RULE
index 9836db1205..c24469dcbd 100644
--- a/src/licensedcode/data/rules/mit_760.RULE
+++ b/src/licensedcode/data/rules/mit_760.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- License.txt
---
-* It is licensed under the MIT license. The full license text can be found
+* It is {{licensed under the MIT}} license. The full license text can be found
* in the License.txt file at the root of this project.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_769.RULE b/src/licensedcode/data/rules/mit_769.RULE
index 96f5321123..885f262094 100644
--- a/src/licensedcode/data/rules/mit_769.RULE
+++ b/src/licensedcode/data/rules/mit_769.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- License.txt
---
-* It is licenced under the MIT license. The full license text can be found
+* It is licenced {{under the MIT license}}. The full license text can be found
* in the License.txt file at the root of this project.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_776.RULE b/src/licensedcode/data/rules/mit_776.RULE
index 37117a236b..10c19f09ba 100644
--- a/src/licensedcode/data/rules/mit_776.RULE
+++ b/src/licensedcode/data/rules/mit_776.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license
---
-Licensed under the MIT license.
+{{Licensed under the MIT}} license.
* https://opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_777.RULE b/src/licensedcode/data/rules/mit_777.RULE
index 5b95cdc409..44a6bcd6ed 100644
--- a/src/licensedcode/data/rules/mit_777.RULE
+++ b/src/licensedcode/data/rules/mit_777.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit
---
-Licensed under the MIT license.
+{{Licensed under the MIT}} license.
* https://www.opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_778.RULE b/src/licensedcode/data/rules/mit_778.RULE
index 2d36123508..711648e297 100644
--- a/src/licensedcode/data/rules/mit_778.RULE
+++ b/src/licensedcode/data/rules/mit_778.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit
---
-under the MIT license.
+{{under the MIT license}}.
* https://www.opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_779.RULE b/src/licensedcode/data/rules/mit_779.RULE
index 5cd8ae28ac..c1c250b112 100644
--- a/src/licensedcode/data/rules/mit_779.RULE
+++ b/src/licensedcode/data/rules/mit_779.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit
---
-under the MIT license.
+{{under the MIT license}}.
* https://opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_780.RULE b/src/licensedcode/data/rules/mit_780.RULE
index ea6c5d5d1a..7ceb9f05a7 100644
--- a/src/licensedcode/data/rules/mit_780.RULE
+++ b/src/licensedcode/data/rules/mit_780.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit
---
-under the MIT license.
+{{under the MIT license}}.
* http://opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_781.RULE b/src/licensedcode/data/rules/mit_781.RULE
index 776aaf21f5..930680d380 100644
--- a/src/licensedcode/data/rules/mit_781.RULE
+++ b/src/licensedcode/data/rules/mit_781.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-under the MIT license.
+{{under the MIT license}}.
* https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_782.RULE b/src/licensedcode/data/rules/mit_782.RULE
index 229afa8bc3..446260ab6b 100644
--- a/src/licensedcode/data/rules/mit_782.RULE
+++ b/src/licensedcode/data/rules/mit_782.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license
---
-under the MIT license.
+{{under the MIT license}}.
* https://opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_783.RULE b/src/licensedcode/data/rules/mit_783.RULE
index e3ec42850a..44a79092f8 100644
--- a/src/licensedcode/data/rules/mit_783.RULE
+++ b/src/licensedcode/data/rules/mit_783.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license
---
-the MIT license.
+{{the MIT license}}.
* https://opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_784.RULE b/src/licensedcode/data/rules/mit_784.RULE
index 11f845ed7e..4d1f091a1a 100644
--- a/src/licensedcode/data/rules/mit_784.RULE
+++ b/src/licensedcode/data/rules/mit_784.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit
---
-the MIT license.
+{{the MIT license}}.
* https://www.opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_785.RULE b/src/licensedcode/data/rules/mit_785.RULE
index b085c1846b..62fd27bd1a 100644
--- a/src/licensedcode/data/rules/mit_785.RULE
+++ b/src/licensedcode/data/rules/mit_785.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-MIT license.
+{{MIT license}}.
* https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_786.RULE b/src/licensedcode/data/rules/mit_786.RULE
index bea548d5a4..41968fc18e 100644
--- a/src/licensedcode/data/rules/mit_786.RULE
+++ b/src/licensedcode/data/rules/mit_786.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit
---
-MIT license.
+{{MIT license}}.
* https://www.opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_787.RULE b/src/licensedcode/data/rules/mit_787.RULE
index 7d9b8bb0a5..e0aa04f5bb 100644
--- a/src/licensedcode/data/rules/mit_787.RULE
+++ b/src/licensedcode/data/rules/mit_787.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit
---
-MIT license.
+{{MIT license}}.
* http://opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_788.RULE b/src/licensedcode/data/rules/mit_788.RULE
index 2f2c856ece..5e64c13b0c 100644
--- a/src/licensedcode/data/rules/mit_788.RULE
+++ b/src/licensedcode/data/rules/mit_788.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-Licensed under the MIT licence.
+{{Licensed under the MIT}} licence.
* https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_789.RULE b/src/licensedcode/data/rules/mit_789.RULE
index a6af4f5714..4ad8d25cbc 100644
--- a/src/licensedcode/data/rules/mit_789.RULE
+++ b/src/licensedcode/data/rules/mit_789.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license
---
-Licensed under the MIT licence.
+{{Licensed under the MIT}} licence.
* https://opensource.org/licenses/mit-license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_79.RULE b/src/licensedcode/data/rules/mit_79.RULE
index 6a26bad1d3..9f7ead638b 100644
--- a/src/licensedcode/data/rules/mit_79.RULE
+++ b/src/licensedcode/data/rules/mit_79.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://mit-license.org/
---
-is distributed under [MIT license](http://mit-license.org/).
\ No newline at end of file
+is {{distributed under [MIT license}}](http://mit-license.org/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_790.RULE b/src/licensedcode/data/rules/mit_790.RULE
index 6f175c131e..2ccdf99b72 100644
--- a/src/licensedcode/data/rules/mit_790.RULE
+++ b/src/licensedcode/data/rules/mit_790.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit
---
-Licensed under the MIT licence.
+{{Licensed under the MIT}} licence.
* https://www.opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_791.RULE b/src/licensedcode/data/rules/mit_791.RULE
index c15049df1a..b6b0cee95d 100644
--- a/src/licensedcode/data/rules/mit_791.RULE
+++ b/src/licensedcode/data/rules/mit_791.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit
---
-Licensed under the MIT licence.
+{{Licensed under the MIT}} licence.
* https://opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_792.RULE b/src/licensedcode/data/rules/mit_792.RULE
index ef1917f4fb..aaf4aa735a 100644
--- a/src/licensedcode/data/rules/mit_792.RULE
+++ b/src/licensedcode/data/rules/mit_792.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://opensource.org/licenses/mit
---
-Licensed under the MIT licence.
+{{Licensed under the MIT}} licence.
* http://opensource.org/licenses/mit
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_815.RULE b/src/licensedcode/data/rules/mit_815.RULE
index 4565401725..919097b1a9 100644
--- a/src/licensedcode/data/rules/mit_815.RULE
+++ b/src/licensedcode/data/rules/mit_815.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_notice: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_82.RULE b/src/licensedcode/data/rules/mit_82.RULE
index a598d6cba5..b868c19e39 100644
--- a/src/licensedcode/data/rules/mit_82.RULE
+++ b/src/licensedcode/data/rules/mit_82.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_reference: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_836.RULE b/src/licensedcode/data/rules/mit_836.RULE
index 3a78cb9de7..d87c8028b4 100644
--- a/src/licensedcode/data/rules/mit_836.RULE
+++ b/src/licensedcode/data/rules/mit_836.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- COPYING
---
-// This software is made available under the MIT License
+// This software is made available {{under the MIT License}}
// See COPYING for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_837.RULE b/src/licensedcode/data/rules/mit_837.RULE
index 7e43b3e667..281acc9222 100644
--- a/src/licensedcode/data/rules/mit_837.RULE
+++ b/src/licensedcode/data/rules/mit_837.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-* This file is made available under the MIT License (view the LICENSE file for more information).
\ No newline at end of file
+* This file is made available {{under the MIT License}} (view the LICENSE file for more information).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_838.RULE b/src/licensedcode/data/rules/mit_838.RULE
index bab82443bb..8b1ca91317 100644
--- a/src/licensedcode/data/rules/mit_838.RULE
+++ b/src/licensedcode/data/rules/mit_838.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-is made available under the MIT license.
+is made available {{under the MIT license}}.
/// Do not use it if you have not received an associated LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_839.RULE b/src/licensedcode/data/rules/mit_839.RULE
index 37e9c5ee19..7ae7e42eb9 100644
--- a/src/licensedcode/data/rules/mit_839.RULE
+++ b/src/licensedcode/data/rules/mit_839.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE
---
-This work is made available under the "MIT License".
+This work is made available {{under the "MIT License}}".
Please see the file LICENSE in this distribution for
license terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_840.RULE b/src/licensedcode/data/rules/mit_840.RULE
index f96e73208f..cfc82ed5e3 100644
--- a/src/licensedcode/data/rules/mit_840.RULE
+++ b/src/licensedcode/data/rules/mit_840.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
---
is
-made available under the MIT license. See the file LICENSE that accompanies
+made available {{under the MIT license}}. See the file LICENSE that accompanies
this software for license terms and conditions.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_841.RULE b/src/licensedcode/data/rules/mit_841.RULE
index fe600733cb..46ca5879af 100644
--- a/src/licensedcode/data/rules/mit_841.RULE
+++ b/src/licensedcode/data/rules/mit_841.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-made available under the MIT license. See the file LICENSE that accompanies
+made available {{under the MIT license}}. See the file LICENSE that accompanies
this software for license terms and conditions.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_842.RULE b/src/licensedcode/data/rules/mit_842.RULE
index 02239317f1..82ed27a510 100644
--- a/src/licensedcode/data/rules/mit_842.RULE
+++ b/src/licensedcode/data/rules/mit_842.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-is made available under the MIT license. Pleace see the LICENSE file
+is made available {{under the MIT license}}. Pleace see the LICENSE file
for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_843.RULE b/src/licensedcode/data/rules/mit_843.RULE
index c4ac217963..3411a7107b 100644
--- a/src/licensedcode/data/rules/mit_843.RULE
+++ b/src/licensedcode/data/rules/mit_843.RULE
@@ -8,5 +8,5 @@ referenced_filenames:
License
-This program is made available under the MIT License, a copy of which can be
+This program is made available {{under the MIT License}}, a copy of which can be
found in the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_844.RULE b/src/licensedcode/data/rules/mit_844.RULE
index ad21ec9e52..0b5ae7297a 100644
--- a/src/licensedcode/data/rules/mit_844.RULE
+++ b/src/licensedcode/data/rules/mit_844.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This program is made available under the MIT License, a copy of which can be
+This program is made available {{under the MIT License}}, a copy of which can be
found in the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_845.RULE b/src/licensedcode/data/rules/mit_845.RULE
index 0ec59f7183..ac73945d86 100644
--- a/src/licensedcode/data/rules/mit_845.RULE
+++ b/src/licensedcode/data/rules/mit_845.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-made available under the MIT license. Pleace see the LICENSE file
+made available {{under the MIT license}}. Pleace see the LICENSE file
for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_846.RULE b/src/licensedcode/data/rules/mit_846.RULE
index 6bc05e4937..c570220805 100644
--- a/src/licensedcode/data/rules/mit_846.RULE
+++ b/src/licensedcode/data/rules/mit_846.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This program is made available under the MIT License
+This program is made available {{under the MIT License}}
See the LICENSE file for more details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_847.RULE b/src/licensedcode/data/rules/mit_847.RULE
index 31e9bdbac9..a1fd7d7474 100644
--- a/src/licensedcode/data/rules/mit_847.RULE
+++ b/src/licensedcode/data/rules/mit_847.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
---
is free software
-that is made available under the MIT license. Consult the file "LICENSE"
+that is made available {{under the MIT license}}. Consult the file "LICENSE"
that is distributed together with this file for the exact licensing terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_848.RULE b/src/licensedcode/data/rules/mit_848.RULE
index 91bbd15dc0..14d2e50fb9 100644
--- a/src/licensedcode/data/rules/mit_848.RULE
+++ b/src/licensedcode/data/rules/mit_848.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
---
free software
-that is made available under the MIT license. Consult the file "LICENSE"
+that is made available {{under the MIT license}}. Consult the file "LICENSE"
that is distributed together with this file for the exact licensing terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_849.RULE b/src/licensedcode/data/rules/mit_849.RULE
index 41185ee2a8..39aa6a7078 100644
--- a/src/licensedcode/data/rules/mit_849.RULE
+++ b/src/licensedcode/data/rules/mit_849.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-is made available under the MIT license. Consult the file "LICENSE"
+is made available {{under the MIT license}}. Consult the file "LICENSE"
that is distributed together with this file for the exact licensing terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_850.RULE b/src/licensedcode/data/rules/mit_850.RULE
index 1483c1cce9..2e2678dfb4 100644
--- a/src/licensedcode/data/rules/mit_850.RULE
+++ b/src/licensedcode/data/rules/mit_850.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-made available under the MIT license. Consult the file "LICENSE"
+made available {{under the MIT license}}. Consult the file "LICENSE"
that is distributed together with this file for the exact licensing terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_851.RULE b/src/licensedcode/data/rules/mit_851.RULE
index 10ea9a6ecd..92dc8f6cd9 100644
--- a/src/licensedcode/data/rules/mit_851.RULE
+++ b/src/licensedcode/data/rules/mit_851.RULE
@@ -7,5 +7,5 @@ referenced_filenames:
---
License
-As with all my work, all code in this repository is made available under the
-MIT License. See LICENSE for more.
\ No newline at end of file
+As with all my work, all code in this repository is made available {{under the
+MIT License}}. See LICENSE for more.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_852.RULE b/src/licensedcode/data/rules/mit_852.RULE
index d3c80657d4..1266d4be59 100644
--- a/src/licensedcode/data/rules/mit_852.RULE
+++ b/src/licensedcode/data/rules/mit_852.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-As with all my work, all code in this repository is made available under the
-MIT License. See LICENSE for more.
\ No newline at end of file
+As with all my work, all code in this repository is made available {{under the
+MIT License}}. See LICENSE for more.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_853.RULE b/src/licensedcode/data/rules/mit_853.RULE
index cf3254c459..c59181fb5b 100644
--- a/src/licensedcode/data/rules/mit_853.RULE
+++ b/src/licensedcode/data/rules/mit_853.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-all code in this repository is made available under the
-MIT License. See LICENSE for more.
\ No newline at end of file
+all code in this repository is made available {{under the
+MIT License}}. See LICENSE for more.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_854.RULE b/src/licensedcode/data/rules/mit_854.RULE
index 4b9d9ab116..222346119d 100644
--- a/src/licensedcode/data/rules/mit_854.RULE
+++ b/src/licensedcode/data/rules/mit_854.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE.txt
---
-The code in this distribution is made available under the MIT License.
+The code in this distribution is made available {{under the MIT License}}.
See LICENSE.txt for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_855.RULE b/src/licensedcode/data/rules/mit_855.RULE
index 18e8166622..bf07a84de3 100644
--- a/src/licensedcode/data/rules/mit_855.RULE
+++ b/src/licensedcode/data/rules/mit_855.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-This project is made available under the MIT license. See the file LICENSE in this distribution for license terms.
\ No newline at end of file
+This project is made available {{under the MIT license}}. See the file LICENSE in this distribution for license terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_856.RULE b/src/licensedcode/data/rules/mit_856.RULE
index 8fbd9494f9..efc1c421fa 100644
--- a/src/licensedcode/data/rules/mit_856.RULE
+++ b/src/licensedcode/data/rules/mit_856.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project is made available under the MIT license. See the file LICENSE in this distribution for license terms.
\ No newline at end of file
+This project is made available {{under the MIT license}}. See the file LICENSE in this distribution for license terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_857.RULE b/src/licensedcode/data/rules/mit_857.RULE
index 3f1a35e7a3..4669559268 100644
--- a/src/licensedcode/data/rules/mit_857.RULE
+++ b/src/licensedcode/data/rules/mit_857.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-The application is made available under the [MIT License](LICENSE).
\ No newline at end of file
+The application is made available {{under the [MIT License}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_858.RULE b/src/licensedcode/data/rules/mit_858.RULE
index 8b235bb2b2..2864033663 100644
--- a/src/licensedcode/data/rules/mit_858.RULE
+++ b/src/licensedcode/data/rules/mit_858.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-The application is made available under the [MIT License](LICENSE).
\ No newline at end of file
+The application is made available {{under the [MIT License}}](LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_859.RULE b/src/licensedcode/data/rules/mit_859.RULE
index d2c2d970c8..41e8f399a6 100644
--- a/src/licensedcode/data/rules/mit_859.RULE
+++ b/src/licensedcode/data/rules/mit_859.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-is made available under the MIT license. The license can be viewed [here](LICENSE.txt).
\ No newline at end of file
+is made available {{under the MIT license}}. The license can be viewed [here](LICENSE.txt).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_86.RULE b/src/licensedcode/data/rules/mit_86.RULE
index bd1355b971..033d7c5aaa 100644
--- a/src/licensedcode/data/rules/mit_86.RULE
+++ b/src/licensedcode/data/rules/mit_86.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
---
This source file is free software, available under the following license:
- MIT license - http://datatables.net/license/mit
+ {{MIT license}} - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
diff --git a/src/licensedcode/data/rules/mit_860.RULE b/src/licensedcode/data/rules/mit_860.RULE
index 3d54a731f7..ad1682b1c3 100644
--- a/src/licensedcode/data/rules/mit_860.RULE
+++ b/src/licensedcode/data/rules/mit_860.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-made available under the MIT license. The license can be viewed [here](LICENSE.txt).
\ No newline at end of file
+made available {{under the MIT license}}. The license can be viewed [here](LICENSE.txt).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_862.RULE b/src/licensedcode/data/rules/mit_862.RULE
index 24d1c1da75..a097f3638f 100644
--- a/src/licensedcode/data/rules/mit_862.RULE
+++ b/src/licensedcode/data/rules/mit_862.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-is made available under the [MIT License](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+is made available {{under the [MIT License}}](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_864.RULE b/src/licensedcode/data/rules/mit_864.RULE
index 89e8b067f7..c6a23df62c 100644
--- a/src/licensedcode/data/rules/mit_864.RULE
+++ b/src/licensedcode/data/rules/mit_864.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-This utility is made available under the "MIT License". Please see the file LICENSE in this distribution for license terms.
\ No newline at end of file
+This utility is made available {{under the "MIT License}}". Please see the file LICENSE in this distribution for license terms.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_865.RULE b/src/licensedcode/data/rules/mit_865.RULE
index 6928030328..624fa1b42f 100644
--- a/src/licensedcode/data/rules/mit_865.RULE
+++ b/src/licensedcode/data/rules/mit_865.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-is made available under the [MIT license](LICENSE.md).
\ No newline at end of file
+is made available {{under the [MIT license}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_866.RULE b/src/licensedcode/data/rules/mit_866.RULE
index f0599be8dd..2f63cce02d 100644
--- a/src/licensedcode/data/rules/mit_866.RULE
+++ b/src/licensedcode/data/rules/mit_866.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-is made available under the [MIT license](LICENSE.md).
\ No newline at end of file
+is made available {{under the [MIT license}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_867.RULE b/src/licensedcode/data/rules/mit_867.RULE
index 081d686d65..18c2e80f2f 100644
--- a/src/licensedcode/data/rules/mit_867.RULE
+++ b/src/licensedcode/data/rules/mit_867.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.md
---
-made available under the [MIT license](LICENSE.md).
\ No newline at end of file
+made available {{under the [MIT license}}](LICENSE.md).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_868.RULE b/src/licensedcode/data/rules/mit_868.RULE
index fa98a8da6d..f2133d13a2 100644
--- a/src/licensedcode/data/rules/mit_868.RULE
+++ b/src/licensedcode/data/rules/mit_868.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
License
-This code is made available under the [MIT license](LICENSE.txt).
\ No newline at end of file
+This code is made available {{under the [MIT license}}](LICENSE.txt).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_869.RULE b/src/licensedcode/data/rules/mit_869.RULE
index ff70dac63a..8394739707 100644
--- a/src/licensedcode/data/rules/mit_869.RULE
+++ b/src/licensedcode/data/rules/mit_869.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.txt
---
-This code is made available under the [MIT license](LICENSE.txt).
\ No newline at end of file
+This code is made available {{under the [MIT license}}](LICENSE.txt).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_87.RULE b/src/licensedcode/data/rules/mit_87.RULE
index a607898e5c..0588923ffb 100644
--- a/src/licensedcode/data/rules/mit_87.RULE
+++ b/src/licensedcode/data/rules/mit_87.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
---
This source file is free software, available under the following license:
- MIT license - http://datatables.net/license
+ {{MIT license}} - http://datatables.net/license
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
diff --git a/src/licensedcode/data/rules/mit_870.RULE b/src/licensedcode/data/rules/mit_870.RULE
index 85af636e5f..2c5dcd9612 100644
--- a/src/licensedcode/data/rules/mit_870.RULE
+++ b/src/licensedcode/data/rules/mit_870.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
---
License
-The software code contained within this repository is made available under the
-[MIT license](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+The software code contained within this repository is made available {{under the
+[MIT license}}](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_871.RULE b/src/licensedcode/data/rules/mit_871.RULE
index 7bb8e4c3ed..90eff6749f 100644
--- a/src/licensedcode/data/rules/mit_871.RULE
+++ b/src/licensedcode/data/rules/mit_871.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.php
---
-The software code contained within this repository is made available under the
-[MIT license](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+The software code contained within this repository is made available {{under the
+[MIT license}}](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_88.RULE b/src/licensedcode/data/rules/mit_88.RULE
index 38b312b450..367004cdac 100644
--- a/src/licensedcode/data/rules/mit_88.RULE
+++ b/src/licensedcode/data/rules/mit_88.RULE
@@ -1,6 +1,7 @@
---
license_expression: mit
is_license_notice: yes
+is_required_phrase: yes
relevance: 100
---
diff --git a/src/licensedcode/data/rules/mit_884.RULE b/src/licensedcode/data/rules/mit_884.RULE
index d3e92c8546..3fd83da54c 100644
--- a/src/licensedcode/data/rules/mit_884.RULE
+++ b/src/licensedcode/data/rules/mit_884.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/mit-license.php
---
-made available under the [MIT License](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+made available {{under the [MIT License}}](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_885.RULE b/src/licensedcode/data/rules/mit_885.RULE
index c08d8798d2..64bac56379 100644
--- a/src/licensedcode/data/rules/mit_885.RULE
+++ b/src/licensedcode/data/rules/mit_885.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.php
---
-made available under the [MIT License](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+made available {{under the [MIT License}}](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_886.RULE b/src/licensedcode/data/rules/mit_886.RULE
index 7a4679b720..a18efe03c7 100644
--- a/src/licensedcode/data/rules/mit_886.RULE
+++ b/src/licensedcode/data/rules/mit_886.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/mit-license.php
---
-is made available under the [MIT License](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+is made available {{under the [MIT License}}](https://opensource.org/licenses/mit-license.php).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_889.RULE b/src/licensedcode/data/rules/mit_889.RULE
index 7978f371c2..bf9205ce18 100644
--- a/src/licensedcode/data/rules/mit_889.RULE
+++ b/src/licensedcode/data/rules/mit_889.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://en.m.wikipedia.org/wiki/MIT_License
---
-The library is made available under the MIT license.
+The library is made available {{under the MIT license}}.
http://en.m.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_890.RULE b/src/licensedcode/data/rules/mit_890.RULE
index 913d3b3888..54cd10ab85 100644
--- a/src/licensedcode/data/rules/mit_890.RULE
+++ b/src/licensedcode/data/rules/mit_890.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://en.wikipedia.org/wiki/MIT_License
---
-The library is made available under the MIT license.
+The library is made available {{under the MIT license}}.
http://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_891.RULE b/src/licensedcode/data/rules/mit_891.RULE
index f875284270..312f5c967f 100644
--- a/src/licensedcode/data/rules/mit_891.RULE
+++ b/src/licensedcode/data/rules/mit_891.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://en.m.wikipedia.org/wiki/MIT_License
---
-The library is made available under the MIT license.
+The library is made available {{under the MIT license}}.
https://en.m.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_892.RULE b/src/licensedcode/data/rules/mit_892.RULE
index c0a40224b3..9a78971783 100644
--- a/src/licensedcode/data/rules/mit_892.RULE
+++ b/src/licensedcode/data/rules/mit_892.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://en.wikipedia.org/wiki/MIT_License
---
-The library is made available under the MIT license.
+The library is made available {{under the MIT license}}.
https://en.wikipedia.org/wiki/MIT_License
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_893.RULE b/src/licensedcode/data/rules/mit_893.RULE
index 3223afd8ad..7ddbfbb2b7 100644
--- a/src/licensedcode/data/rules/mit_893.RULE
+++ b/src/licensedcode/data/rules/mit_893.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-The work is made available under the [MIT License](http://opensource.org/licenses/MIT).
\ No newline at end of file
+The work is made available {{under the [MIT License}}](http://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_894.RULE b/src/licensedcode/data/rules/mit_894.RULE
index 43e92ff5c7..2bb8ec8ffd 100644
--- a/src/licensedcode/data/rules/mit_894.RULE
+++ b/src/licensedcode/data/rules/mit_894.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-The work is made available under the [MIT License](https://opensource.org/licenses/MIT).
\ No newline at end of file
+The work is made available {{under the [MIT License}}](https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_895.RULE b/src/licensedcode/data/rules/mit_895.RULE
index 0ac1a66b07..5eaf72b625 100644
--- a/src/licensedcode/data/rules/mit_895.RULE
+++ b/src/licensedcode/data/rules/mit_895.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.html/
---
-This code is made available under the MIT License.
+This code is made available {{under the MIT License}}.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_898.RULE b/src/licensedcode/data/rules/mit_898.RULE
index 27f787b115..0454605bac 100644
--- a/src/licensedcode/data/rules/mit_898.RULE
+++ b/src/licensedcode/data/rules/mit_898.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-This work is made available under [The MIT License](https://opensource.org/licenses/MIT).
\ No newline at end of file
+This work is made available {{under [The MIT License}}](https://opensource.org/licenses/MIT).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_9.RULE b/src/licensedcode/data/rules/mit_9.RULE
index 880c7a83ab..aa35a913a4 100644
--- a/src/licensedcode/data/rules/mit_9.RULE
+++ b/src/licensedcode/data/rules/mit_9.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://en.wikipedia.org/wiki/MIT_License
---
-Licensed under the MIT (http://en.wikipedia.org/wiki/MIT_License) license.
\ No newline at end of file
+{{Licensed under the MIT}} (http://en.wikipedia.org/wiki/MIT_License) license.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_904.RULE b/src/licensedcode/data/rules/mit_904.RULE
index 0ce8a2e534..b237561ebc 100644
--- a/src/licensedcode/data/rules/mit_904.RULE
+++ b/src/licensedcode/data/rules/mit_904.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.html
---
-This code is made available under the MIT License.
+This code is made available {{under the MIT License}}.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_908.RULE b/src/licensedcode/data/rules/mit_908.RULE
index 994139a686..09d78db84a 100644
--- a/src/licensedcode/data/rules/mit_908.RULE
+++ b/src/licensedcode/data/rules/mit_908.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://choosealicense.com/licenses/mit
---
-is made available under the [MIT License](http://choosealicense.com/licenses/mit/).
\ No newline at end of file
+is made available {{under the [MIT License}}](http://choosealicense.com/licenses/mit/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_909.RULE b/src/licensedcode/data/rules/mit_909.RULE
index 8ebd7dd8cb..722f601c3c 100644
--- a/src/licensedcode/data/rules/mit_909.RULE
+++ b/src/licensedcode/data/rules/mit_909.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://choosealicense.com/licenses/mit
---
-made available under the [MIT License](http://choosealicense.com/licenses/mit/).
\ No newline at end of file
+made available {{under the [MIT License}}](http://choosealicense.com/licenses/mit/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_910.RULE b/src/licensedcode/data/rules/mit_910.RULE
index 69068275f5..99b9987fa7 100644
--- a/src/licensedcode/data/rules/mit_910.RULE
+++ b/src/licensedcode/data/rules/mit_910.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://choosealicense.com/licenses/mit
---
-is made available under the [MIT License](https://choosealicense.com/licenses/mit/).
\ No newline at end of file
+is made available {{under the [MIT License}}](https://choosealicense.com/licenses/mit/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_912.RULE b/src/licensedcode/data/rules/mit_912.RULE
index d240d0e256..06c94f9980 100644
--- a/src/licensedcode/data/rules/mit_912.RULE
+++ b/src/licensedcode/data/rules/mit_912.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This sample code is made available under the MIT license. See the LICENSE file.
\ No newline at end of file
+This sample code is made available {{under the MIT license}}. See the LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_92.RULE b/src/licensedcode/data/rules/mit_92.RULE
index 14262b04d0..a1d9f556cf 100644
--- a/src/licensedcode/data/rules/mit_92.RULE
+++ b/src/licensedcode/data/rules/mit_92.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- license.txt
---
-Released under MIT License. Please refer to license.txt for details
\ No newline at end of file
+Released {{under MIT License}}. Please refer to license.txt for details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_921.RULE b/src/licensedcode/data/rules/mit_921.RULE
index 9fc41e985d..f34ced8c84 100644
--- a/src/licensedcode/data/rules/mit_921.RULE
+++ b/src/licensedcode/data/rules/mit_921.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-licensed under the MIT license (see the LICENSE file for details).
\ No newline at end of file
+{{licensed under the MIT}} license (see the LICENSE file for details).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_924.RULE b/src/licensedcode/data/rules/mit_924.RULE
index 9b33dd26d5..edf131e198 100644
--- a/src/licensedcode/data/rules/mit_924.RULE
+++ b/src/licensedcode/data/rules/mit_924.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-Distributed under the MIT License. See LICENSE for more information.
\ No newline at end of file
+{{Distributed under the MIT License}}. See LICENSE for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_926.RULE b/src/licensedcode/data/rules/mit_926.RULE
index e79b14bc7a..ce711aca62 100644
--- a/src/licensedcode/data/rules/mit_926.RULE
+++ b/src/licensedcode/data/rules/mit_926.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-This project is licensed under terms of the MIT License -
+This project is licensed under terms of {{the MIT License}} -
https://opensource.org/licenses/MIT
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_927.RULE b/src/licensedcode/data/rules/mit_927.RULE
index 2d0ef108ac..28ea461518 100644
--- a/src/licensedcode/data/rules/mit_927.RULE
+++ b/src/licensedcode/data/rules/mit_927.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-This project is licensed under terms of the MIT License -
+This project is licensed under terms of {{the MIT License}} -
https://opensource.org/licenses/MIT
See also:
diff --git a/src/licensedcode/data/rules/mit_929.RULE b/src/licensedcode/data/rules/mit_929.RULE
index 6664526afb..fe4bd18647 100644
--- a/src/licensedcode/data/rules/mit_929.RULE
+++ b/src/licensedcode/data/rules/mit_929.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
- https://jquery.org/license
---
-* jQuery__ is published under the terms of the [MIT license](https://jquery.org/license/).
\ No newline at end of file
+* jQuery__ is published under the terms of {{the [MIT license}}](https://jquery.org/license/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_93.RULE b/src/licensedcode/data/rules/mit_93.RULE
index 7ba6e34421..bb3b00790c 100644
--- a/src/licensedcode/data/rules/mit_93.RULE
+++ b/src/licensedcode/data/rules/mit_93.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-This software is distributed under [MIT license](http://www.opensource.org/licenses/mit-license.php),
+This software is {{distributed under [MIT license}}](http://www.opensource.org/licenses/mit-license.php),
so feel free to integrate it in your commercial products.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_930.RULE b/src/licensedcode/data/rules/mit_930.RULE
index 0bea75c52c..ea7ed98be6 100644
--- a/src/licensedcode/data/rules/mit_930.RULE
+++ b/src/licensedcode/data/rules/mit_930.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
---
License
-date- is licensed under the [MIT license](http://.mit-license.org).
+date- is {{licensed under the [MIT}} license](http://.{{mit-license}}.org).
Read more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_931.RULE b/src/licensedcode/data/rules/mit_931.RULE
index 4e816504d1..955d547c87 100644
--- a/src/licensedcode/data/rules/mit_931.RULE
+++ b/src/licensedcode/data/rules/mit_931.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This project is licensed under the terms of the MIT license.
+This project is licensed under the terms of {{the MIT license}}.
Please see the file LICENSE for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_932.RULE b/src/licensedcode/data/rules/mit_932.RULE
index 4c28a56b50..56d5955af6 100644
--- a/src/licensedcode/data/rules/mit_932.RULE
+++ b/src/licensedcode/data/rules/mit_932.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This project is licensed under the terms of the MIT license.
+This project is licensed under the terms of {{the MIT license}}.
Please see the LICENSE file for details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_933.RULE b/src/licensedcode/data/rules/mit_933.RULE
index 25a27ac374..cca576e36c 100644
--- a/src/licensedcode/data/rules/mit_933.RULE
+++ b/src/licensedcode/data/rules/mit_933.RULE
@@ -8,4 +8,4 @@ notes: https://github.com/newren/git-filter-repo/blob/e9e0308df1e9e792598b8e41d0
---
most the files in this repository (exceptions
-noted below) are provided under the MIT license (see COPYING.mit).
\ No newline at end of file
+noted below) are provided {{under the MIT license}} (see COPYING.mit).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_939.RULE b/src/licensedcode/data/rules/mit_939.RULE
index 18784c8509..1311e205ce 100644
--- a/src/licensedcode/data/rules/mit_939.RULE
+++ b/src/licensedcode/data/rules/mit_939.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-open source, licensed under a standard MIT license
+open source, licensed under a standard {{MIT license}}
(included in this repository as ``LICENSE``).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_94.RULE b/src/licensedcode/data/rules/mit_94.RULE
index dcbcad1217..3c33e21b11 100644
--- a/src/licensedcode/data/rules/mit_94.RULE
+++ b/src/licensedcode/data/rules/mit_94.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-This software is distributed under [MIT license](http://www.opensource.org/licenses/mit-license.php),
\ No newline at end of file
+This software is {{distributed under [MIT license}}](http://www.opensource.org/licenses/mit-license.php),
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_948.RULE b/src/licensedcode/data/rules/mit_948.RULE
index ba8c86f466..8cfb0d9fe1 100644
--- a/src/licensedcode/data/rules/mit_948.RULE
+++ b/src/licensedcode/data/rules/mit_948.RULE
@@ -7,7 +7,7 @@ ignorable_urls:
---
X.Org Preferred License
-The X.Org Foundation has chosen the following format of the MIT License as the
+The X.Org Foundation has chosen the following format of {{the MIT License}} as the
preferred format for code included in the X Window System distribution. This is
-a slight variant of the common MIT license form published by the Open Source
+a slight variant of the common {{MIT license}} form published by the Open Source
Initiative at https://www.opensource.org/licenses/mit-license.php.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_949.RULE b/src/licensedcode/data/rules/mit_949.RULE
index 7cf6338fb9..5d64afb98f 100644
--- a/src/licensedcode/data/rules/mit_949.RULE
+++ b/src/licensedcode/data/rules/mit_949.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
* License
-This project is licensed under MIT (see [[./LICENSE]])
\ No newline at end of file
+This project is {{licensed under MIT}} (see [[./LICENSE]])
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_950.RULE b/src/licensedcode/data/rules/mit_950.RULE
index 1e2c2f665e..ec4f7d2b7b 100644
--- a/src/licensedcode/data/rules/mit_950.RULE
+++ b/src/licensedcode/data/rules/mit_950.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-This project is licensed under MIT (see [[./LICENSE]])
\ No newline at end of file
+This project is {{licensed under MIT}} (see [[./LICENSE]])
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_952.RULE b/src/licensedcode/data/rules/mit_952.RULE
index 1a02288340..407cca5c1b 100644
--- a/src/licensedcode/data/rules/mit_952.RULE
+++ b/src/licensedcode/data/rules/mit_952.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE.rst
---
-Licensed under the MIT License (see file LICENSE.rst for details).
\ No newline at end of file
+{{Licensed under the MIT}} License (see file LICENSE.rst for details).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_953.RULE b/src/licensedcode/data/rules/mit_953.RULE
index 9e700c442a..82076382da 100644
--- a/src/licensedcode/data/rules/mit_953.RULE
+++ b/src/licensedcode/data/rules/mit_953.RULE
@@ -6,5 +6,5 @@ ignorable_urls:
- http://mit-license.org/
---
-made available under [the MIT
-license](http://mit-license.org/).
\ No newline at end of file
+made available {{under [the MIT
+license}}](http://mit-license.org/).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_954.RULE b/src/licensedcode/data/rules/mit_954.RULE
index e02d3b7bab..5f02670b36 100644
--- a/src/licensedcode/data/rules/mit_954.RULE
+++ b/src/licensedcode/data/rules/mit_954.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://www.opensource.org/licenses/mit-license.php
---
-This is the MIT license: http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+This is {{the MIT license}}: http://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_955.RULE b/src/licensedcode/data/rules/mit_955.RULE
index d378e22d45..680480ccfe 100644
--- a/src/licensedcode/data/rules/mit_955.RULE
+++ b/src/licensedcode/data/rules/mit_955.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://www.opensource.org/licenses/mit-license.php
---
-This is the MIT license: https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
+This is {{the MIT license}}: https://www.opensource.org/licenses/mit-license.php
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_956.RULE b/src/licensedcode/data/rules/mit_956.RULE
index 4e6c63aeb3..4d626e6d9b 100644
--- a/src/licensedcode/data/rules/mit_956.RULE
+++ b/src/licensedcode/data/rules/mit_956.RULE
@@ -6,5 +6,5 @@ referenced_filenames:
- LICENSE
---
-This software is released under MIT license.
+This software is released {{under MIT license}}.
The full license information can be found in LICENSE in the root directory of this project.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_964.RULE b/src/licensedcode/data/rules/mit_964.RULE
index c8de263955..7bbc4a7590 100644
--- a/src/licensedcode/data/rules/mit_964.RULE
+++ b/src/licensedcode/data/rules/mit_964.RULE
@@ -1,8 +1,9 @@
---
license_expression: mit
is_license_reference: yes
-relevance: 80
+is_required_phrase: yes
is_continuous: yes
+relevance: 80
---
-MIT STYLE
+MIT STYLE
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_983.RULE b/src/licensedcode/data/rules/mit_983.RULE
index 272ba3c734..c8cd3bd91c 100644
--- a/src/licensedcode/data/rules/mit_983.RULE
+++ b/src/licensedcode/data/rules/mit_983.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-library is licensed under the MIT "expat" license (https://opensource.org/licenses/MIT)
\ No newline at end of file
+library is {{licensed under the MIT}} "expat" license (https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_984.RULE b/src/licensedcode/data/rules/mit_984.RULE
index 8a376ecd42..a1bb7ddeef 100644
--- a/src/licensedcode/data/rules/mit_984.RULE
+++ b/src/licensedcode/data/rules/mit_984.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-is licensed under the MIT "expat" license (https://opensource.org/licenses/MIT)
\ No newline at end of file
+is {{licensed under the MIT}} "expat" license (https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_986.RULE b/src/licensedcode/data/rules/mit_986.RULE
index ce3d785abf..09b48a8799 100644
--- a/src/licensedcode/data/rules/mit_986.RULE
+++ b/src/licensedcode/data/rules/mit_986.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
---
## License
- is licensed under the [MIT License](https://github.com/blob/master/LICENSE).
\ No newline at end of file
+ is {{licensed under the [MIT}} License](https://github.com/blob/master/LICENSE).
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_987.RULE b/src/licensedcode/data/rules/mit_987.RULE
index fc1cad9251..154242fa96 100644
--- a/src/licensedcode/data/rules/mit_987.RULE
+++ b/src/licensedcode/data/rules/mit_987.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-licensed under the MIT "expat" license (https://opensource.org/licenses/MIT)
\ No newline at end of file
+{{licensed under the MIT}} "expat" license (https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_988.RULE b/src/licensedcode/data/rules/mit_988.RULE
index 6d4a3802c3..4368a74bd3 100644
--- a/src/licensedcode/data/rules/mit_988.RULE
+++ b/src/licensedcode/data/rules/mit_988.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-library is licensed under the MIT "expat" license (http://opensource.org/licenses/MIT)
\ No newline at end of file
+library is {{licensed under the MIT}} "expat" license (http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_989.RULE b/src/licensedcode/data/rules/mit_989.RULE
index c46d7ebf1c..697c2c3ee3 100644
--- a/src/licensedcode/data/rules/mit_989.RULE
+++ b/src/licensedcode/data/rules/mit_989.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-is licensed under the MIT "expat" license (http://opensource.org/licenses/MIT)
\ No newline at end of file
+is {{licensed under the MIT}} "expat" license (http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_990.RULE b/src/licensedcode/data/rules/mit_990.RULE
index 2e5e709eeb..0a6afa5182 100644
--- a/src/licensedcode/data/rules/mit_990.RULE
+++ b/src/licensedcode/data/rules/mit_990.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-licensed under the MIT "expat" license (http://opensource.org/licenses/MIT)
\ No newline at end of file
+{{licensed under the MIT}} "expat" license (http://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_992.RULE b/src/licensedcode/data/rules/mit_992.RULE
index a8e264ffe3..29ffe6b22a 100644
--- a/src/licensedcode/data/rules/mit_992.RULE
+++ b/src/licensedcode/data/rules/mit_992.RULE
@@ -8,7 +8,7 @@ ignorable_urls:
osi-certified osi certified
Lua is free software distributed under the terms of the
-http://www.opensource.org/licenses/mit-license.html MIT license
+http://www.opensource.org/licenses/mit-license.html {{MIT license}}
reproduced below;
it may be used for any purpose, including commercial purposes,
at absolutely no cost without having to ask us.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_997.RULE b/src/licensedcode/data/rules/mit_997.RULE
index 25bb3ee702..cceb887d03 100644
--- a/src/licensedcode/data/rules/mit_997.RULE
+++ b/src/licensedcode/data/rules/mit_997.RULE
@@ -6,6 +6,6 @@ referenced_filenames:
- LICENSE
---
-License
+{{License
-MIT. See [LICENSE](LICENSE) for more information.
\ No newline at end of file
+MIT}}. See [LICENSE](LICENSE) for more information.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_an2.RULE b/src/licensedcode/data/rules/mit_an2.RULE
index 54b7443986..f5e91ad4d6 100644
--- a/src/licensedcode/data/rules/mit_an2.RULE
+++ b/src/licensedcode/data/rules/mit_an2.RULE
@@ -6,4 +6,4 @@ ignorable_urls:
- https://github.com/jsforce/jsforce/blob/master/LICENSE
---
-Code licensed under https://github.com/jsforce/jsforce/blob/master/LICENSE">the MIT License
\ No newline at end of file
+Code licensed under https://github.com/jsforce/jsforce/blob/master/LICENSE">{{the MIT License}}
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_atomic.RULE b/src/licensedcode/data/rules/mit_atomic.RULE
index 6a42a12243..24eb10f9f1 100644
--- a/src/licensedcode/data/rules/mit_atomic.RULE
+++ b/src/licensedcode/data/rules/mit_atomic.RULE
@@ -8,4 +8,4 @@ referenced_filenames:
License
-Licensed under the MIT, see LICENSE.
\ No newline at end of file
+{{Licensed under the MIT}}, see LICENSE.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_augur.RULE b/src/licensedcode/data/rules/mit_augur.RULE
index 7fc9dc18f6..7ae94f7756 100644
--- a/src/licensedcode/data/rules/mit_augur.RULE
+++ b/src/licensedcode/data/rules/mit_augur.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-is free software: you can redistribute it and/or modify it under the terms of the MIT License as published by the Open Source Initiative. See the file LICENSE for more details.
\ No newline at end of file
+is free software: you can redistribute it and/or modify it under the terms of {{the MIT License}} as published by the Open Source Initiative. See the file LICENSE for more details.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_file.RULE b/src/licensedcode/data/rules/mit_file.RULE
index 37738eea3f..6b7fc164e1 100644
--- a/src/licensedcode/data/rules/mit_file.RULE
+++ b/src/licensedcode/data/rules/mit_file.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-is released under the terms of the MIT license. Full details in LICENSE file.
\ No newline at end of file
+is released under the terms of {{the MIT license}}. Full details in LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_file2.RULE b/src/licensedcode/data/rules/mit_file2.RULE
index 0afb02c452..55c1776e9a 100644
--- a/src/licensedcode/data/rules/mit_file2.RULE
+++ b/src/licensedcode/data/rules/mit_file2.RULE
@@ -7,4 +7,4 @@ referenced_filenames:
---
license
-is released under the terms of the MIT license. Full details in LICENSE file.
\ No newline at end of file
+is released under the terms of {{the MIT license}}. Full details in LICENSE file.
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_license.RULE b/src/licensedcode/data/rules/mit_license.RULE
index 9e572e6768..912f853696 100644
--- a/src/licensedcode/data/rules/mit_license.RULE
+++ b/src/licensedcode/data/rules/mit_license.RULE
@@ -6,4 +6,4 @@ referenced_filenames:
- LICENSE
---
-license: MIT License, see LICENSE for more details
\ No newline at end of file
+license: {{MIT License}}, see LICENSE for more details
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_licensed2.RULE b/src/licensedcode/data/rules/mit_licensed2.RULE
index a64f0fc79a..16f41e2970 100644
--- a/src/licensedcode/data/rules/mit_licensed2.RULE
+++ b/src/licensedcode/data/rules/mit_licensed2.RULE
@@ -8,4 +8,4 @@ ignorable_urls:
## License
-[MIT License](https://opensource.org/licenses/MIT)
\ No newline at end of file
+[{{MIT License}}](https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_not_apache-2.0.RULE b/src/licensedcode/data/rules/mit_not_apache-2.0.RULE
index b186f5f14d..f39dfc73f2 100644
--- a/src/licensedcode/data/rules/mit_not_apache-2.0.RULE
+++ b/src/licensedcode/data/rules/mit_not_apache-2.0.RULE
@@ -6,7 +6,7 @@ ignorable_urls:
- http://opensource.org/licenses/MIT
---
-Licensed under the MIT License (the "License"); you may not use this file except
+{{Licensed under the MIT}} License (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://opensource.org/licenses/MIT
diff --git a/src/licensedcode/data/rules/mit_required_phrase_1.RULE b/src/licensedcode/data/rules/mit_required_phrase_1.RULE
new file mode 100644
index 0000000000..dc9cdb7535
--- /dev/null
+++ b/src/licensedcode/data/rules/mit_required_phrase_1.RULE
@@ -0,0 +1,7 @@
+---
+license_expression: mit
+is_license_tag: yes
+is_required_phrase: yes
+---
+
+mit style license the mit license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_required_phrase_2.RULE b/src/licensedcode/data/rules/mit_required_phrase_2.RULE
new file mode 100644
index 0000000000..23d43c727e
--- /dev/null
+++ b/src/licensedcode/data/rules/mit_required_phrase_2.RULE
@@ -0,0 +1,7 @@
+---
+license_expression: mit
+is_license_tag: yes
+is_required_phrase: yes
+---
+
+mit license mit license with disclaimer
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_required_phrase_3.RULE b/src/licensedcode/data/rules/mit_required_phrase_3.RULE
new file mode 100644
index 0000000000..430c511636
--- /dev/null
+++ b/src/licensedcode/data/rules/mit_required_phrase_3.RULE
@@ -0,0 +1,7 @@
+---
+license_expression: mit
+is_license_tag: yes
+is_required_phrase: yes
+---
+
+mit like license see license rfl
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_required_phrase_4.RULE b/src/licensedcode/data/rules/mit_required_phrase_4.RULE
new file mode 100644
index 0000000000..bd815713ea
--- /dev/null
+++ b/src/licensedcode/data/rules/mit_required_phrase_4.RULE
@@ -0,0 +1,7 @@
+---
+license_expression: mit
+is_license_tag: yes
+is_required_phrase: yes
+---
+
+mit style license mit license
\ No newline at end of file
diff --git a/src/licensedcode/data/rules/mit_url_badge.RULE b/src/licensedcode/data/rules/mit_url_badge.RULE
index 0af7a35743..aa510246ff 100644
--- a/src/licensedcode/data/rules/mit_url_badge.RULE
+++ b/src/licensedcode/data/rules/mit_url_badge.RULE
@@ -7,4 +7,4 @@ ignorable_urls:
- https://opensource.org/licenses/MIT
---
-[](https://opensource.org/licenses/MIT)
\ No newline at end of file
+[](https://opensource.org/licenses/MIT)
\ No newline at end of file
diff --git a/src/licensedcode/match.py b/src/licensedcode/match.py
index afb0178a8c..6d5b0a1d6f 100644
--- a/src/licensedcode/match.py
+++ b/src/licensedcode/match.py
@@ -55,7 +55,7 @@
TRACE_FILTER_BELOW_MIN_SCORE = False
TRACE_FILTER_SINGLE_WORD_GIBBERISH = False
TRACE_SET_LINES = False
-TRACE_KEY_PHRASES = False
+TRACE_REQUIRED_PHRASES = False
TRACE_REGIONS = False
TRACE_FILTER_LICENSE_LIST = False
TRACE_FILTER_LICENSE_LIST_DETAILED = False
@@ -91,7 +91,7 @@ def logger_debug(*args): pass
or TRACE_MATCHED_TEXT_DETAILS
or TRACE_HIGHLIGHTED_TEXT
or TRACE_FILTER_SINGLE_WORD_GIBBERISH
- or TRACE_KEY_PHRASES
+ or TRACE_REQUIRED_PHRASES
or TRACE_REGIONS
or TRACE_FILTER_LICENSE_LIST
or TRACE_FILTER_LICENSE_LIST_DETAILED
@@ -133,7 +133,7 @@ def _debug_print_matched_query_text(match, extras=5):
class DiscardReason(IntEnum):
NOT_DISCARDED = 0
- MISSING_KEY_PHRASES = 1
+ MISSING_REQUIRED_PHRASES = 1
BELOW_MIN_COVERAGE = 2
SPURIOUS_SINGLE_TOKEN = 3
TOO_SHORT = 4
@@ -634,15 +634,15 @@ def combine(self, other):
discard_reason = DiscardReason.NOT_DISCARDED
elif (
- self.discard_reason == DiscardReason.MISSING_KEY_PHRASES
- and other.discard_reason == DiscardReason.MISSING_KEY_PHRASES
+ self.discard_reason == DiscardReason.MISSING_REQUIRED_PHRASES
+ and other.discard_reason == DiscardReason.MISSING_REQUIRED_PHRASES
):
- discard_reason = DiscardReason.MISSING_KEY_PHRASES
+ discard_reason = DiscardReason.MISSING_REQUIRED_PHRASES
- elif self.discard_reason == DiscardReason.MISSING_KEY_PHRASES:
+ elif self.discard_reason == DiscardReason.MISSING_REQUIRED_PHRASES:
discard_reason = other.discard_reason
- elif other.discard_reason == DiscardReason.MISSING_KEY_PHRASES:
+ elif other.discard_reason == DiscardReason.MISSING_REQUIRED_PHRASES:
discard_reason = self.discard_reason
else:
@@ -2116,17 +2116,17 @@ def filter_false_positive_matches(
return kept, discarded
-def filter_matches_missing_key_phrases(
+def filter_matches_missing_required_phrases(
matches,
- trace=TRACE_KEY_PHRASES,
- reason=DiscardReason.MISSING_KEY_PHRASES,
+ trace=TRACE_REQUIRED_PHRASES,
+ reason=DiscardReason.MISSING_REQUIRED_PHRASES,
):
"""
Return a filtered list of kept LicenseMatch matches and a list of
discardable matches given a ``matches`` list of LicenseMatch by removing
- all ``matches`` that do not contain all key phrases defined in their matched
+ all ``matches`` that do not contain all required phrases defined in their matched
rule.
- A key phrase must be matched exactly without gaps or unknown words.
+ A required phrase must be matched exactly without gaps or unknown words.
A rule with "is_continuous" set to True is the same as if its whole text
was defined as a keyphrase and is processed here too.
@@ -2143,14 +2143,14 @@ def filter_matches_missing_key_phrases(
discarded_append = discarded.append
if trace:
- logger_debug('filter_matches_missing_key_phrases')
+ logger_debug('filter_matches_missing_required_phrases')
for match in matches:
if trace:
logger_debug(' CHECKING KEY PHRASES for:', match)
is_continuous = match.rule.is_continuous
- ikey_spans = match.rule.key_phrase_spans
+ ikey_spans = match.rule.required_phrase_spans
if not (ikey_spans or is_continuous):
kept_append(match)
@@ -2180,11 +2180,11 @@ def filter_matches_missing_key_phrases(
# use whole ispan in this case
ikey_spans = [match.ispan]
- # keep matches as candidate if they contain all key phrase positions in the ispan
+ # keep matches as candidate if they contain all required phrase positions in the ispan
if trace:
print(' CANDIDATE TO KEEP: all ikey_span in match.ispan:', ikey_spans, ispan)
- # discard matches that contain key phrases, but interrupted by
+ # discard matches that contain required phrases, but interrupted by
# unknown or stop words.
unknown_by_pos = match.query.unknowns_by_pos
@@ -2195,7 +2195,7 @@ def filter_matches_missing_key_phrases(
istopwords_by_pos = match.rule.stopwords_by_pos
istopwords_by_pos_get = istopwords_by_pos.get
- # iterate on each key phrase span to ensure that they are continuous
+ # iterate on each required phrase span to ensure that they are continuous
# and contain no unknown words on the query side
is_valid = True
@@ -2204,7 +2204,7 @@ def filter_matches_missing_key_phrases(
for ikey_span in ikey_spans:
- # check that are no gaps in the key phrase span on the query side
+ # check that are no gaps in the required phrase span on the query side
# BUT, do not redo the check for is_continuous already checked above
if is_continuous:
qkey_span = qspan
@@ -2225,13 +2225,13 @@ def filter_matches_missing_key_phrases(
is_valid = False
break
- # check that key phrase spans does not contain stop words and does
+ # check that required phrase spans does not contain stop words and does
# not contain unknown words
- # NOTE: we do not check the last qkey_span position of a key phrase
+ # NOTE: we do not check the last qkey_span position of a required phrase
# since unknown is a number of words after a given span position:
# these are pinned to the last position and we would not care for
- # what unknown or stop words show up after a key phrase ends.
+ # what unknown or stop words show up after a required phrase ends.
qkey_span_end = qkey_span.end
contains_unknown = any(
@@ -2694,7 +2694,7 @@ def _log(_matches, _discarded, msg):
# FIXME: we should have only a single loop on all the matches at once!!
# and not 10's of loops!!!
- matches, discarded = filter_matches_missing_key_phrases(matches)
+ matches, discarded = filter_matches_missing_required_phrases(matches)
all_discarded_extend(discarded)
_log(matches, discarded, 'HAS KEY PHRASES')
diff --git a/src/licensedcode/models.py b/src/licensedcode/models.py
index dc0a4b9a7b..a53abf4cbc 100644
--- a/src/licensedcode/models.py
+++ b/src/licensedcode/models.py
@@ -37,12 +37,8 @@
from licensedcode.frontmatter import dumps_frontmatter
from licensedcode.frontmatter import load_frontmatter
from licensedcode.languages import LANG_INFO as known_languages
-from licensedcode.spans import Span
from licensedcode.tokenize import index_tokenizer
from licensedcode.tokenize import index_tokenizer_with_stopwords
-from licensedcode.tokenize import key_phrase_tokenizer
-from licensedcode.tokenize import KEY_PHRASE_OPEN
-from licensedcode.tokenize import KEY_PHRASE_CLOSE
from licensedcode.tokenize import query_lines
from scancode.api import SCANCODE_LICENSEDB_URL
from scancode.api import SCANCODE_LICENSE_URL
@@ -1428,13 +1424,35 @@ class BasicRule:
'Mutually exclusive from any is_license_* flag')
)
+ is_required_phrase = attr.ib(
+ default=False,
+ repr=False,
+ metadata=dict(
+ help='True if this is rule text is a required phrase. '
+ 'A required phrase is often a part of another larger rule text '
+ 'but is an essential section of the rule text which must be '
+ 'present in the case of partial matches, otherwise the match '
+ 'will be a false positive and misleading.')
+ )
+
+ skip_collecting_required_phrases = attr.ib(
+ default=False,
+ repr=False,
+ metadata=dict(
+ help='True if this rule needs to be skipped while collecting '
+ 'required phrase rules. Required phrase rules are created out '
+ 'of other rule texts which have marked required phrases, '
+ 'because some marked required phrases are special and should '
+ 'not be applied to other rules.')
+ )
+
language = attr.ib(
default='en',
repr=False,
metadata=dict(
help='Two-letter ISO 639-1 language code if this license text is '
'not in English. See https://en.wikipedia.org/wiki/ISO_639-1 .')
- )
+ )
minimum_coverage = attr.ib(
default=0,
@@ -1475,7 +1493,7 @@ class BasicRule:
'words in its matched range? The default is to allow non-continuous '
'approximate matches. Any extra unmatched known or unknown word is '
'considered to break a match continuity. This attribute is either '
- 'stored or computed when the whole rule text is a {{key phrase}}.')
+ 'stored or computed when the whole rule text is a {{required phrase}}.')
)
relevance = attr.ib(
@@ -1619,11 +1637,11 @@ class BasicRule:
help='Text of this rule')
)
- key_phrase_spans = attr.ib(
+ required_phrase_spans = attr.ib(
default=attr.Factory(list),
repr=False,
metadata=dict(
- help='List of spans representing key phrases for this rule. These are Spans '
+ help='List of spans representing required phrases for this rule. These are Spans '
'of rule text position spans that must be present for this rule to be matched. '
'Key phrases are enclosed in {{double curly braces}} in the rule text.'
)
@@ -1796,6 +1814,24 @@ def has_unknown(self):
# license flag instead
return self.license_expression and 'unknown' in self.license_expression
+ @property
+ def license_flag_names(self):
+ return (
+ 'is_license_text',
+ 'is_license_notice',
+ 'is_license_reference',
+ 'is_license_tag',
+ 'is_license_intro',
+ 'is_license_clue',
+ )
+
+ @property
+ def license_flags(self):
+ return {
+ license_flag_name: getattr(self, license_flag_name)
+ for license_flag_name in self.license_flag_names
+ }
+
def validate(self, licensing=None, thorough=False):
"""
Validate this rule using the provided ``licensing`` Licensing and yield
@@ -1803,17 +1839,8 @@ def validate(self, licensing=None, thorough=False):
"""
is_false_positive = self.is_false_positive
- license_flags = (
- self.is_license_notice,
- self.is_license_text,
- self.is_license_reference,
- self.is_license_tag,
- self.is_license_intro,
- self.is_license_clue,
- )
-
- has_license_flags = any(license_flags)
- has_many_license_flags = len([l for l in license_flags if l]) != 1
+ has_license_flags = any(self.license_flags.values())
+ has_many_license_flags = sum(self.license_flags.values()) > 1
license_expression = self.license_expression
@@ -1866,6 +1893,12 @@ def validate(self, licensing=None, thorough=False):
if not check_is_list_of_strings(self.referenced_filenames):
yield 'referenced_filenames must be a list of strings'
+ if (self.is_license_clue or self.is_license_intro) and self.is_required_phrase:
+ yield 'License intro/clue rules cannot be required phrase rules'
+
+ if self.is_required_phrase and self.skip_collecting_required_phrases:
+ yield 'We can skip collecting required phrases only in non required phrase rules'
+
if not all(check_is_list_of_strings(i) for i in ignorables):
yield 'ignorables must be a list of strings'
@@ -1957,15 +1990,10 @@ def get_flags_mapping(self):
Return a list of boolean attributes for a rule which are set to True.
"""
- rule_boolean_attributes = [
- 'is_license_text',
- 'is_license_notice',
- 'is_license_reference',
- 'is_license_tag',
- 'is_license_intro',
- 'is_license_clue',
+ rule_boolean_attributes = self.license_flag_names + (
+ 'is_required_phrase',
'is_continuous',
- ]
+ )
mapping = {}
for attribute in rule_boolean_attributes:
@@ -1990,6 +2018,8 @@ def to_reference(self):
data['is_license_tag'] = self.is_license_tag
data['is_license_intro'] = self.is_license_intro
data['is_license_clue'] = self.is_license_clue
+ data['is_required_phrase'] = self.is_required_phrase
+ data['skip_collecting_required_phrases'] = self.skip_collecting_required_phrases
data['is_continuous'] = self.is_continuous
data['is_builtin'] = self.is_builtin
data['is_from_license'] = self.is_from_license
@@ -2020,14 +2050,10 @@ def to_dict(self, include_text=False):
if self.license_expression:
data['license_expression'] = self.license_expression
- flags = (
+ flags = self.license_flag_names + (
'is_false_positive',
- 'is_license_text',
- 'is_license_notice',
- 'is_license_reference',
- 'is_license_tag',
- 'is_license_intro',
- 'is_license_clue',
+ 'is_required_phrase',
+ 'skip_collecting_required_phrases',
'is_continuous',
'is_deprecated'
)
@@ -2183,9 +2209,9 @@ def tokens(self):
self.stopwords_by_pos = stopwords_by_pos
self.set_relevance()
- # set key phrase spans that must be present for the rule
+ # set required phrase spans that must be present for the rule
# to pass through refinement
- self.key_phrase_spans = self.build_key_phrase_spans()
+ self.required_phrase_spans = self.build_required_phrase_spans()
self._set_continuous()
return toks
@@ -2194,25 +2220,26 @@ def _set_continuous(self):
"""
Set the "is_continuous" flag if this rule must be matched exactly
without gaps, stopwords or unknown words. Must run after
- key_phrase_spans computation.
+ required_phrase_spans computation.
"""
if (
not self.is_continuous
- and self.key_phrase_spans
- and len(self.key_phrase_spans) == 1
- and len(self.key_phrase_spans[0]) == self.length
+ and self.required_phrase_spans
+ and len(self.required_phrase_spans) == 1
+ and len(self.required_phrase_spans[0]) == self.length
):
self.is_continuous = True
- def build_key_phrase_spans(self):
+ def build_required_phrase_spans(self):
"""
- Return a list of Spans marking key phrases token positions of that must
+ Return a list of Spans marking required phrases token positions of that must
be present for this rule to be matched.
"""
+ from licensedcode.required_phrases import get_required_phrase_spans
if self.is_from_license:
return []
try:
- return list(get_key_phrase_spans(self.text))
+ return get_required_phrase_spans(self.text)
except Exception as e:
raise InvalidRule(f'Invalid rule: {self}') from e
@@ -2243,7 +2270,7 @@ def compute_thresholds(self, small_rule=SMALL_RULE):
self.is_small = self.length < small_rule
- def dump(self, rules_data_dir):
+ def dump(self, rules_data_dir, **kwargs):
"""
Dump a representation of this rule as a .RULE file stored in
``rules_data_dir`` as a UTF-8 file having:
@@ -2260,6 +2287,10 @@ def dump(self, rules_data_dir):
rule_file = self.rule_file(rules_data_dir=rules_data_dir)
metadata = self.to_dict()
+ # This can be used to pass objects to dump on the rule file with
+ # other rule metadata, like debugging collection of required phrases
+ if kwargs:
+ metadata.update(kwargs)
content = self.text
output = dumps_frontmatter(content=content, metadata=metadata)
with open(rule_file, 'w') as of:
@@ -2291,6 +2322,9 @@ def load(self, rule_file, with_checks=True):
raise e
known_attributes = set(attr.fields_dict(self.__class__))
+ # This is an attribute used to debug marking required phrases, and is not needed
+ if "sources" in data:
+ data.pop("sources")
data_file_attributes = set(data)
if with_checks:
unknown_attributes = data_file_attributes.difference(known_attributes)
@@ -2302,6 +2336,8 @@ def load(self, rule_file, with_checks=True):
self.license_expression = data.get('license_expression')
self.is_false_positive = data.get('is_false_positive', False)
+ self.is_required_phrase = data.get('is_required_phrase', False)
+ self.skip_collecting_required_phrases = data.get('skip_collecting_required_phrases', False)
relevance = as_int(float(data.get('relevance') or 0))
# Keep track if we have a stored relevance of not.
@@ -2361,7 +2397,7 @@ def set_relevance(self):
- relevance is computed based on the rule length
"""
- if self.is_false_positive:
+ if self.is_false_positive or self.is_required_phrase:
self.relevance = 100
self.has_stored_relevance = True
return
@@ -2816,6 +2852,34 @@ def build_ignorables_mapping(copyrights, holders, authors, urls, emails):
return {k: v for k, v in sorted(ignorables.items()) if v}
+def rule_exists(text):
+ """
+ Return the matched rule if the text is an existing rule matched
+ exactly, False otherwise.
+ """
+ from licensedcode.match_hash import MATCH_HASH
+ from licensedcode import cache
+
+ idx = cache.get_index()
+
+ matches = idx.match(query_string=text)
+ if not matches:
+ return False
+ if len(matches) > 1:
+ return False
+ match = matches[0]
+ if match.matcher == MATCH_HASH and match.coverage() == 100:
+ return match.rule
+
+
+def get_rule_id_for_text(text):
+ rule = rule_exists(text=text)
+ if rule:
+ return rule.identifier
+ else:
+ return False
+
+
def find_rule_base_location(name_prefix, rules_directory=rules_data_dir):
"""
Return a new, unique and non-existing base location in ``rules_directory``
@@ -2844,83 +2908,39 @@ def find_rule_base_location(name_prefix, rules_directory=rules_data_dir):
idx += 1
-def get_key_phrase_spans(text):
- """
- Yield Spans of key phrase token positions found in the rule ``text``.
- Tokens form a key phrase when enclosed in {{double curly braces}}.
-
- For example:
-
- >>> text = 'This is enclosed in {{double curly braces}}'
- >>> # 0 1 2 3 4 5 6
- >>> x = list(get_key_phrase_spans(text))
- >>> assert x == [Span(4, 6)], x
-
- >>> text = 'This is {{enclosed}} a {{double curly braces}} or not'
- >>> # 0 1 2 SW 3 4 5 6 7
- >>> x = list(get_key_phrase_spans(text))
- >>> assert x == [Span(2), Span(3, 5)], x
-
- >>> text = 'This {{is}} enclosed a {{double curly braces}} or not'
- >>> # 0 1 2 SW 3 4 5 6 7
- >>> x = list(get_key_phrase_spans(text))
- >>> assert x == [Span([1]), Span([3, 4, 5])], x
-
- >>> text = '{{AGPL-3.0 GNU Affero General Public License v3.0}}'
- >>> # 0 1 2 3 4 5 6 7 8 9
- >>> x = list(get_key_phrase_spans(text))
- >>> assert x == [Span(0, 9)], x
-
- >>> assert list(get_key_phrase_spans('{This}')) == []
-
- >>> def check_exception(text):
- ... try:
- ... return list(get_key_phrase_spans(text))
- ... except InvalidRule:
- ... pass
-
- >>> check_exception('This {{is')
- >>> check_exception('This }}is')
- >>> check_exception('{{This }}is{{')
- >>> check_exception('This }}is{{')
- >>> check_exception('{{}}')
- >>> check_exception('{{This is')
- >>> check_exception('{{This is{{')
- >>> check_exception('{{This is{{ }}')
- >>> check_exception('{{{{This}}}}')
- >>> check_exception('}}This {{is}}')
- >>> check_exception('This }} {{is}}')
- >>> check_exception('{{This}}')
- [Span(0)]
- >>> check_exception('{This}')
- []
- >>> check_exception('{{{This}}}')
- [Span(0)]
- """
- ipos = 0
- in_key_phrase = False
- key_phrase = []
- for token in key_phrase_tokenizer(text):
- if token == KEY_PHRASE_OPEN:
- if in_key_phrase:
- raise InvalidRule('Invalid rule with nested key phrase {{ {{ braces', text)
- in_key_phrase = True
-
- elif token == KEY_PHRASE_CLOSE:
- if in_key_phrase:
- if key_phrase:
- yield Span(key_phrase)
- key_phrase.clear()
- else:
- raise InvalidRule('Invalid rule with empty key phrase {{}} braces', text)
- in_key_phrase = False
- else:
- raise InvalidRule(f'Invalid rule with dangling key phrase missing closing braces', text)
- continue
- else:
- if in_key_phrase:
- key_phrase.append(ipos)
- ipos += 1
+def get_rules_by_identifier(rules_data_dir=rules_data_dir):
+ """
+ Get a dictionary of {rule_identifier: rule} for all license rules.
+ """
+ rules = list(load_rules(rules_data_dir=rules_data_dir))
+
+ rules_by_identifier = {
+ rule.identifier: rule
+ for rule in rules
+ }
+
+ return rules_by_identifier
+
- if key_phrase or in_key_phrase:
- raise InvalidRule(f'Invalid rule with dangling key phrase missing final closing braces', text)
+def map_rules_by_expression(rules_by_identifier):
+ """
+ Get a dictionary (sorted by license_expression) of {license_expression: rules}
+ from a dictionary of rules by their identifier.
+ """
+ rules_by_expression = defaultdict(list)
+
+ for rule in rules_by_identifier.values():
+ # Only return rules with license_expression (i.e. skip false positives)
+ if rule.license_expression:
+ rules_by_expression[rule.license_expression].append(rule)
+
+ return dict(sorted(rules_by_expression.items()))
+
+
+def get_rules_by_expression(rules_data_dir=rules_data_dir):
+ """
+ Get a dictionary (sorted by license_expression) of {license_expression: rules}
+ where `rules` is a list of all rule objects having the `license_expression`.
+ """
+ rules_by_identifier = get_rules_by_identifier(rules_data_dir)
+ return map_rules_by_expression(rules_by_identifier)
diff --git a/src/licensedcode/required_phrases.py b/src/licensedcode/required_phrases.py
new file mode 100644
index 0000000000..30985fff50
--- /dev/null
+++ b/src/licensedcode/required_phrases.py
@@ -0,0 +1,755 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) nexB Inc. and others. All rights reserved.
+# ScanCode is a trademark of nexB Inc.
+# SPDX-License-Identifier: Apache-2.0
+# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
+# See https://github.com/nexB/scancode-toolkit for support or download.
+# See https://aboutcode.org for more information about nexB OSS projects.
+#
+
+import attr
+import os
+import click
+
+from license_expression import Licensing
+from licensedcode import TINY_RULE
+
+from commoncode.cliutils import PluggableCommandLineOption
+from licensedcode.models import get_rules_by_expression
+from licensedcode.models import load_licenses
+from licensedcode.models import load_rules
+from licensedcode.models import InvalidRule
+from licensedcode.models import rules_data_dir
+from licensedcode.models import Rule
+from licensedcode.models import rule_exists
+from licensedcode.models import find_rule_base_location
+
+from licensedcode.spans import Span
+from licensedcode.tokenize import required_phrase_tokenizer
+from licensedcode.tokenize import return_spans_for_required_phrase_in_text
+from licensedcode.tokenize import get_ignorable_spans
+from licensedcode.tokenize import get_non_overlapping_spans
+from licensedcode.tokenize import add_required_phrase_markers
+from licensedcode.tokenize import REQUIRED_PHRASE_OPEN
+from licensedcode.tokenize import REQUIRED_PHRASE_CLOSE
+from licensedcode.tokenize import get_normalized_tokens
+
+
+# Add the rule identifier here to trace required phrase collection or required
+# phrase marking for a specific rule (Example: "mit_12.RULE")
+TRACE_REQUIRED_PHRASE_FOR_RULES = ["bsd-new_newlib.RULE"]
+
+
+def get_required_phrase_spans(text):
+ """
+ Return a list of Spans representin required phrase token positions in the text
+ for each required phrase found in the rule ``text``.
+
+ For example:
+
+ >>> text = 'This is enclosed in {{double curly braces}}'
+ >>> # 0 1 2 3 4 5 6
+ >>> x = get_required_phrase_spans(text)
+ >>> assert x == [Span(4, 6)], x
+
+ >>> text = 'This is {{enclosed}} a {{double curly braces}} or not'
+ >>> # 0 1 2 SW 3 4 5 6 7
+ >>> x = get_required_phrase_spans(text)
+ >>> assert x == [Span(2), Span(3, 5)], x
+
+ >>> text = 'This {{is}} enclosed a {{double curly braces}} or not'
+ >>> # 0 1 2 SW 3 4 5 6 7
+ >>> x = get_required_phrase_spans(text)
+ >>> assert x == [Span([1]), Span([3, 4, 5])], x
+
+ >>> text = '{{AGPL-3.0 GNU Affero General Public License v3.0}}'
+ >>> # 0 1 2 3 4 5 6 7 8 9
+ >>> x = get_required_phrase_spans(text)
+ >>> assert x == [Span(0, 9)], x
+
+ >>> assert get_required_phrase_spans('{This}') == []
+
+ >>> def check_exception(text):
+ ... try:
+ ... return get_required_phrase_spans(text)
+ ... except InvalidRule:
+ ... pass
+
+ >>> check_exception('This {{is')
+ >>> check_exception('This }}is')
+ >>> check_exception('{{This }}is{{')
+ >>> check_exception('This }}is{{')
+ >>> check_exception('{{}}')
+ >>> check_exception('{{This is')
+ >>> check_exception('{{This is{{')
+ >>> check_exception('{{This is{{ }}')
+ >>> check_exception('{{{{This}}}}')
+ >>> check_exception('}}This {{is}}')
+ >>> check_exception('This }} {{is}}')
+ >>> check_exception('{{This}}')
+ [Span(0)]
+ >>> check_exception('{This}')
+ []
+ >>> check_exception('{{{This}}}')
+ [Span(0)]
+ """
+ return [
+ required_phrase.span
+ for required_phrase in get_required_phrases(text)
+ ]
+
+
+def get_required_phrase_texts(text):
+ """
+ Return a list of required phrase texts for each required phrase found
+ in the rule ``text``.
+
+ For example:
+
+ >>> text = 'This is enclosed in {{double curly braces}}'
+ >>> # 0 1 2 3 4 5 6
+ >>> x = get_required_phrase_texts(text=text)
+ >>> assert x == ['double curly braces'], x
+ """
+ return [
+ required_phrase.text
+ for required_phrase in get_required_phrases(text)
+ ]
+
+
+@attr.s
+class RequiredPhraseInText:
+
+ required_phrase_positions = attr.ib(
+ default=attr.Factory(list),
+ repr=False,
+ metadata=dict(help='List of positions of a required phrase in a rule text.')
+ )
+
+ required_phrase_tokens = attr.ib(
+ default=attr.Factory(list),
+ metadata=dict(help='List of required phrase tokens for this rule.')
+ )
+
+ @property
+ def text(self):
+ """The full normalized text for this required phrase, built from its tokens."""
+ return " ".join(self.required_phrase_tokens)
+
+ @property
+ def span(self):
+ """A span representing the position of this required phrase in a rule text."""
+ return Span(self.required_phrase_positions)
+
+ def update(self, token, ipos):
+ self.required_phrase_tokens.append(token)
+ self.required_phrase_positions.append(ipos)
+
+
+def get_required_phrases(text):
+ """
+ Yield RequiredPhraseInText objects with both required phrase positions
+ and lists of tokens for each required phrase found in the rule ``text``.
+ Tokens form a required phrase when enclosed in {{double curly braces}}.
+ """
+ ipos = 0
+ in_required_phrase = False
+ required_phrase = RequiredPhraseInText()
+ for token in required_phrase_tokenizer(text):
+ if token == REQUIRED_PHRASE_OPEN:
+ if in_required_phrase:
+ raise InvalidRule('Invalid rule with nested required phrase {{ {{ braces', text)
+ in_required_phrase = True
+
+ elif token == REQUIRED_PHRASE_CLOSE:
+ if in_required_phrase:
+ if required_phrase.required_phrase_tokens:
+ yield required_phrase
+ required_phrase = RequiredPhraseInText()
+ else:
+ raise InvalidRule('Invalid rule with empty required phrase {{}} braces', text)
+ in_required_phrase = False
+ else:
+ raise InvalidRule(f'Invalid rule with dangling required phrase missing closing braces', text)
+ continue
+ else:
+ if in_required_phrase:
+ required_phrase.update(token=token, ipos=ipos)
+ ipos += 1
+
+ if required_phrase.required_phrase_tokens or in_required_phrase:
+ raise InvalidRule(f'Invalid rule with dangling required phrase missing final closing braces', text)
+
+
+
+def get_normalized_text(text, skip_required_phrase_markers=True):
+ return " ".join(
+ get_normalized_tokens(
+ text=text,
+ skip_required_phrase_markers=skip_required_phrase_markers,
+ )
+ )
+
+
+def get_num_tokens(text):
+ return len(get_normalized_tokens(text))
+
+def is_text_license_reference(text):
+
+ words_license_reference = ['http', 'https', 'io', 'com', 'txt', 'md', 'file']
+ if any(
+ True
+ for word in words_license_reference
+ if word in text
+ ):
+ return True
+
+ return False
+
+
+@attr.s
+class RequiredPhraseDetails:
+
+ license_expression = attr.ib(
+ default=None,
+ metadata=dict(
+ help='A license expression string for this particular required phrase.')
+ )
+
+ rule = attr.ib(
+ default=None,
+ metadata=dict(
+ help='The Rule object for this particular required phrase rule.')
+ )
+
+ required_phrase_text = attr.ib(
+ default=None,
+ metadata=dict(
+ help='Normalized required phrase text.')
+ )
+
+ sources = attr.ib(
+ default=attr.Factory(list),
+ metadata=dict(
+ help='List of all rule identifiers where this required phrase is present.'
+ )
+ )
+
+ length = attr.ib(
+ default=0,
+ metadata=dict(
+ help='Length of text for this required phrase text (used to sort).'
+ )
+ )
+
+ @classmethod
+ def create_required_phrase_details(
+ cls,
+ license_expression,
+ required_phrase_text,
+ sources,
+ length,
+ ):
+
+ base_name = f"{license_expression}_required_phrase"
+ base_loc = find_rule_base_location(name_prefix=base_name)
+ file_path = f"{base_loc}.RULE"
+ identifier = file_path.split('/')[-1]
+
+ normalized_text = get_normalized_text(required_phrase_text)
+
+ rule = Rule(
+ license_expression=license_expression,
+ identifier=identifier,
+ text=normalized_text,
+ is_required_phrase=True,
+ )
+ if is_text_license_reference(required_phrase_text):
+ rule.is_license_reference = True
+ else:
+ rule.is_license_tag = True
+ rule.dump(rules_data_dir)
+
+ return cls(
+ license_expression=license_expression,
+ rule=rule,
+ required_phrase_text=normalized_text,
+ sources=sources,
+ length=length,
+ )
+
+ def update_sources(self, source_identifier):
+ if not source_identifier in self.sources:
+ self.sources.append(source_identifier)
+
+
+@attr.s
+class ListOfRequiredPhrases:
+
+ required_phrases = attr.ib(
+ default=attr.Factory(list),
+ metadata=dict(
+ help='A list of RequiredPhraseDetails objects for all the required phrases.')
+ )
+
+ def match_required_phrase_present(self, required_phrase_text):
+ """
+ Check if a required_phrase_text is present in the list of required_phrases
+ or it is a rule in the index.
+ Note: Order is important, as the list of required_phrases has both new rules which are
+ not yet in the index and old rules also present in the index.
+ """
+ normalized_text = get_normalized_text(required_phrase_text)
+
+ # check if this required_phrase_text is present in the collected list of required phrases
+ for required_phrase in self.required_phrases:
+ if required_phrase.required_phrase_text == normalized_text:
+ rule = required_phrase.rule
+ return rule
+
+ # check if this required_phrase_text is present as a rule in the index
+ rule = rule_exists(text=required_phrase_text)
+ if rule:
+ return rule
+
+ def update_required_phrase_sources(self, rule):
+ """
+ Given a rule update the required phrases list with this rule
+
+ Note: this should only be called on a rule that is obtained from the
+ match_required_phrase_present function so that the rule is present in the
+ index/required phrases list.
+ """
+ # if rule is present as a required phrase rule in the list then
+ # add identifier to sources of the required phrase rule
+ for required_phrase in self.required_phrases:
+ if required_phrase.rule.identifier == rule.identifier:
+ required_phrase.update_sources(rule.identifier)
+ return
+
+ # if rule is present as a rule in the index, set the is_required_phrase flag
+ # and add to the list of required phrase rules
+ if not rule.is_required_phrase:
+ rule.is_required_phrase = True
+ rule.dump(rules_data_dir)
+
+ normalized_text = get_normalized_text(rule.text)
+ required_phrase_detail = RequiredPhraseDetails(
+ license_expression=rule.license_expression,
+ rule=rule,
+ required_phrase_text=normalized_text,
+ sources=[rule.identifier],
+ length=len(normalized_text),
+ )
+ self.required_phrases.append(required_phrase_detail)
+
+ def sort_required_phrases(self):
+ self.required_phrases = sorted(
+ self.required_phrases,
+ key=lambda x: x.length,
+ reverse=True,
+ )
+
+ def add_variations_of_required_phrases(self):
+
+ words_to_skip = ["the"]
+ for required_phrase in self.required_phrases:
+ skip_words_present = [
+ skip_word
+ for skip_word in words_to_skip
+ if skip_word in required_phrase.required_phrase_text
+ ]
+ for skip_word in skip_words_present:
+ required_phrase_without_skip_word = required_phrase.required_phrase_text.replace(skip_word, "")
+ matched_rule = self.match_required_phrase_present(required_phrase_without_skip_word)
+ if not matched_rule:
+ required_phrase_detail = RequiredPhraseDetails.create_required_phrase_details(
+ license_expression=required_phrase.license_expression,
+ required_phrase_text=required_phrase_without_skip_word,
+ sources=[required_phrase.rule.identifier],
+ length=len(required_phrase_without_skip_word),
+ )
+ self.required_phrases.append(required_phrase_detail)
+ else:
+ self.update_required_phrase_sources(matched_rule)
+
+
+def collect_required_phrases_in_rules(
+ rules_by_expression,
+ license_expression=None,
+ verbose=False,
+):
+
+ # A mapping of {license_expression: ListOfRequiredPhrases} for all applicable
+ # license_expressions
+ required_phrases_by_expression = {}
+
+ licensing = Licensing()
+
+ # collect and create required phrase rules
+ for license_expression, rules in rules_by_expression.items():
+
+ license_keys = licensing.license_keys(license_expression)
+ if len(license_keys) != 1:
+ continue
+
+ if verbose:
+ click.echo(f'Collecting required phrases for license_expression: {license_expression}')
+
+ required_phrases_list = ListOfRequiredPhrases()
+
+ for rule in rules:
+ if rule.skip_collecting_required_phrases:
+ continue
+
+ for required_phrase_text in get_required_phrase_texts(rule.text):
+ if get_num_tokens(required_phrase_text) < 2:
+ if verbose:
+ click.echo(f'WARNING: single word required phrases in: {rule.identifier}, skipping.')
+ continue
+
+ required_phrase_rule = required_phrases_list.match_required_phrase_present(
+ required_phrase_text=required_phrase_text,
+ )
+ if not required_phrase_rule:
+ if not is_text_license_reference(required_phrase_text):
+ required_phrase_detail = RequiredPhraseDetails.create_required_phrase_details(
+ license_expression=license_expression,
+ required_phrase_text=required_phrase_text,
+ sources=[rule.identifier],
+ length=len(required_phrase_text),
+ )
+ required_phrases_list.required_phrases.append(required_phrase_detail)
+ else:
+ required_phrases_list.update_required_phrase_sources(required_phrase_rule)
+
+ if rule.identifier in TRACE_REQUIRED_PHRASE_FOR_RULES:
+ click.echo(
+ f"Collecting from rule: {rule.identifier} "
+ f"Required phrase: '{required_phrase_text}' "
+ f"Matched rule: {required_phrase_rule}"
+ )
+
+ # Add add new variations of the required phrases already present in the list
+ required_phrases_list.add_variations_of_required_phrases()
+
+ # We need to sort required phrases by length so we look for and mark the longest possible
+ # required phrases before the shorter ones contained in the same (substrings)
+ required_phrases_list.sort_required_phrases()
+ required_phrases_by_expression[license_expression] = required_phrases_list
+
+ if verbose:
+ count = len(required_phrases_list.required_phrases)
+ texts_with_source = {
+ required_phrase.required_phrase_text: required_phrase.sources
+ for required_phrase in required_phrases_list.required_phrases
+ }
+ click.echo(f'Collected {count} required phrases for license_expression: {license_expression}')
+ click.echo(f'Collected required phrases texts: \n {texts_with_source}')
+
+ return required_phrases_by_expression
+
+
+def update_required_phrases_from_other_rules(
+ required_phrases_by_expression,
+ rules_by_expression,
+ write_required_phrases=False,
+ verbose=False,
+):
+
+ # add required phrases to rules from other rules
+ for license_expression, rules in rules_by_expression.items():
+ if not license_expression in required_phrases_by_expression:
+ continue
+
+ if verbose:
+ click.echo(f'marking required phrases in rule texts for license_expression: {license_expression}')
+
+ required_phrases_for_expression = required_phrases_by_expression.get(license_expression)
+ add_required_phrases_for_required_phrases(
+ rules=rules,
+ required_phrases=required_phrases_for_expression.required_phrases,
+ verbose=verbose,
+ )
+
+ if write_required_phrases:
+ for license_expression, required_phrases_list in required_phrases_by_expression.items():
+ if verbose:
+ click.echo(f'Writing required phrases sources for license_expression: {license_expression}')
+
+ for required_phrase_detail in required_phrases_list.required_phrases:
+ if required_phrase_detail.sources:
+ required_phrase_detail.rule.dump(
+ rules_data_dir=rules_data_dir,
+ sources=required_phrase_detail.sources
+ )
+
+
+def add_required_phrases_from_other_rules(
+ license_expression=None,
+ write_required_phrases=False,
+ verbose=False,
+ can_mark_required_phrase_test=False,
+):
+
+ rules_by_expression = get_rules_by_expression()
+ if license_expression:
+ rules_by_expression = {license_expression: rules_by_expression[license_expression]}
+ else:
+ rules_by_expression = rules_by_expression
+
+ required_phrases_by_expression = collect_required_phrases_in_rules(
+ license_expression=license_expression,
+ rules_by_expression=rules_by_expression,
+ verbose=verbose,
+ )
+
+ update_required_phrases_from_other_rules(
+ required_phrases_by_expression=required_phrases_by_expression,
+ rules_by_expression=rules_by_expression,
+ write_required_phrases=write_required_phrases,
+ verbose=verbose,
+ )
+
+
+def add_required_phrases_for_required_phrases(required_phrases, rules, verbose=False):
+
+ for rule in rules:
+ # skip small rules
+ if len(rule.text) < TINY_RULE:
+ continue
+
+ for required_phrase in required_phrases:
+ debug = False
+ if rule.identifier in TRACE_REQUIRED_PHRASE_FOR_RULES:
+ click.echo(
+ f"Trying to updating rule: {rule.identifier} "
+ f"with required phrase: '{required_phrase.required_phrase_text}'."
+ )
+ debug = True
+
+ add_required_phrase_to_rule(
+ rule=rule,
+ required_phrase=required_phrase.required_phrase_text,
+ debug_data=required_phrase.sources,
+ debug=debug,
+ )
+
+
+def add_required_phrases_for_license_fields(licence_object, rules, verbose=False):
+
+ license_fields_mapping_by_order = {
+ "name": licence_object.name,
+ "short_name": licence_object.short_name,
+ #"key",
+ #"spdx_license_key"
+ }
+
+ for rule in rules:
+ # skip small rules
+ if len(rule.text) < TINY_RULE:
+ continue
+
+ for license_field_value in license_fields_mapping_by_order.values():
+ add_required_phrase_to_rule(rule=rule, required_phrase=license_field_value)
+
+
+def add_required_phrase_to_rule(rule, required_phrase, debug_data=None, debug=False):
+
+ # Reload from file as there could be changes from other license fields
+ rule_file = os.path.join(rules_data_dir, rule.identifier)
+ reloaded_rule = Rule.from_file(rule_file)
+
+ # we get spans for name/short_name if they exist
+ new_required_phrase_spans = return_spans_for_required_phrase_in_text(
+ text=reloaded_rule.text,
+ required_phrase=required_phrase,
+ )
+
+ # we get spans for already existing required phrases and ignorables
+ ignorable_spans = get_ignorable_spans(reloaded_rule)
+ old_required_phrase_spans = get_required_phrase_spans(reloaded_rule.text)
+
+ # we verify whether there are spans which overlap with the
+ # already present required phrases or ignorables
+ spans_to_add = list(
+ get_non_overlapping_spans(
+ old_required_phrase_spans=old_required_phrase_spans + ignorable_spans,
+ new_required_phrase_spans=new_required_phrase_spans
+ )
+ )
+
+ if new_required_phrase_spans and debug:
+ click.echo(f"New required phrase spans for {rule.identifier}: {new_required_phrase_spans}")
+ click.echo(f"Old required phrase spans: {old_required_phrase_spans}")
+ click.echo(f"Ignorable spans: {ignorable_spans}")
+ click.echo(f"required phrase spans to add: {spans_to_add}")
+ ignorable_debug = rule.referenced_filenames + rule.ignorable_urls
+ click.echo(f"debug ignorables: {ignorable_debug}")
+
+ text_rule = reloaded_rule.text
+
+ # we add required phrase markers for the non-overlapping spans
+ for span_to_add in spans_to_add:
+ text_rule = add_required_phrase_markers(
+ text=text_rule,
+ required_phrase_span=span_to_add,
+ )
+
+ # write the rule on disk if there are any updates
+ if text_rule != reloaded_rule.text:
+ if debug:
+ click.echo(
+ f"Updating rule: {reloaded_rule.identifier} "
+ f"with required phrase: {required_phrase} "
+ f"debug data: {debug_data} /n"
+ )
+ reloaded_rule.text = text_rule
+ reloaded_rule.dump(rules_data_dir)
+
+
+def add_required_phrases_from_license_fields(
+ license_expression=None,
+ verbose=False,
+ can_mark_required_phrase_test=False,
+):
+ """
+ For all rules with the `license_expression`, add required phrases from the
+ license fields.
+ """
+ rules_by_expression = get_rules_by_expression()
+
+ if license_expression:
+ rules_by_expression_to_update = {license_expression: rules_by_expression[license_expression]}
+ else:
+ rules_by_expression_to_update = rules_by_expression
+
+ licenses = load_licenses()
+ licensing = Licensing()
+
+ for license_expression, rules in rules_by_expression_to_update.items():
+
+ license_keys = licensing.license_keys(license_expression)
+ if len(license_keys) != 1:
+ continue
+
+ license_key = license_keys.pop()
+ licence_object = licenses[license_key]
+
+ if verbose:
+ click.echo(f'Updating rules with required phrases for license_expression: {license_key}')
+
+ add_required_phrases_for_license_fields(licence_object=licence_object, rules=rules, verbose=verbose)
+
+
+def delete_required_phrase_rules_debug(rules_data_dir):
+ required_phrase_rules = [
+ rule
+ for rule in load_rules(rules_data_dir=rules_data_dir)
+ if rule.is_required_phrase
+ ]
+ for rule in required_phrase_rules:
+ rule.dump(rules_data_dir)
+
+
+@click.command(name='add-required-phrases')
+@click.option(
+ "-l",
+ "--license-expression",
+ type=str,
+ default=None,
+ metavar="STRING",
+ help="The license expression, for which the rules will be updated with required phrases. "
+ "Example STRING: `mit`. If this option is not used, add required_phrases for all rules.",
+ cls=PluggableCommandLineOption,
+)
+@click.option(
+ "-r",
+ "--reindex",
+ is_flag=True,
+ default=False,
+ help="Also reindex the license/rules to check for inconsistencies.",
+ cls=PluggableCommandLineOption,
+)
+@click.option(
+ "-d",
+ "--delete-required-phrases-debug",
+ is_flag=True,
+ default=False,
+ help="Delete the sources for all required phrase rules and exit.",
+ cls=PluggableCommandLineOption,
+)
+@click.option(
+ "-w",
+ "--write-required-phrases",
+ is_flag=True,
+ default=False,
+ help="Write into their corresponding rule files the sources for all required phrase rules.",
+ cls=PluggableCommandLineOption,
+)
+@click.option(
+ "-o",
+ "--from-other-rules",
+ is_flag=True,
+ default=False,
+ help="Mark required phrases from already marked required phrases in other rules.",
+ cls=PluggableCommandLineOption,
+)
+@click.option(
+ "-l",
+ "--from-license-attributes",
+ is_flag=True,
+ default=False,
+ help="Mark required phrases from license attributes.",
+ cls=PluggableCommandLineOption,
+)
+@click.option(
+ "-v",
+ "--verbose",
+ is_flag=True,
+ default=False,
+ help="Print logging information.",
+ cls=PluggableCommandLineOption,
+)
+@click.help_option("-h", "--help")
+def add_required_phrases(
+ license_expression,
+ verbose,
+ reindex,
+ from_other_rules,
+ from_license_attributes,
+ delete_required_phrases_debug,
+ write_required_phrases,
+):
+ """
+ For all rules with the `license_expression`, add required phrases from the
+ license fields.
+ """
+ if delete_required_phrases_debug:
+ delete_required_phrase_rules_debug(rules_data_dir)
+ return
+
+ # create a list of all required phrases from existing rules, add
+ # rule files for them and mark those required phrases if present in other rules
+ if from_other_rules:
+ add_required_phrases_from_other_rules(
+ license_expression=license_expression,
+ write_required_phrases=write_required_phrases,
+ verbose=verbose,
+ )
+
+ # marks required phrases in existing rules from license attributes like name,
+ # short name and optionally license keys
+ if from_license_attributes:
+ add_required_phrases_from_license_fields(
+ license_expression=license_expression,
+ reindex=reindex,
+ verbose=verbose,
+ )
+
+ if reindex:
+ from licensedcode.cache import get_index
+ if verbose:
+ click.echo('Rebuilding the license index...')
+ get_index(force=True)
diff --git a/src/licensedcode/tokenize.py b/src/licensedcode/tokenize.py
index 9ac885941d..6f7c0ca9aa 100644
--- a/src/licensedcode/tokenize.py
+++ b/src/licensedcode/tokenize.py
@@ -13,12 +13,14 @@
from binascii import crc32
from itertools import islice
+from licensedcode.spans import Span
from licensedcode.stopwords import STOPWORDS
from textcode.analysis import numbered_text_lines
"""
-Utilities to break texts in lines and tokens (aka. words) with specialized
-version for queries and rules texts.
+Utilities to break texts in lines and tokens (aka. words),
+and handle required phrases in texts through these tokens,
+with specialized version for queries and rules texts.
"""
@@ -75,26 +77,26 @@ def query_lines(
query_pattern = '[^_\\W]+\\+?[^_\\W]*'
word_splitter = re.compile(query_pattern, re.UNICODE).findall
-key_phrase_pattern = '(?:' + query_pattern + '|\\{\\{|\\}\\})'
-key_phrase_splitter = re.compile(key_phrase_pattern, re.UNICODE).findall
+required_phrase_pattern = '(?:' + query_pattern + '|\\{\\{|\\}\\})'
+required_phrase_splitter = re.compile(required_phrase_pattern, re.UNICODE).findall
-KEY_PHRASE_OPEN = '{{'
-KEY_PHRASE_CLOSE = '}}'
+REQUIRED_PHRASE_OPEN = '{{'
+REQUIRED_PHRASE_CLOSE = '}}'
# FIXME: this should be folded in a single pass tokenization with the index_tokenizer
-def key_phrase_tokenizer(text, stopwords=STOPWORDS):
+def required_phrase_tokenizer(text, stopwords=STOPWORDS, preserve_case=False):
"""
- Yield tokens from a rule ``text`` including key phrases {{brace}} markers.
+ Yield tokens from a rule ``text`` including required phrases {{brace}} markers.
This tokenizer behaves the same as as the ``index_tokenizer`` returning also
- KEY_PHRASE_OPEN and KEY_PHRASE_CLOSE as separate tokens so that they can be
- used to parse key phrases.
+ REQUIRED_PHRASE_OPEN and REQUIRED_PHRASE_CLOSE as separate tokens so that they can be
+ used to parse required phrases.
- >>> x = list(key_phrase_splitter('{{AGPL-3.0 GNU Affero License v3.0}}'))
+ >>> x = list(required_phrase_splitter('{{AGPL-3.0 GNU Affero License v3.0}}'))
>>> assert x == ['{{', 'AGPL', '3', '0', 'GNU', 'Affero', 'License', 'v3', '0', '}}'], x
- >>> x = list(key_phrase_splitter('{{{AGPL{{{{Affero }}License}}0}}'))
+ >>> x = list(required_phrase_splitter('{{{AGPL{{{{Affero }}License}}0}}'))
>>> assert x == ['{{', 'AGPL', '{{', '{{', 'Affero', '}}', 'License', '}}', '0', '}}'], x
>>> list(index_tokenizer('')) == []
@@ -103,17 +105,153 @@ def key_phrase_tokenizer(text, stopwords=STOPWORDS):
>>> x = list(index_tokenizer('{{AGPL-3.0 GNU Affero License v3.0}}'))
>>> assert x == ['agpl', '3', '0', 'gnu', 'affero', 'license', 'v3', '0']
- >>> x = list(key_phrase_tokenizer('{{AGPL-3.0 GNU Affero License v3.0}}'))
+ >>> x = list(required_phrase_tokenizer('{{AGPL-3.0 GNU Affero License v3.0}}'))
>>> assert x == ['{{', 'agpl', '3', '0', 'gnu', 'affero', 'license', 'v3', '0', '}}']
"""
if not text:
return
- for token in key_phrase_splitter(text.lower()):
+ if not preserve_case:
+ text = text.lower()
+
+ for token in required_phrase_splitter(text):
if token and token not in stopwords:
yield token
-def index_tokenizer(text, stopwords=STOPWORDS):
+def get_normalized_tokens(text, skip_required_phrase_markers=True, preserve_case=False):
+
+ required_phrase_markers = [REQUIRED_PHRASE_CLOSE, REQUIRED_PHRASE_OPEN]
+ tokens = list(required_phrase_tokenizer(text=text, preserve_case=preserve_case))
+ if skip_required_phrase_markers:
+ tokens = [
+ token
+ for token in tokens
+ if token not in required_phrase_markers
+ ]
+
+ return tokens
+
+
+def return_spans_for_required_phrase_in_text(text, required_phrase, preserve_case=False):
+ """
+ Returns a list of Spans where in `text`, the `required_phrase` exists,
+ and if it doesn't exist anywhere, returns an empty list.
+ """
+ spans_with_required_phrase = []
+
+ text_tokens = list(get_normalized_tokens(
+ text=text,
+ preserve_case=preserve_case,
+ skip_required_phrase_markers=True,
+ ))
+ required_phrase_tokens = list(get_normalized_tokens(
+ text=required_phrase,
+ preserve_case=preserve_case,
+ skip_required_phrase_markers=True,
+ ))
+ required_phrase_first_token = required_phrase_tokens[0]
+
+ # Initial check to see if all tokens in the required phrase are present
+ if all([
+ required_phrase_token in text_tokens
+ for required_phrase_token in required_phrase_tokens
+ ]):
+ start_positions = [
+ i
+ for i, x in enumerate(text_tokens)
+ if x == required_phrase_first_token
+ ]
+
+ for start_pos in start_positions:
+ end_pos = start_pos + len(required_phrase_tokens)
+
+ if end_pos <= len(text_tokens) and text_tokens[start_pos:end_pos] == required_phrase_tokens:
+ spans_with_required_phrase.append(
+ Span(start_pos, end_pos-1)
+ )
+
+ return spans_with_required_phrase
+
+
+def get_ignorable_spans(rule):
+ """
+ Return a list of Spans which are the positions in the rule text there
+ are ignorable URLs or referenced filenames.
+ """
+ ignorable_spans = []
+ ignorables = rule.referenced_filenames + rule.ignorable_urls
+ for ignorable in ignorables:
+ ignorable_spans.extend(
+ return_spans_for_required_phrase_in_text(
+ text=rule.text,
+ required_phrase=ignorable,
+ preserve_case=True,
+ )
+ )
+
+ return ignorable_spans
+
+
+def get_non_overlapping_spans(old_required_phrase_spans, new_required_phrase_spans):
+ """
+ Given two list of spans `old_required_phrase_spans` and `new_required_phrase_spans`,
+ return all the spans in `new_required_phrase_spans` that do not overlap with any
+ of the spans in `old_required_phrase_spans`.
+
+ The list of spans `old_required_phrase_spans` contains all the spans of required
+ phrases or ignorables already present in a rule text, and the other list of spans
+ `new_required_phrase_spans` contains the proposed new required phrases.
+ """
+ if not old_required_phrase_spans:
+ return new_required_phrase_spans
+
+ for new_span in new_required_phrase_spans:
+ if any(
+ old_span.overlap(new_span) != 0
+ for old_span in old_required_phrase_spans
+ ):
+ continue
+
+ yield new_span
+
+
+def combine_tokens(token_tuples):
+ """
+ Returns a string `combined_text` combining token tuples from the list `token_tuples`,
+ which are token tuples created by the tokenizer functions.
+ """
+ return ''.join(token for _, token in token_tuples)
+
+
+def add_required_phrase_markers(text, required_phrase_span):
+ """
+ Given a string `text` and a Span object `required_phrase_span`, add required phrase
+ markers to the `text` around the tokens which the span represents, while
+ being mindful of whitespace and stopwords.
+ """
+ tokens_tuples_with_markers = []
+ token_index = 0
+
+ for token_tuple in matched_query_text_tokenizer(text):
+
+ is_word, token = token_tuple
+
+ if is_word and token.lower() not in STOPWORDS:
+ if token_index == required_phrase_span.start:
+ tokens_tuples_with_markers.append((False, REQUIRED_PHRASE_OPEN))
+
+ token_index += 1
+
+ tokens_tuples_with_markers.append(token_tuple)
+
+ if is_word and token.lower() not in STOPWORDS:
+ if token_index == required_phrase_span.end + 1:
+ tokens_tuples_with_markers.append((False, REQUIRED_PHRASE_CLOSE))
+
+ return combine_tokens(tokens_tuples_with_markers)
+
+
+def index_tokenizer(text, stopwords=STOPWORDS, preserve_case=False):
"""
Return an iterable of tokens from a rule or query ``text`` using index
tokenizing rules. Ignore words that exist as lowercase in the ``stopwords``
@@ -137,7 +275,9 @@ def index_tokenizer(text, stopwords=STOPWORDS):
"""
if not text:
return []
- words = word_splitter(text.lower())
+ if not preserve_case:
+ text = text.lower()
+ words = word_splitter(text)
return (token for token in words if token and token not in stopwords)
diff --git a/tests/formattedcode/data/common/manifests-expected.yaml b/tests/formattedcode/data/common/manifests-expected.yaml
index 74f74b17ee..2f124c5e77 100644
--- a/tests/formattedcode/data/common/manifests-expected.yaml
+++ b/tests/formattedcode/data/common/manifests-expected.yaml
@@ -29,9 +29,9 @@ headers:
system_environment:
operating_system: linux
cpu_architecture: 64
- platform: Linux-5.15.0-116-generic-x86_64-with-glibc2.35
- platform_version: '#126-Ubuntu SMP Mon Jul 1 10:14:24 UTC 2024'
- python_version: 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0]
+ platform: Linux-5.15.0-119-generic-x86_64-with-glibc2.35
+ platform_version: '#129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024'
+ python_version: 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]
spdx_license_list_version: '3.24'
files_count: 4
summary:
@@ -1601,6 +1601,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1626,6 +1628,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1651,6 +1655,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1677,6 +1683,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1703,6 +1711,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1728,6 +1738,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1765,6 +1777,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1790,6 +1804,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: yes
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1818,6 +1834,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: yes
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1843,6 +1861,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1868,6 +1888,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -1893,6 +1915,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
diff --git a/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml b/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml
index cbd678d982..a490558869 100644
--- a/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml
+++ b/tests/formattedcode/data/yaml/package-and-licenses-expected.yaml
@@ -21,7 +21,7 @@ headers:
for any legal advice.
ScanCode is a free software code scanning tool from nexB Inc. and others.
Visit https://github.com/nexB/scancode-toolkit/ for support and download.
- output_format_version: 3.1.0
+ output_format_version: 3.2.0
message:
errors: []
warnings: []
@@ -29,10 +29,10 @@ headers:
system_environment:
operating_system: linux
cpu_architecture: 64
- platform: Linux-5.15.0-112-generic-x86_64-with-glibc2.35
- platform_version: '#122-Ubuntu SMP Thu May 23 07:48:21 UTC 2024'
- python_version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
- spdx_license_list_version: '3.23'
+ platform: Linux-5.15.0-119-generic-x86_64-with-glibc2.35
+ platform_version: '#129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024'
+ python_version: 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]
+ spdx_license_list_version: '3.24'
files_count: 4
summary:
declared_license_expression: apache-2.0
@@ -626,6 +626,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: yes
@@ -854,6 +856,8 @@ license_rule_references:
is_license_tag: yes
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -879,6 +883,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
@@ -904,6 +910,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: yes
is_builtin: yes
is_from_license: no
@@ -929,6 +937,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: yes
@@ -972,6 +982,8 @@ license_rule_references:
is_license_tag: no
is_license_intro: no
is_license_clue: no
+ is_required_phrase: no
+ skip_collecting_required_phrases: no
is_continuous: no
is_builtin: yes
is_from_license: no
diff --git a/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json b/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json
index 6f95f59346..0bd59f026a 100644
--- a/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json
+++ b/tests/licensedcode/data/additional_licenses/additional_license_combined_test.expected.json
@@ -270,6 +270,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -297,6 +299,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
@@ -324,6 +328,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
@@ -351,6 +357,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
@@ -378,6 +386,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
diff --git a/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json b/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json
index 2958a7cba2..d73aca90f7 100644
--- a/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json
+++ b/tests/licensedcode/data/additional_licenses/additional_license_directory_test.expected.json
@@ -117,6 +117,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
@@ -144,6 +146,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
diff --git a/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json b/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json
index b61818ca0b..5f635570ac 100644
--- a/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json
+++ b/tests/licensedcode/data/additional_licenses/additional_license_plugin_test.expected.json
@@ -70,6 +70,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": false,
"is_from_license": true,
diff --git a/tests/licensedcode/data/datadriven/external/fossology-tests/CCLRC/cdunifpp_check.c.yml b/tests/licensedcode/data/datadriven/external/fossology-tests/CCLRC/cdunifpp_check.c.yml
index c9c5e2f5b5..5a450d1f40 100644
--- a/tests/licensedcode/data/datadriven/external/fossology-tests/CCLRC/cdunifpp_check.c.yml
+++ b/tests/licensedcode/data/datadriven/external/fossology-tests/CCLRC/cdunifpp_check.c.yml
@@ -1,2 +1,2 @@
license_expressions:
- - mit
+ - cclrc
diff --git a/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json b/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json
index 3ef04356be..d247ab8329 100644
--- a/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json
+++ b/tests/licensedcode/data/licenses_reference_reporting/license-reference-works-with-clues.expected.json
@@ -1094,6 +1094,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1121,6 +1123,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1148,6 +1152,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1175,6 +1181,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": true,
@@ -1202,6 +1210,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1229,6 +1239,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1256,6 +1268,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1283,6 +1297,8 @@
"is_license_tag": false,
"is_license_intro": true,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1310,6 +1326,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1337,6 +1355,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1366,6 +1386,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1403,6 +1425,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1430,6 +1454,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": true,
@@ -1457,6 +1483,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1495,6 +1523,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1524,6 +1554,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -1551,6 +1583,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": true,
@@ -1588,6 +1622,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": true,
@@ -1619,6 +1655,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
diff --git a/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json b/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json
index a0db977ccb..f12fa5334d 100644
--- a/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json
+++ b/tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json
@@ -370,6 +370,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -401,6 +403,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": true,
"is_builtin": true,
"is_from_license": false,
@@ -428,6 +432,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -455,6 +461,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
diff --git a/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json b/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json
index a9fb8e949f..7adcde1df6 100644
--- a/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json
+++ b/tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json
@@ -360,6 +360,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -391,6 +393,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": true,
"is_builtin": true,
"is_from_license": false,
@@ -418,6 +422,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -445,6 +451,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
diff --git a/tests/licensedcode/data/plugin_license/clues/woodstox.expected.json b/tests/licensedcode/data/plugin_license/clues/woodstox.expected.json
index d58558a07a..4a9a6b2020 100644
--- a/tests/licensedcode/data/plugin_license/clues/woodstox.expected.json
+++ b/tests/licensedcode/data/plugin_license/clues/woodstox.expected.json
@@ -143,6 +143,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -172,6 +174,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -203,6 +207,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": true,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
diff --git a/tests/licensedcode/data/plugin_license/license-expression/scan.expected.json b/tests/licensedcode/data/plugin_license/license-expression/scan.expected.json
index 56a7e85481..7accbbf00d 100644
--- a/tests/licensedcode/data/plugin_license/license-expression/scan.expected.json
+++ b/tests/licensedcode/data/plugin_license/license-expression/scan.expected.json
@@ -239,6 +239,8 @@
"is_license_tag": false,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": true,
@@ -272,6 +274,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
diff --git a/tests/licensedcode/data/plugin_license/license-expression/spdx-expressions.expected.json b/tests/licensedcode/data/plugin_license/license-expression/spdx-expressions.expected.json
index e501546e7f..c346c0d184 100644
--- a/tests/licensedcode/data/plugin_license/license-expression/spdx-expressions.expected.json
+++ b/tests/licensedcode/data/plugin_license/license-expression/spdx-expressions.expected.json
@@ -140,6 +140,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
@@ -167,6 +169,8 @@
"is_license_tag": true,
"is_license_intro": false,
"is_license_clue": false,
+ "is_required_phrase": false,
+ "skip_collecting_required_phrases": false,
"is_continuous": false,
"is_builtin": true,
"is_from_license": false,
diff --git a/tests/licensedcode/data/tokenize/htmlish.html.expected.key_phrase_tokenizer.json b/tests/licensedcode/data/tokenize/htmlish.html.expected.required_phrase_tokenizer.json
similarity index 100%
rename from tests/licensedcode/data/tokenize/htmlish.html.expected.key_phrase_tokenizer.json
rename to tests/licensedcode/data/tokenize/htmlish.html.expected.required_phrase_tokenizer.json
diff --git a/tests/licensedcode/data/tokenize/htmlish.txt.expected.key_phrase_tokenizer.json b/tests/licensedcode/data/tokenize/htmlish.txt.expected.required_phrase_tokenizer.json
similarity index 100%
rename from tests/licensedcode/data/tokenize/htmlish.txt.expected.key_phrase_tokenizer.json
rename to tests/licensedcode/data/tokenize/htmlish.txt.expected.required_phrase_tokenizer.json
diff --git a/tests/licensedcode/test_index.py b/tests/licensedcode/test_index.py
index c768b2ba58..5f937dfc70 100644
--- a/tests/licensedcode/test_index.py
+++ b/tests/licensedcode/test_index.py
@@ -209,7 +209,7 @@ def test_index_does_not_fail_on_rules_with_similar_normalized_names(self):
index.LicenseIndex(rules)
@pytest.mark.scanslow
- def test_index_rules_with_key_phrases_and_without_are_duplicates(self):
+ def test_index_rules_with_required_phrases_and_without_are_duplicates(self):
rules_dir = self.get_test_loc('index/duplicate-key-phrases/rules')
lics_dir = self.get_test_loc('index/duplicate-key-phrases/licenses')
rules = models.get_rules(licenses_data_dir=lics_dir, rules_data_dir=rules_dir)
diff --git a/tests/licensedcode/test_match.py b/tests/licensedcode/test_match.py
index 4baf1e9433..561d017227 100644
--- a/tests/licensedcode/test_match.py
+++ b/tests/licensedcode/test_match.py
@@ -16,7 +16,7 @@
from licensedcode.index import LicenseIndex
from licensedcode.legalese import build_dictionary_from_iterable
from licensedcode.match import filter_contained_matches
-from licensedcode.match import filter_matches_missing_key_phrases
+from licensedcode.match import filter_matches_missing_required_phrases
from licensedcode.match import filter_overlapping_matches
from licensedcode.match import get_full_matched_text
from licensedcode.match import get_matching_regions
@@ -265,7 +265,7 @@ def test_LicenseMatch_score_is_not_100_with_aho_match_and_extra_unknown_token_ah
match = idx.match(query_string=querys)[0]
assert match.score() < 100
- def test_LicenseMatch_matches_only_when_all_key_phrases_are_present(self):
+ def test_LicenseMatch_matches_only_when_all_required_phrases_are_present(self):
text_r1 = (
'License '
'Distributed under the {{MIT License}}. See LICENSE for {{more information}}.'
@@ -288,7 +288,7 @@ def test_LicenseMatch_matches_only_when_all_key_phrases_are_present(self):
matches = idx.match(query_string=querys)
assert not matches
- def test_LicenseMatch_matches_only_when_all_key_phrases_are_present_in_order(self):
+ def test_LicenseMatch_matches_only_when_all_required_phrases_are_present_in_order(self):
text_r1 = (
'License '
'Distributed under the {{MIT License}}. See LICENSE for more information. '
@@ -313,7 +313,7 @@ def test_LicenseMatch_matches_only_when_all_key_phrases_are_present_in_order(sel
assert len(matches) == 1
assert matches[0].rule == r2
- def test_LicenseMatch_matches_only_when_key_phrases_are_uninterrupted_by_unknown(self):
+ def test_LicenseMatch_matches_only_when_required_phrases_are_uninterrupted_by_unknown(self):
text_r1 = (
'License '
'Distributed under the {{MIT License}}. See LICENSE for more information.'
@@ -339,7 +339,7 @@ def test_LicenseMatch_matches_only_when_key_phrases_are_uninterrupted_by_unknown
assert len(matches) == 1
assert matches[0].rule == r2
- def test_LicenseMatch_matches_only_when_key_phrases_are_uninterrupted_by_stopword(self):
+ def test_LicenseMatch_matches_only_when_required_phrases_are_uninterrupted_by_stopword(self):
text_r1 = (
'License '
'Distributed under the {{MIT License}}. See LICENSE for more information.'
@@ -366,7 +366,7 @@ def test_LicenseMatch_matches_only_when_key_phrases_are_uninterrupted_by_stopwor
assert len(matches) == 1
assert matches[0].rule == r2
- def test_LicenseMatch_matches_key_phrases_aho_with_exact_match_selects_key_phrase_match(self):
+ def test_LicenseMatch_matches_required_phrases_aho_with_exact_match_selects_required_phrase_match(self):
text_r1 = (
'License '
'Distributed under the {{MIT License}}. See LICENSE for more information.'
@@ -390,7 +390,7 @@ def test_LicenseMatch_matches_key_phrases_aho_with_exact_match_selects_key_phras
assert len(matches) == 1
assert matches[0].rule == r1
- def test_LicenseMatch_matches_only_when_key_phrase_is_uninterrupted(self):
+ def test_LicenseMatch_matches_only_when_required_phrase_is_uninterrupted(self):
text_r1 = (
'licensed under the '
'{{Creative Commons Attribution 4.0 License}} '
@@ -410,12 +410,12 @@ def test_LicenseMatch_matches_only_when_key_phrase_is_uninterrupted(self):
legalese = build_dictionary_from_iterable(['licensed', 'license', 'attribution', ])
idx = index.LicenseIndex([r1, r2], _legalese=legalese)
- assert r1.key_phrase_spans == [Span(3, 8)]
- assert r2.key_phrase_spans == []
+ assert r1.required_phrase_spans == [Span(3, 8)]
+ assert r2.required_phrase_spans == []
# NonCommercial and ShareAlike are "unknown" words here
# therefore we should match r2 as as a sequence and not r1 because the
- # key phrase are interrupted
+ # required phrase are interrupted
querys = (
'This work is '
# 0 UW 1
@@ -1007,65 +1007,65 @@ def test_filter_overlapping_matches_matches_filters_matches_does_not_discard_non
assert result == [m1]
assert discarded == [m2]
- def test_filter_key_phrases_keeps_matches_where_key_phrase_spans_is_fully_container_in_ispan(self):
+ def test_filter_required_phrases_keeps_matches_where_required_phrase_spans_is_fully_container_in_ispan(self):
idx = index.LicenseIndex()
query = Query(query_string="Lorum ipsum", idx=idx)
- r1 = create_rule_from_text_and_expression(license_expression='apache-1.1', key_phrase_spans=[Span(2, 4)])
+ r1 = create_rule_from_text_and_expression(license_expression='apache-1.1', required_phrase_spans=[Span(2, 4)])
- match_key_phrase_fully_contained = LicenseMatch(rule=r1, query=query, qspan=Span(0, 5), ispan=Span(0, 5))
- match_key_phrase_fully_outside = LicenseMatch(rule=r1, query=query, qspan=Span(5, 8), ispan=Span(5, 8))
- match_key_phrase_partially_contained = LicenseMatch(rule=r1, query=query, qspan=Span(0, 3), ispan=Span(0, 2))
- match_key_phrase_fully_containing = LicenseMatch(rule=r1, query=query, qspan=Span(3), ispan=Span(3))
+ match_required_phrase_fully_contained = LicenseMatch(rule=r1, query=query, qspan=Span(0, 5), ispan=Span(0, 5))
+ match_required_phrase_fully_outside = LicenseMatch(rule=r1, query=query, qspan=Span(5, 8), ispan=Span(5, 8))
+ match_required_phrase_partially_contained = LicenseMatch(rule=r1, query=query, qspan=Span(0, 3), ispan=Span(0, 2))
+ match_required_phrase_fully_containing = LicenseMatch(rule=r1, query=query, qspan=Span(3), ispan=Span(3))
- kept, discarded = filter_matches_missing_key_phrases([
- match_key_phrase_fully_contained,
- match_key_phrase_fully_outside,
- match_key_phrase_partially_contained,
- match_key_phrase_fully_containing
+ kept, discarded = filter_matches_missing_required_phrases([
+ match_required_phrase_fully_contained,
+ match_required_phrase_fully_outside,
+ match_required_phrase_partially_contained,
+ match_required_phrase_fully_containing
])
assert kept == [
- match_key_phrase_fully_contained
+ match_required_phrase_fully_contained
]
assert discarded == [
- match_key_phrase_fully_outside,
- match_key_phrase_partially_contained,
- match_key_phrase_fully_containing
+ match_required_phrase_fully_outside,
+ match_required_phrase_partially_contained,
+ match_required_phrase_fully_containing
]
- def test_filter_key_phrases_discards_matches_where_qspan_intersects_with_unknown_or_stopwords(self):
+ def test_filter_required_phrases_discards_matches_where_qspan_intersects_with_unknown_or_stopwords(self):
idx = index.LicenseIndex()
query = Query(query_string="Lorum ipsum", idx=idx)
query.unknowns_by_pos = {12: 1}
query.stopwords_by_pos = {23: 1}
- r1 = create_rule_from_text_and_expression(license_expression='apache-1.1', key_phrase_spans=[Span(2, 4)])
+ r1 = create_rule_from_text_and_expression(license_expression='apache-1.1', required_phrase_spans=[Span(2, 4)])
- match_key_phrase_fully_contained = LicenseMatch(rule=r1, query=query, qspan=Span(0, 5), ispan=Span(0, 5))
+ match_required_phrase_fully_contained = LicenseMatch(rule=r1, query=query, qspan=Span(0, 5), ispan=Span(0, 5))
match_qspan_intersects_with_unknowns = LicenseMatch(rule=r1, query=query, qspan=Span(10, 15), ispan=Span(0, 5))
match_qspan_intersects_with_stopwords = LicenseMatch(rule=r1, query=query, qspan=Span(20, 25), ispan=Span(0, 5))
- kept, discarded = filter_matches_missing_key_phrases([
- match_key_phrase_fully_contained,
+ kept, discarded = filter_matches_missing_required_phrases([
+ match_required_phrase_fully_contained,
match_qspan_intersects_with_unknowns,
match_qspan_intersects_with_stopwords,
])
assert kept == [
- match_key_phrase_fully_contained
+ match_required_phrase_fully_contained
]
assert discarded == [
match_qspan_intersects_with_unknowns,
match_qspan_intersects_with_stopwords
]
- def test_filter_key_phrases_discards_matches_where_key_phrase_is_interruped_in_qspan(self):
+ def test_filter_required_phrases_discards_matches_where_required_phrase_is_interruped_in_qspan(self):
idx = index.LicenseIndex()
query = Query(query_string="Lorum ipsum", idx=idx)
query.unknowns_by_pos = {}
r1 = Rule(
license_expression='apache-1.1',
- key_phrase_spans=[Span(12, 14)],
+ required_phrase_spans=[Span(12, 14)],
)
qspan_ispan_same_pos = LicenseMatch(
@@ -1081,7 +1081,7 @@ def test_filter_key_phrases_discards_matches_where_key_phrase_is_interruped_in_q
qspan=Span([20, 21, 22, 23, 25]), ispan=Span(10, 15)
)
- kept, discarded = filter_matches_missing_key_phrases([
+ kept, discarded = filter_matches_missing_required_phrases([
qspan_ispan_same_pos,
qspan_with_offset,
qspan_non_contiguous
diff --git a/tests/licensedcode/test_models.py b/tests/licensedcode/test_models.py
index 4dbabfb234..aab5cc62fc 100644
--- a/tests/licensedcode/test_models.py
+++ b/tests/licensedcode/test_models.py
@@ -14,7 +14,6 @@
from licensedcode import index
from licensedcode import models
-from licensedcode.models import get_key_phrase_spans
from licensedcode.models import InvalidRule
from licensedcode.models import Rule
from licensedcode.models import rules_data_dir
@@ -577,23 +576,21 @@ def test_Rule__validate_with_invalid_language(self):
validations.extend(rule.validate())
expected = [
'Unknown language: foobar',
- 'Invalid rule is_license_* flags. Only one allowed.',
'At least one is_license_* flag is needed.',
- 'Invalid rule is_license_* flags. Only one allowed.',
'At least one is_license_* flag is needed.',
]
assert validations == expected
- def test_key_phrases_yields_spans(self):
+ def test_required_phrases_yields_spans(self):
rule_text = (
'This released software is {{released}} by under {{the MIT license}}. '
'Which is a license originating at Massachusetts Institute of Technology (MIT).'
)
rule = models.Rule(license_expression='mit', text=rule_text)
- key_phrase_spans = list(rule.build_key_phrase_spans())
- assert key_phrase_spans == [Span(4), Span(7, 9)]
+ required_phrase_spans = list(rule.build_required_phrase_spans())
+ assert required_phrase_spans == [Span(4), Span(7, 9)]
- def test_key_phrases_raises_exception_when_markup_is_not_closed(self):
+ def test_required_phrases_raises_exception_when_markup_is_not_closed(self):
rule_text = (
'This released software is {{released}} by under {{the MIT license. '
'Which is a license originating at Massachusetts Institute of Technology (MIT).'
@@ -601,7 +598,7 @@ def test_key_phrases_raises_exception_when_markup_is_not_closed(self):
rule = models.Rule(license_expression='mit', text=rule_text)
try:
- list(rule.build_key_phrase_spans())
+ list(rule.build_required_phrase_spans())
raise Exception('Exception should be raised')
except InvalidRule:
pass
@@ -612,53 +609,3 @@ def test_rule_text_file_and_data_file_are_computed_correctly(self):
rule = rules[0]
assert rule.rule_file(rules_data_dir=rule_dir).startswith(rule_dir)
-
-class TestGetKeyPhrases(TestCaseClass):
-
- def test_get_key_phrases_yields_spans(self):
- text = (
- 'This released software is {{released}} by under {{the MIT license}}. '
- 'Which is a license originating at Massachusetts Institute of Technology (MIT).'
- )
-
- key_phrase_spans = get_key_phrase_spans(text)
- assert list(key_phrase_spans) == [Span(4), Span(7, 9)]
-
- def test_get_key_phrases_raises_exception_key_phrase_markup_is_not_closed(self):
- text = 'This software is {{released by under the MIT license.'
- try:
- list(get_key_phrase_spans(text))
- raise Exception('Exception should be raised')
- except InvalidRule:
- pass
-
- def test_get_key_phrases_ignores_stopwords_in_positions(self):
- text = 'The word comma is a stop word so comma does not increase the span position {{MIT license}}.'
- key_phrase_spans = get_key_phrase_spans(text)
- assert list(key_phrase_spans) == [Span(11, 12)]
-
- def test_get_key_phrases_yields_spans_without_stop_words(self):
- text = 'This released software is {{released span}} by under {{the MIT quot license}}.'
- key_phrase_spans = get_key_phrase_spans(text)
- assert list(key_phrase_spans) == [Span(4), Span(7, 9)]
-
- def test_get_key_phrases_does_not_yield_empty_spans(self):
- text = 'This released software {{comma}} is {{}} by under {{the MIT license}}.'
- try:
- list(get_key_phrase_spans(text))
- raise Exception('Exception should be raised')
- except InvalidRule:
- pass
-
- def test_get_key_phrases_only_considers_outer_key_phrase_markup(self):
- text = 'This released {{{software under the MIT}}} license.'
- key_phrase_spans = get_key_phrase_spans(text)
- assert list(key_phrase_spans) == [Span(2, 5)]
-
- def test_get_key_phrases_ignores_nested_key_phrase_markup(self):
- text = 'This released {{software {{under the}} MIT}} license.'
- try:
- list(get_key_phrase_spans(text))
- raise Exception('Exception should be raised')
- except InvalidRule:
- pass
diff --git a/tests/licensedcode/test_required_phrases.py b/tests/licensedcode/test_required_phrases.py
new file mode 100644
index 0000000000..973294c69f
--- /dev/null
+++ b/tests/licensedcode/test_required_phrases.py
@@ -0,0 +1,204 @@
+#
+# Copyright (c) nexB Inc. and others. All rights reserved.
+# ScanCode is a trademark of nexB Inc.
+# SPDX-License-Identifier: Apache-2.0
+# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
+# See https://github.com/nexB/scancode-toolkit for support or download.
+# See https://aboutcode.org for more information about nexB OSS projects.
+#
+
+import os
+from unittest import TestCase as TestCaseClass
+
+import pytest
+
+from licensedcode.required_phrases import get_required_phrases
+from licensedcode.required_phrases import get_required_phrase_spans
+from licensedcode.required_phrases import get_required_phrase_texts
+from licensedcode.required_phrases import add_required_phrases_from_other_rules
+from licensedcode.required_phrases import add_required_phrases_from_license_fields
+from licensedcode.required_phrases import ListOfRequiredPhrases
+from licensedcode.required_phrases import RequiredPhraseDetails
+from licensedcode.required_phrases import return_spans_for_required_phrase_in_text
+from licensedcode.required_phrases import add_required_phrase_markers
+from licensedcode.tokenize import get_normalized_tokens
+from licensedcode.tokenize import matched_query_text_tokenizer
+from licensedcode.stopwords import STOPWORDS
+from licensedcode.models import InvalidRule
+from licensedcode.models import Rule
+from licensedcode.spans import Span
+
+
+class TestGetKeyPhrases(TestCaseClass):
+ text = (
+ 'This released software is {{released}} by under {{the MIT license}}. '
+ 'Which is a license originating at Massachusetts Institute of Technology (MIT).'
+ )
+
+ def test_get_required_phrases_yields_spans(self):
+ required_phrase_spans = get_required_phrase_spans(self.text)
+ assert required_phrase_spans == [Span(4), Span(7, 9)]
+
+ def test_get_required_phrases_yields_tokens(self):
+ required_phrase_tokens = [
+ required_phrase.required_phrase_tokens
+ for required_phrase in get_required_phrases(text=self.text)
+ ]
+ assert required_phrase_tokens == [['released'], ['the', 'mit', 'license']]
+
+ def test_get_required_phrase_texts(self):
+ required_phrase_texts = get_required_phrase_texts(text=self.text)
+ assert required_phrase_texts == ['released', 'the mit license']
+
+ def test_get_required_phrases_raises_exception_required_phrase_markup_is_not_closed(self):
+ text = 'This software is {{released by under the MIT license.'
+ try:
+ list(get_required_phrase_spans(text))
+ raise Exception('Exception should be raised')
+ except InvalidRule:
+ pass
+
+ def test_get_required_phrases_ignores_stopwords_in_positions(self):
+ text = 'The word comma is a stop word so comma does not increase the span position {{MIT license}}.'
+ required_phrase_spans = get_required_phrase_spans(text)
+ assert required_phrase_spans == [Span(11, 12)]
+
+ def test_get_required_phrases_yields_spans_without_stop_words(self):
+ text = 'This released software is {{released span}} by under {{the MIT quot license}}.'
+ required_phrase_spans = get_required_phrase_spans(text)
+ assert required_phrase_spans == [Span(4), Span(7, 9)]
+
+ def test_get_required_phrases_does_not_yield_empty_spans(self):
+ text = 'This released software {{comma}} is {{}} by under {{the MIT license}}.'
+ try:
+ list(get_required_phrase_spans(text))
+ raise Exception('Exception should be raised')
+ except InvalidRule:
+ pass
+
+ def test_get_required_phrases_only_considers_outer_required_phrase_markup(self):
+ text = 'This released {{{software under the MIT}}} license.'
+ required_phrase_spans = get_required_phrase_spans(text)
+ assert required_phrase_spans == [Span(2, 5)]
+
+ def test_get_required_phrases_ignores_nested_required_phrase_markup(self):
+ text = 'This released {{software {{under the}} MIT}} license.'
+ try:
+ list(get_required_phrase_spans(text))
+ raise Exception('Exception should be raised')
+ except InvalidRule:
+ pass
+
+ def test_get_required_phrase_texts_with_markup(self):
+ text = (
+ "Lua is free software distributed under the terms of the"
+ "{{MIT license}}"
+ "reproduced below;"
+ )
+ required_phrase_texts = get_required_phrase_texts(text=text)
+ assert required_phrase_texts == ['mit license']
+
+ def test_get_required_phrase_spans_with_markup(self):
+ text = (
+ "Lua is free software distributed under the terms of the"
+ "{{MIT license}}"
+ "reproduced below;"
+ )
+ required_phrase_spans = get_required_phrase_spans(text=text)
+ assert required_phrase_spans == [Span(18, 19)]
+
+
+class TestListOfRequiredPhrases(TestCaseClass):
+
+ required_phrase_texts = [
+ "mit",
+ "the MIT License",
+ "MIT License with Disclaimer",
+ "licenses: mit",
+ "MIT license",
+ ]
+ required_phrases = [
+ RequiredPhraseDetails(
+ required_phrase_text=text,
+ license_expression="mit",
+ length=len(text),
+ rule=Rule(
+ license_expression="mit",
+ identifier="mit_231.RULE",
+ text=text,
+ is_required_phrase=True,
+ is_license_tag=True,
+ ),
+ sources=["mit_231.RULE"],
+ )
+ for text in required_phrase_texts
+ ]
+ required_phrases_list = ListOfRequiredPhrases(required_phrases=required_phrases)
+
+ def test_sort_required_phrases_works(self):
+ self.required_phrases_list.sort_required_phrases()
+ expected_sorted_texts = [
+ "MIT License with Disclaimer",
+ "the MIT License",
+ "licenses: mit",
+ "MIT license",
+ "mit",
+ ]
+ assert [
+ required_phrase.required_phrase_text
+ for required_phrase in self.required_phrases_list.required_phrases
+ ] == expected_sorted_texts
+
+
+class TestRequiredPhraseSpansinText:
+
+ text_with_stopwords = (
+ "A copy of the GNU General Public License is available as "
+ "/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution. "
+ "A copy of the GNU General Public License is available as "
+ "/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution."
+ )
+
+ text_with_stopwords_and_marked_required_phrases = (
+ "A copy of the GNU General Public License is available as "
+ "/{{usr/share/common-licenses/GPL-2}} in the Debian GNU/Linux distribution. "
+ "A copy of the GNU General Public License is available as "
+ "/{{usr/share/common-licenses/GPL-2}} in the Debian GNU/Linux distribution."
+ )
+
+ def test_get_required_phrase_spans_with_or_without_specified_texts_is_same(self):
+ required_phrase_spans_specified = return_spans_for_required_phrase_in_text(
+ text=self.text_with_stopwords,
+ required_phrase="usr share common licenses gpl 2",
+ )
+
+ required_phrase_spans_unspecified = get_required_phrase_spans(
+ text=self.text_with_stopwords_and_marked_required_phrases,
+ )
+ assert required_phrase_spans_specified == required_phrase_spans_unspecified
+
+ def test_get_required_phrase_and_add_required_phrase_matches(self):
+
+ required_phrase_spans_specified = return_spans_for_required_phrase_in_text(
+ text=self.text_with_stopwords,
+ required_phrase="usr share common licenses gpl 2",
+ )
+
+ text = self.text_with_stopwords
+ for span in required_phrase_spans_specified:
+ text = add_required_phrase_markers(
+ text=text,
+ required_phrase_span=span,
+ )
+
+ assert text == self.text_with_stopwords_and_marked_required_phrases
+
+class TestKeyPhrasesCanBeMarked(TestCaseClass):
+
+ @pytest.mark.scanslow
+ def can_more_key_phrases_be_marked_from_other_rules(self):
+ add_required_phrases_from_other_rules(can_mark_required_phrase_test=True)
+
+ @pytest.mark.scanslow
+ def can_more_key_phrases_be_marked_from_license_attribtues(self):
+ add_required_phrases_from_license_fields(can_mark_required_phrase_test=True)
diff --git a/tests/licensedcode/test_tokenize.py b/tests/licensedcode/test_tokenize.py
index 5b36ec59bc..908a48da85 100644
--- a/tests/licensedcode/test_tokenize.py
+++ b/tests/licensedcode/test_tokenize.py
@@ -17,7 +17,9 @@
from commoncode.testcase import FileBasedTesting
from licensedcode.tokenize import index_tokenizer
-from licensedcode.tokenize import key_phrase_tokenizer
+from licensedcode.tokenize import required_phrase_tokenizer
+from licensedcode.tokenize import return_spans_for_required_phrase_in_text
+from licensedcode.tokenize import add_required_phrase_markers
from licensedcode.tokenize import matched_query_text_tokenizer
from licensedcode.tokenize import query_lines
from licensedcode.tokenize import query_tokenizer
@@ -25,6 +27,7 @@
from licensedcode.tokenize import select_ngrams
from licensedcode.tokenize import tokens_and_non_tokens
from licensedcode.tokenize import word_splitter
+from licensedcode.spans import Span
from scancode_config import REGEN_TEST_FIXTURES
@@ -406,113 +409,187 @@ def test_index_tokenizer_lines_on_html_like_texts_2(self, regen=REGEN_TEST_FIXTU
result = [list(index_tokenizer(line)) for _ln, line in lines]
check_results(result, expected_file, regen=regen)
- def test_key_phrase_tokenizer_on_html_like_texts(self, regen=REGEN_TEST_FIXTURES):
+ def test_required_phrase_tokenizer_on_html_like_texts(self, regen=REGEN_TEST_FIXTURES):
test_file = self.get_test_loc('tokenize/htmlish.txt')
- expected_file = test_file + '.expected.key_phrase_tokenizer.json'
+ expected_file = test_file + '.expected.required_phrase_tokenizer.json'
lines = query_lines(test_file)
- result = [list(key_phrase_tokenizer(line)) for _ln, line in lines]
+ result = [list(required_phrase_tokenizer(line)) for _ln, line in lines]
check_results(result, expected_file, regen=regen)
- def test_key_phrase_tokenizer_lines_on_html_like_texts_2(self, regen=REGEN_TEST_FIXTURES):
+ def test_required_phrase_tokenizer_lines_on_html_like_texts_2(self, regen=REGEN_TEST_FIXTURES):
test_file = self.get_test_loc('tokenize/htmlish.html')
- expected_file = test_file + '.expected.key_phrase_tokenizer.json'
+ expected_file = test_file + '.expected.required_phrase_tokenizer.json'
lines = query_lines(test_file)
- result = [list(key_phrase_tokenizer(line)) for _ln, line in lines]
+ result = [list(required_phrase_tokenizer(line)) for _ln, line in lines]
check_results(result, expected_file, regen=regen)
- def test_key_phrase_tokenizer_handles_empty_string(self):
+ def test_required_phrase_tokenizer_handles_empty_string(self):
text = ''
- result = list(key_phrase_tokenizer(text))
+ result = list(required_phrase_tokenizer(text))
assert result == []
- def test_key_phrase_tokenizer_handles_blank_lines(self):
+ def test_required_phrase_tokenizer_handles_blank_lines(self):
text = u' \n\n\t '
- result = list(key_phrase_tokenizer(text))
+ result = list(required_phrase_tokenizer(text))
assert result == []
- def test_key_phrase_tokenizer_handles_blank_lines2(self):
+ def test_required_phrase_tokenizer_handles_blank_lines2(self):
text = ' \n\t '
- result = list(key_phrase_tokenizer(text))
+ result = list(required_phrase_tokenizer(text))
assert result == []
- def test_key_phrase_tokenizer_handles_empty_lines(self):
+ def test_required_phrase_tokenizer_handles_empty_lines(self):
text = u'\n\n'
expected = []
- assert list(key_phrase_tokenizer(text)) == expected
+ assert list(required_phrase_tokenizer(text)) == expected
- def test_key_phrase_tokenizer_does_not_crash_on_unicode_rules_text_1(self):
+ def test_required_phrase_tokenizer_does_not_crash_on_unicode_rules_text_1(self):
test_file = self.get_test_loc('tokenize/unicode/12290.txt')
with io.open(test_file, encoding='utf-8') as test:
- list(key_phrase_tokenizer(test.read()))
+ list(required_phrase_tokenizer(test.read()))
- def test_key_phrase_does_not_crash_on_unicode_rules_text_2(self):
+ def test_required_phrase_does_not_crash_on_unicode_rules_text_2(self):
test_file = self.get_test_loc('tokenize/unicode/12319.txt')
with io.open(test_file, encoding='utf-8') as test:
- list(key_phrase_tokenizer(test.read()))
+ list(required_phrase_tokenizer(test.read()))
- def test_key_phrase_does_not_crash_on_unicode_rules_text_3(self):
+ def test_required_phrase_does_not_crash_on_unicode_rules_text_3(self):
test_file = self.get_test_loc('tokenize/unicode/12405.txt')
with io.open(test_file, encoding='utf-8') as test:
- list(key_phrase_tokenizer(test.read()))
+ list(required_phrase_tokenizer(test.read()))
- def test_key_phrase_does_not_crash_on_unicode_rules_text_4(self):
+ def test_required_phrase_does_not_crash_on_unicode_rules_text_4(self):
test_file = self.get_test_loc('tokenize/unicode/12407.txt')
with io.open(test_file, encoding='utf-8') as test:
- list(key_phrase_tokenizer(test.read()))
+ list(required_phrase_tokenizer(test.read()))
- def test_key_phrase_does_not_crash_on_unicode_rules_text_5(self):
+ def test_required_phrase_does_not_crash_on_unicode_rules_text_5(self):
test_file = self.get_test_loc('tokenize/unicode/12420.txt')
with io.open(test_file, encoding='utf-8') as test:
- list(key_phrase_tokenizer(test.read()))
+ list(required_phrase_tokenizer(test.read()))
- def test_key_phrase_tokenizer_returns_same_word_tokens_as_index_tokenizer(self):
+ def test_required_phrase_tokenizer_returns_same_word_tokens_as_index_tokenizer(self):
"""
- It is important that the `key_phrase_tokenizer` returns the same amount
- of tokens (excluding key_phrase markup) as the `index_tokenizer` so that
+ It is important that the `required_phrase_tokenizer` returns the same amount
+ of tokens (excluding required_phrase markup) as the `index_tokenizer` so that
they Span positions derived from the tokens line up.
"""
text = 'Redistribution \n\n comma and use in \n\t binary \xe4r till\xe5tet.'
- key_phrase_tokens = key_phrase_tokenizer(text)
+ required_phrase_tokens = required_phrase_tokenizer(text)
index_tokens = index_tokenizer(text)
- assert list(key_phrase_tokens) == list(index_tokens)
+ assert list(required_phrase_tokens) == list(index_tokens)
- def test_key_phrase_tokenizer_returns_key_phrase_markup_as_tokens_for_multiple_token_key_phrases(self):
+ def test_required_phrase_tokenizer_returns_required_phrase_markup_as_tokens_for_multiple_token_required_phrases(self):
text = 'Redistribution and {{use in binary}} is permitted.'
- assert list(key_phrase_tokenizer(text)) == [
+ assert list(required_phrase_tokenizer(text)) == [
'redistribution', 'and', '{{', 'use', 'in',
'binary', '}}', 'is', 'permitted',
]
- def test_key_phrase_tokenizer_returns_key_phrase_markup_as_tokens_after_newline(self):
+ def test_required_phrase_tokenizer_returns_required_phrase_for_multiple_required_phrases(self):
+ text = 'Redistribution and {{use}} in {{binary}} is permitted.'
+ assert list(required_phrase_tokenizer(text)) == [
+ 'redistribution', 'and', '{{', 'use', '}}', 'in',
+ '{{', 'binary', '}}', 'is', 'permitted',
+ ]
+
+ def test_required_phrase_tokenizer_returns_required_phrase_markup_as_tokens_after_newline(self):
text = '{{IS_RIGHT\nThis program is distributed under GPL\n}}IS_RIGHT'
- assert list(key_phrase_tokenizer(text)) == [
+ assert list(required_phrase_tokenizer(text)) == [
'{{', 'is', 'right', 'this', 'program', 'is',
'distributed', 'under', 'gpl', '}}', 'is', 'right'
]
- def test_key_phrase_tokenizer_returns_key_phrase_markup_as_tokens_when_separated_by_space(self):
+ def test_required_phrase_tokenizer_returns_required_phrase_markup_as_tokens_when_separated_by_space(self):
text = 'Redistribution {{ is }} permitted.'
- assert list(key_phrase_tokenizer(text)) == ['redistribution', '{{', 'is', '}}', 'permitted']
+ assert list(required_phrase_tokenizer(text)) == ['redistribution', '{{', 'is', '}}', 'permitted']
- def test_key_phrase_tokenizer_returns_key_phrase_markup_as_tokens_for_single_token_key_phrase(self):
+ def test_required_phrase_tokenizer_returns_required_phrase_markup_as_tokens_for_single_token_required_phrase(self):
text = 'Redistribution {{is}} permitted.'
- assert list(key_phrase_tokenizer(text)) == ['redistribution', '{{', 'is', '}}', 'permitted']
+ assert list(required_phrase_tokenizer(text)) == ['redistribution', '{{', 'is', '}}', 'permitted']
- def test_key_phrase_tokenizer_returns_nested_key_phrase_markup_as_tokens(self):
+ def test_required_phrase_tokenizer_returns_nested_required_phrase_markup_as_tokens(self):
text = 'Redistribution {{is {{not}} really}} permitted.'
- assert list(key_phrase_tokenizer(text)) == [
+ assert list(required_phrase_tokenizer(text)) == [
'redistribution', '{{', 'is', '{{', 'not', '}}',
'really', '}}', 'permitted'
]
- def test_key_phrase_tokenizer_ignores_invalid_key_phrase_markup(self):
+ def test_required_phrase_tokenizer_ignores_invalid_required_phrase_markup(self):
text = 'Redistribution {{{is not really}}} { {permitted} }, I am {afraid}.'
- assert list(key_phrase_tokenizer(text)) == [
+ assert list(required_phrase_tokenizer(text)) == [
'redistribution', '{{', 'is', 'not', 'really', '}}', 'permitted',
'i', 'am', 'afraid'
]
+
+
+class TestSpansinText:
+
+ text_with_articles = (
+ "A copy of the GNU General Public License is available as "
+ "/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution. "
+ "A copy of the GNU General Public License is available as "
+ "/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution."
+ )
+
+ text_with_articles_and_marked_required_phrases = (
+ "A copy of the GNU General Public License is available as "
+ "/{{usr/share/common-licenses/GPL-2}} in the Debian GNU/Linux distribution. "
+ "A copy of the GNU General Public License is available as "
+ "/{{usr/share/common-licenses/GPL-2}} in the Debian GNU/Linux distribution."
+ )
+
+ text_with_extra_characters = (
+ "This is the http://www.opensource.org/licenses/mit-license.php MIT "
+ "Software License which is OSI-certified, and GPL-compatible."
+ )
+
+ text_with_extra_characters_and_marked_required_phrases = (
+ "This is the http://www.opensource.org/licenses/mit-license.php {{MIT "
+ "Software License}} which is OSI-certified, and GPL-compatible."
+ )
+
+ def test_return_spans_for_required_phrase_in_text(self):
+ text = "is released under the MIT license. See the LICENSE"
+ required_phrase_spans = return_spans_for_required_phrase_in_text(text=text, required_phrase="mit license")
+ assert required_phrase_spans == [Span(4, 5)]
+
+ def test_return_spans_for_required_phrase_in_text_multiple(self):
+ required_phrase_spans = return_spans_for_required_phrase_in_text(
+ text=self.text_with_articles,
+ required_phrase="usr share common licenses gpl 2",
+ )
+ assert required_phrase_spans == [Span(10, 15), Span(32, 37)]
+
+ def test_mark_required_phrase_in_text_with_multiple_spans(self):
+ required_phrase_spans = return_spans_for_required_phrase_in_text(
+ text=self.text_with_articles,
+ required_phrase="usr share common licenses gpl 2",
+ )
+ text = self.text_with_articles
+ for span in required_phrase_spans:
+ text = add_required_phrase_markers(
+ text=text,
+ required_phrase_span=span,
+ )
+
+ assert text == self.text_with_articles_and_marked_required_phrases
+
+ def test_mark_required_phrase_in_text_with_extra_characters(self):
+ required_phrase_spans = return_spans_for_required_phrase_in_text(
+ text=self.text_with_extra_characters,
+ required_phrase="mit software license",
+ )
+ text = self.text_with_extra_characters
+ for span in required_phrase_spans:
+ text = add_required_phrase_markers(
+ text=text,
+ required_phrase_span=span,
+ )
+
+ assert text == self.text_with_extra_characters_and_marked_required_phrases
class TestNgrams(FileBasedTesting):