Merge pull request #1715 from sw5678/RAKE

Rake
This commit is contained in:
a3957273 2024-02-16 00:35:33 +00:00 committed by GitHub
commit 196bce04cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 174 additions and 1 deletions

View file

@ -118,6 +118,7 @@ import "./tests/PHP.mjs";
import "./tests/PowerSet.mjs";
import "./tests/Protobuf.mjs";
import "./tests/Rabbit.mjs";
import "./tests/RAKE.mjs";
import "./tests/Regex.mjs";
import "./tests/Register.mjs";
import "./tests/RisonEncodeDecode.mjs";

View file

@ -0,0 +1,22 @@
/**
* RAKE, Rapid Automatic Keyword Extraction tests.
*
* @author sw5678
* @copyright Crown Copyright 2024
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
"name": "RAKE: Basic Example",
"input": "test1 test2. test2",
"expectedOutput": "Scores: , Keywords: \n3.5, test1 test2\n1.5, test2",
"recipeConfig": [
{
"op": "RAKE",
"args": ["\\s", "\\.\\s|\\n", "i,me,my,myself,we,our"]
},
],
}
]);