Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
spam_test.go949 B
package spam import ( _ "embed" "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestDetector_Detect(t *testing.T) { threshold := 0.0003 d := repeatedContentDetector{ threshold: threshold, } check := func(f string, below float64) { t.Run(f, func(t *testing.T) { r := require.New(t) a := assert.New(t) reader, err := os.Open(f) r.NoError(err) got, err := d.getRatio(reader) r.NoError(err) a.Less(got, below) }) } check("./post01_spam.txt" /**/, threshold) check("./post02.txt" /* */, 0.03) check("./post03.txt" /* */, 0.0008) check("./post04.txt" /* */, 0.0014) check("./post05.txt" /* */, 0.0014) check("./post06.txt" /* */, 0.009) check("./post07.txt" /* */, 0.005) check("./post08.txt" /* */, 0.003) check("./post09_spam.txt" /**/, 0.003) // false negative check("./post10_spam.txt" /**/, 0.003) // false negative }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server