2 Module : Gargantext.Core.Text.Terms.Multi.Lang.Fr
3 Description : French Grammar rules to group postag tokens.
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
10 This @group@ function groups horizontally ngrams in their context of
11 sentence according to grammars specific of each language. In english, JJ
12 is ADJectiv in french.
17 module Gargantext.Core.Text.Terms.Multi.Lang.Fr (groupTokens)
20 import Gargantext.Prelude
21 import Gargantext.Core.Types
22 import Gargantext.Core.Text.Terms.Multi.Group (group2)
24 groupTokens :: [TokenTag] -> [TokenTag]
26 groupTokens ntags = group2 NP NP
37 ------------------------------------------------------------------------
39 --groupNgrams ((x,_,"PERSON"):(y,yy,"PERSON"):xs) = groupNgrams ((x <> " " <> y,yy,"PERSON"):xs)
40 --groupNgrams ((x,_,"ORGANIZATION"):(y,yy,"ORGANIZATION"):xs) = groupNgrams ((x <> " " <> y,yy,"ORGANIZATION"):xs)