2 Module : Gargantext.Text.Terms.Multi.RAKE
3 Description : Rapid automatic keyword extraction (RAKE)
4 Copyright : (c) CNRS, 2017
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
10 Personal notes for the integration of RAKE in Gargantext.
12 RAKE algorithm is a simple, rapid and effective algorithm to extract
13 keywords that is very sensitive to the quality of the stop word list.
15 Indeed, the very first step starts from the stop words list to cut the
16 text towards keywords extraction. The conTexT is the sentence level to
17 compute the coccurrences and occurrences which are divided to compute
18 the metric of one word. Multi-words metrics is equal to the sum of the
21 Finally The metrics highlight longer keywords which highly depends of
22 quality of the cut which depends on the quality of the stop word list.
24 As a consequence, to improve the effectiveness of RAKE algorithm, I am
25 wondering if some bayesian features could be added to increase stop word
31 module Gargantext.Text.Terms.Multi.RAKE (multiterms_rake, select, hardStopList)
34 import GHC.Real (round)
35 import Data.Text (Text)
38 import Gargantext.Text.Samples.EN (stopList)
39 import Gargantext.Prelude
41 select :: Double -> [a] -> [a]
42 select part ns = take n ns
44 n = round $ part * (fromIntegral $ length ns)
47 multiterms_rake :: Text -> [WordScore]
48 multiterms_rake = candidates hardStopList
50 defaultNolist . pSplitter
53 hardStopList :: StopwordsMap
54 hardStopList = mkStopwordsStr stopList