[ngrams] code fixes according to review

Related MR:
!378
4 jobs for 224-dev-understanding-ngrams in 45 minutes and 56 seconds (queued for 4 seconds)
latest
Status Job ID Name Coverage
  Cabal
passed #17085
cabal

00:19:59

 
  Stack
passed #17086
stack

00:06:51

 
  Bench
manual #17087
allowed to fail manual
bench
 
  Test
failed #17088
test

00:19:06

 
Name Stage Failure
failed
test Test
calling stop core nlp - done
Test suite garg-test-hspec: FAIL
Test suite logged to:
/builds/gargantext/haskell-gargantext/dist-newstyle/build/x86_64-linux/ghc-9.4.8/gargantext-0.0.7.4.2/t/garg-test-hspec/opt/test/gargantext-0.0.7.4.2-garg-test-hspec.log
0 of 1 test suites (0 of 1 test cases) passed.
Error: cabal: Tests failed for test:garg-test-hspec from gargantext-0.0.7.4.2.

Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1