2 Module : Gargantext.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.
16 {-# LANGUAGE NoImplicitPrelude #-}
17 {-# LANGUAGE OverloadedStrings #-}
19 module Gargantext.Text.Terms.Multi.Lang.Fr (group)
22 import Gargantext.Prelude
23 import Gargantext.Core.Types
24 import Gargantext.Text.Terms.Multi.Group (group2)
26 group :: [TokenTag] -> [TokenTag]
28 group ntags = group2 NP NP
39 ------------------------------------------------------------------------
41 --groupNgrams ((x,_,"PERSON"):(y,yy,"PERSON"):xs) = groupNgrams ((x <> " " <> y,yy,"PERSON"):xs)
42 --groupNgrams ((x,_,"ORGANIZATION"):(y,yy,"ORGANIZATION"):xs) = groupNgrams ((x <> " " <> y,yy,"ORGANIZATION"):xs)