Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
42ab55b9
Commit
42ab55b9
authored
Jun 02, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Corenlp lems -> using stem.
parent
6551bf90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Multi.hs
src/Gargantext/Text/Terms/Multi.hs
+7
-3
No files found.
src/Gargantext/Text/Terms/Multi.hs
View file @
42ab55b9
...
...
@@ -18,23 +18,27 @@ module Gargantext.Text.Terms.Multi (multiterms)
import
Data.Text
hiding
(
map
,
group
,
filter
,
concat
)
import
Data.List
(
concat
)
import
qualified
Data.Set
as
S
import
Gargantext.Prelude
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.Core.Types
import
Gargantext.Text.Terms.Multi.PosTagging
import
Gargantext.Text.Terms.Mono.Stem
(
stem
)
import
qualified
Gargantext.Text.Terms.Multi.Lang.En
as
En
import
qualified
Gargantext.Text.Terms.Multi.Lang.Fr
as
Fr
multiterms
::
Lang
->
Text
->
IO
[
Terms
]
multiterms
lang
txt
=
concat
<$>
map
(
map
tokenTag2terms
)
<$>
map
(
map
(
tokenTag2terms
lang
)
)
<$>
map
(
filter
(
\
t
->
_my_token_pos
t
==
Just
NP
))
<$>
tokenTags
lang
txt
tokenTag2terms
::
TokenTag
->
Terms
tokenTag2terms
(
TokenTag
w
t
_
_
)
=
Terms
w
t
tokenTag2terms
::
Lang
->
TokenTag
->
Terms
tokenTag2terms
lang
(
TokenTag
w
t
_
_
)
=
Terms
w
t'
where
t'
=
S
.
fromList
$
map
(
stem
lang
)
$
S
.
toList
t
tokenTags
::
Lang
->
Text
->
IO
[[
TokenTag
]]
tokenTags
lang
s
=
map
(
group
lang
)
<$>
tokenTags'
lang
s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment