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
2ecc0288
Commit
2ecc0288
authored
Jul 18, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COSMETICS]
parent
965531a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
Context.hs
src/Gargantext/Text/Context.hs
+1
-5
List.hs
src/Gargantext/Text/List.hs
+1
-1
No files found.
src/Gargantext/Text/Context.hs
View file @
2ecc0288
...
...
@@ -49,9 +49,6 @@ type Corpus a = [Sentence a] -- a list of sentences
-- | Contexts definition to build/unbuild contexts.
data
SplitContext
=
Chars
Int
|
Sentences
Int
|
Paragraphs
Int
tag
::
Text
->
[
Tag
Text
]
tag
=
parseTags
-- | splitBy contexts of Chars or Sentences or Paragraphs
-- To see some examples at a higher level (sentences and paragraph), see
-- 'Gargantext.Text.Examples.ex_terms'
...
...
@@ -67,10 +64,9 @@ tag = parseTags
splitBy
::
SplitContext
->
Text
->
[
Text
]
splitBy
(
Chars
n
)
=
map
pack
.
chunkAlong
(
n
+
1
)
1
.
unpack
splitBy
(
Sentences
n
)
=
map
unsentences
.
chunkAlong
(
n
+
1
)
1
.
sentences
splitBy
(
Paragraphs
_
)
=
map
unTag
.
filter
isTagText
.
tag
splitBy
(
Paragraphs
_
)
=
map
unTag
.
filter
isTagText
.
parseTags
where
unTag
::
IsString
p
=>
Tag
p
->
p
unTag
(
TagText
x
)
=
x
unTag
_
=
""
src/Gargantext/Text/List.hs
View file @
2ecc0288
...
...
@@ -59,7 +59,7 @@ data StopSize = StopSize {unStopSize :: Int}
-- | TODO improve grouping functions of Authors, Sources, Institutes..
buildNgramsLists
::
Lang
->
Int
->
Int
->
StopSize
->
UserCorpusId
->
MasterCorpusId
->
Cmd
err
(
Map
NgramsType
[
NgramsElement
])
buildNgramsLists
l
n
m
s
uCid
mCid
=
do
buildNgramsLists
l
n
m
s
uCid
_
mCid
=
do
--ngTerms <- buildNgramsTermsList l n m s uCid mCid
ngTerms
<-
buildNgramsTermsList'
uCid
(
ngramsGroup
l
n
m
)
(
isStopTerm
s
.
fst
)
500
50
othersTerms
<-
mapM
(
buildNgramsOthersList
uCid
identity
)
[
Authors
,
Sources
,
Institutes
]
...
...
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