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
120
Issues
120
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
974a917d
Commit
974a917d
authored
Nov 08, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Reindexing
parent
53f801e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
List.hs
src/Gargantext/API/Ngrams/List.hs
+1
-1
WithList.hs
src/Gargantext/Core/Text/Terms/WithList.hs
+1
-2
No files found.
src/Gargantext/API/Ngrams/List.hs
View file @
974a917d
...
...
@@ -158,7 +158,7 @@ reIndexWith cId lId nt lts = do
-- Checking Text documents where orphans match
-- TODO Tests here
let
ngramsByDoc
=
map
(
HashMap
.
fromList
)
ngramsByDoc
=
map
(
HashMap
.
fromList
With
(
<>
)
)
$
map
(
map
(
\
(
k
,
v
)
->
(
SimpleNgrams
(
text2ngrams
k
),
v
)))
$
map
(
\
doc
->
List
.
zip
(
termsInText
(
buildPatterns
$
map
(
\
k
->
(
Text
.
splitOn
" "
$
unNgramsTerm
k
,
[]
))
orphans
)
...
...
src/Gargantext/Core/Text/Terms/WithList.hs
View file @
974a917d
...
...
@@ -70,9 +70,8 @@ buildPatterns = sortWith (Down . _pat_length) . concatMap buildPattern
--------------------------------------------------------------------------
-- Utils
type
BlockText
=
Text
type
MatchedText
=
Text
termsInText
::
Patterns
->
Block
Text
->
[
MatchedText
]
termsInText
::
Patterns
->
Text
->
[
MatchedText
]
termsInText
pats
txt
=
List
.
nub
$
List
.
concat
$
map
(
map
unwords
)
...
...
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