Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
c0ec7622
Commit
c0ec7622
authored
Mar 11, 2024
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a bit more thorough testing to stemming algorithms
parent
2941ac6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
DocumentSearch.hs
test/Test/Database/Operations/DocumentSearch.hs
+9
-2
No files found.
test/Test/Database/Operations/DocumentSearch.hs
View file @
c0ec7622
...
...
@@ -137,8 +137,15 @@ corpusAddDocuments env = do
stemmingTest
::
TestEnv
->
Assertion
stemmingTest
_env
=
do
stem
EN
GargPorterAlgorithm
"Ajeje"
`
shouldBe
`
"Ajeje"
stem
EN
GargPorterAlgorithm
"PyPlasm:"
`
shouldBe
`
"PyPlasm:"
stem
EN
GargPorterAlgorithm
"Ajeje"
`
shouldBe
`
"Ajeje"
stem
EN
GargPorterAlgorithm
"PyPlasm:"
`
shouldBe
`
"PyPlasm:"
-- This test outlines the main differences between Porter and Lancaster.
stem
EN
GargPorterAlgorithm
"dancer"
`
shouldBe
`
"dancer"
stem
EN
LancasterAlgorithm
"dancer"
`
shouldBe
`
"dant"
stem
EN
GargPorterAlgorithm
"postpartum"
`
shouldBe
`
"postpartum"
stem
EN
LancasterAlgorithm
"postpartum"
`
shouldBe
`
"postpart"
stem
IT
PorterAlgorithm
"catechizzare"
`
shouldBe
`
"catechizz"
stem
IT
LancasterAlgorithm
"catechizzare"
`
shouldBe
`
"catechizzare"
-- lancaster doesn't support Italian
mkQ
::
T
.
Text
->
API
.
Query
mkQ
txt
=
either
(
\
e
->
error
$
"(query) = "
<>
T
.
unpack
txt
<>
": "
<>
e
)
id
.
API
.
parseQuery
.
API
.
RawQuery
$
txt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment