Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 191
    • Issues 191
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Merge Requests
  • !453

Merged
Opened Sep 30, 2025 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
Report abuse

Break loops in Ngrams graphs

Fixes #513 (closed). (Alas I made a bit of a boo-boo with the commits as I had to work on multiple machines yesterday, apologies).

Tests pass but I couldn't test it thoroughly.

This MR reworks the internal of buildForest so that we build a graph first, precisely a list of strongly connected components , then we look for loops and if we find them we apply a OnLoopDetectedStrategy, out of which for now I have implemented only the "just do it", which will remove the loop by computing the spanning forest and otherwise trivially remove the loop.

The tests pass and despite I didn't have time to add more tests to test this as thoroughly as I wanted, I have tried a number of scenario -- I can now run the query that @davidchavalarias mentioned that was looping (the one from HAL about the "numeric technique") as well as import @fmaniere 's docslist which was shared inside #513 (closed) that was looping before.

I think/hope what this MR delivers should be an improvement on what we have now, so I think it's worth merging and deploying over to dev.sub provided CI is green.

Edited Sep 30, 2025 by Alfredo Di Napoli

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b adinapoli/issue-513-v2 origin/adinapoli/issue-513-v2

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/dev
git merge --no-ff adinapoli/issue-513-v2

Step 4. Push the result of the merge to GitLab

git push origin dev

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 9
  • Pipelines 3
  • Changes 8
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
1
Labels
Beta quality (merge at your own risk)
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext!453

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.