aboutsummaryrefslogtreecommitdiff
path: root/v2/tokenizer_test.go
diff options
context:
space:
mode:
authorBill Neubauer <wcn@google.com>2022-04-26 10:08:12 -0700
committerBill Neubauer <bill.neubauer@gmail.com>2022-09-16 10:06:11 -0700
commitcb39e2ce0ae3978c8384a16d4ba4de007583e7fe (patch)
tree80c86f0101b666b62b5c2c8bb9c874175c5814b4 /v2/tokenizer_test.go
parentdd64e698b98547386f13e9e683dc1fb3b6029c60 (diff)
downloadlicenseclassifier-cb39e2ce0ae3978c8384a16d4ba4de007583e7fe.tar.gz
Adds Copyright detection to the report generated by the classifier.
Previously copyright lines were just silently dropped, but now the classifier returns a match to indicate that the line contained an identified copyright statement. The matched text is still pruned from the normalized output, this only changes the output report from the classifier. PiperOrigin-RevId: 444592120
Diffstat (limited to 'v2/tokenizer_test.go')
-rw-r--r--v2/tokenizer_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/v2/tokenizer_test.go b/v2/tokenizer_test.go
index a01c43d..fec5b96 100644
--- a/v2/tokenizer_test.go
+++ b/v2/tokenizer_test.go
@@ -133,6 +133,7 @@ The AWESOME Project`,
Line: 10,
},
},
+ Matches: Matches{&Match{Name: "Copyright", Confidence: 1.0, MatchType: "Copyright", StartLine: 6, EndLine: 6}},
},
},
}