Skip to content

Commit

Permalink
update fuzzy matcher rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Aivean committed Apr 3, 2024
1 parent 32e3c82 commit 8820896
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/scala/com/aivean/royalroad/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ object Utils {
"report" -> 0.7,
"please report" -> 0.61,
"without permission" -> 0.6,
"without author" -> 0.6,
"without the author" -> 0.6,
"without consent" -> 0.6,
"unauthorized" -> 0.6,
"pilfered" -> 0.5,
"lifted" -> 0.5,
"obtained" -> 0.5,
"taken" -> 0.5,
"purloined" -> 0.5,
"appropriated" -> 0.5,
"royal road" -> 0.9,
Expand All @@ -34,6 +39,7 @@ object Utils {
"novel" -> 0.4,
"tale" -> 0.4,
"infringement" -> 0.5,
"unlawfully" -> 0.5,
"violation" -> 0.5,
"not rightfully" -> 0.5,
"taken without" -> 0.7,
Expand Down
7 changes: 6 additions & 1 deletion src/test/scala/com/aivean/royalroad/UtilsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ class UtilsTest extends FunSuite {
"Royal Road's content has been misappropriated; report any instances of this story if found elsewhere.",
"The story has been taken without consent; if you see it on Amazon, report the incident.",
"Stolen novel; please report.",
"Stolen content alert: this content belongs on Royal Road. Report any occurrences."
"Stolen content alert: this content belongs on Royal Road. Report any occurrences.",
"This content has been unlawfully taken from Royal Road; report any instances of this story if found elsewhere.",
"This tale has been unlawfully lifted from Royal Road; report any instances of this story if found elsewhere.",
"This story has been taken without authorization. Report any sightings.",
"This tale has been unlawfully lifted without the author's consent. Report any appearances on Amazon.",
"This story has been unlawfully obtained without the author's consent. Report any appearances on Amazon."
)

test("amazonRegex") {
Expand Down

0 comments on commit 8820896

Please sign in to comment.