Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
gargantext
haskell-gargantext
Commits
dd95bc6c
Verified
Commit
dd95bc6c
authored
Apr 03, 2024
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[refactor] intercalate " " -> unwords
parent
7d777a10
Pipeline
#5861
failed with stages
in 127 minutes and 58 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
17 deletions
+17
-17
Text.hs
src/Gargantext/Core/Text.hs
+3
-3
Isidore.hs
src/Gargantext/Core/Text/Corpus/API/Isidore.hs
+1
-1
FrameWrite.hs
src/Gargantext/Core/Text/Corpus/Parsers/FrameWrite.hs
+1
-1
WithStem.hs
src/Gargantext/Core/Text/List/Group/WithStem.hs
+1
-1
Prepare.hs
src/Gargantext/Core/Text/Prepare.hs
+1
-1
Terms.hs
src/Gargantext/Core/Text/Terms.hs
+1
-1
Search.hs
src/Gargantext/Core/Types/Search.hs
+1
-1
Tools.hs
src/Gargantext/Core/Viz/Graph/Tools.hs
+8
-8
No files found.
src/Gargantext/Core/Text.hs
View file @
dd95bc6c
...
@@ -66,7 +66,7 @@ class Collage sup inf where
...
@@ -66,7 +66,7 @@ class Collage sup inf where
instance
Collage
Texte
Paragraphe
where
instance
Collage
Texte
Paragraphe
where
dec
(
Texte
t
)
=
map
Paragraphe
$
DT
.
splitOn
"
\n
"
t
dec
(
Texte
t
)
=
map
Paragraphe
$
DT
.
splitOn
"
\n
"
t
inc
=
Texte
.
DT
.
intercalate
"
\n
"
.
map
(
\
(
Paragraphe
t
)
->
t
)
inc
=
Texte
.
DT
.
unlines
.
map
(
\
(
Paragraphe
t
)
->
t
)
instance
Collage
Paragraphe
Phrase
where
instance
Collage
Paragraphe
Phrase
where
dec
(
Paragraphe
t
)
=
map
Phrase
$
sentences
t
dec
(
Paragraphe
t
)
=
map
Phrase
$
sentences
t
...
@@ -78,7 +78,7 @@ instance Collage Phrase MultiTerme where
...
@@ -78,7 +78,7 @@ instance Collage Phrase MultiTerme where
instance
Collage
MultiTerme
Mot
where
instance
Collage
MultiTerme
Mot
where
dec
(
MultiTerme
mt
)
=
map
Mot
$
DT
.
words
mt
dec
(
MultiTerme
mt
)
=
map
Mot
$
DT
.
words
mt
inc
=
MultiTerme
.
DT
.
intercalate
" "
.
map
(
\
(
Mot
m
)
->
m
)
inc
=
MultiTerme
.
DT
.
unwords
.
map
(
\
(
Mot
m
)
->
m
)
-------------------------------------------------------------------
-------------------------------------------------------------------
-- Contexts of text
-- Contexts of text
...
@@ -92,7 +92,7 @@ isCharStop :: Char -> Bool
...
@@ -92,7 +92,7 @@ isCharStop :: Char -> Bool
isCharStop
c
=
c
`
elem
`
[
'.'
,
'?'
,
'!'
]
isCharStop
c
=
c
`
elem
`
[
'.'
,
'?'
,
'!'
]
unsentences
::
[
Text
]
->
Text
unsentences
::
[
Text
]
->
Text
unsentences
txts
=
DT
.
intercalate
" "
txts
unsentences
txts
=
DT
.
unwords
txts
-- | Ngrams size
-- | Ngrams size
size
::
Text
->
Int
size
::
Text
->
Int
...
...
src/Gargantext/Core/Text/Corpus/API/Isidore.hs
View file @
dd95bc6c
...
@@ -71,7 +71,7 @@ isidoreToDoc lang (IsidoreDoc t a d u s as) = do
...
@@ -71,7 +71,7 @@ isidoreToDoc lang (IsidoreDoc t a d u s as) = do
langText
::
LangText
->
Text
langText
::
LangText
->
Text
langText
(
LangText
_l
t1
)
=
t1
langText
(
LangText
_l
t1
)
=
t1
langText
(
OnlyText
t2
)
=
t2
langText
(
OnlyText
t2
)
=
t2
langText
(
ArrayText
ts
)
=
Text
.
intercalate
" "
$
map
langText
ts
langText
(
ArrayText
ts
)
=
Text
.
unwords
$
map
langText
ts
let
mDateS
=
maybe
(
Just
$
Text
.
pack
$
show
Defaults
.
year
)
Just
d
let
mDateS
=
maybe
(
Just
$
Text
.
pack
$
show
Defaults
.
year
)
Just
d
let
(
utcTime
,
(
pub_year
,
pub_month
,
pub_day
))
=
Date
.
mDateSplit
mDateS
let
(
utcTime
,
(
pub_year
,
pub_month
,
pub_day
))
=
Date
.
mDateSplit
mDateS
...
...
src/Gargantext/Core/Text/Corpus/Parsers/FrameWrite.hs
View file @
dd95bc6c
...
@@ -247,7 +247,7 @@ text2titleParagraphs n = catMaybes
...
@@ -247,7 +247,7 @@ text2titleParagraphs n = catMaybes
n'
=
n
+
(
round
$
(
fromIntegral
n
)
/
(
2
::
Double
))
n'
=
n
+
(
round
$
(
fromIntegral
n
)
/
(
2
::
Double
))
doTitle
::
[
Text
]
->
Maybe
(
Text
,
Text
)
doTitle
::
[
Text
]
->
Maybe
(
Text
,
Text
)
doTitle
(
t
:
ts
)
=
Just
(
t
,
DT
.
intercalate
" "
ts
)
doTitle
(
t
:
ts
)
=
Just
(
t
,
DT
.
unwords
ts
)
doTitle
[]
=
Nothing
doTitle
[]
=
Nothing
...
...
src/Gargantext/Core/Text/List/Group/WithStem.hs
View file @
dd95bc6c
...
@@ -70,7 +70,7 @@ groupWith :: GroupParams
...
@@ -70,7 +70,7 @@ groupWith :: GroupParams
groupWith
GroupIdentity
t
=
identity
t
groupWith
GroupIdentity
t
=
identity
t
groupWith
(
GroupParams
{
unGroupParams_lang
=
l
})
t
=
groupWith
(
GroupParams
{
unGroupParams_lang
=
l
})
t
=
NgramsTerm
NgramsTerm
$
Text
.
intercalate
" "
$
Text
.
unwords
$
map
(
stem
l
PorterAlgorithm
)
$
map
(
stem
l
PorterAlgorithm
)
-- . take n
-- . take n
$
List
.
sort
$
List
.
sort
...
...
src/Gargantext/Core/Text/Prepare.hs
View file @
dd95bc6c
...
@@ -50,7 +50,7 @@ data Paragraph = Uniform Grain | AuthorLike
...
@@ -50,7 +50,7 @@ data Paragraph = Uniform Grain | AuthorLike
-- Grain: number of Sentences by block of Text
-- Grain: number of Sentences by block of Text
-- Step : overlap of sentence between connex block of Text
-- Step : overlap of sentence between connex block of Text
groupUniform
::
Grain
->
[
Text
]
->
[
Text
]
groupUniform
::
Grain
->
[
Text
]
->
[
Text
]
groupUniform
g
ts
=
map
(
Text
.
intercalate
" "
)
groupUniform
g
ts
=
map
Text
.
unwords
$
chunkAlong
g
g
$
chunkAlong
g
g
$
sentences
$
sentences
$
Text
.
concat
ts
$
Text
.
concat
ts
...
...
src/Gargantext/Core/Text/Terms.hs
View file @
dd95bc6c
...
@@ -87,7 +87,7 @@ extractTerms ncs (Unsupervised {..}) xs = mapM (terms ncs (Unsupervised { _tt_mo
...
@@ -87,7 +87,7 @@ extractTerms ncs (Unsupervised {..}) xs = mapM (terms ncs (Unsupervised { _tt_mo
where
where
m'
=
case
_tt_model
of
m'
=
case
_tt_model
of
Just
m''
->
m''
Just
m''
->
m''
Nothing
->
newTries
_tt_windowSize
(
Text
.
intercalate
" "
xs
)
Nothing
->
newTries
_tt_windowSize
(
Text
.
unwords
xs
)
extractTerms
ncs
termTypeLang
xs
=
mapM
(
terms
ncs
termTypeLang
)
xs
extractTerms
ncs
termTypeLang
xs
=
mapM
(
terms
ncs
termTypeLang
)
xs
...
...
src/Gargantext/Core/Types/Search.hs
View file @
dd95bc6c
...
@@ -151,6 +151,6 @@ instance ToHyperdataRow HyperdataContact where
...
@@ -151,6 +151,6 @@ instance ToHyperdataRow HyperdataContact where
toHyperdataRow
(
HyperdataContact
{
_hc_who
=
Just
(
ContactWho
_
fn
ln
_
_
_
),
_hc_where
=
ou
}
)
=
toHyperdataRow
(
HyperdataContact
{
_hc_who
=
Just
(
ContactWho
_
fn
ln
_
_
_
),
_hc_where
=
ou
}
)
=
HyperdataRowContact
(
fromMaybe
"FirstName"
fn
)
(
fromMaybe
"LastName"
ln
)
ou'
HyperdataRowContact
(
fromMaybe
"FirstName"
fn
)
(
fromMaybe
"LastName"
ln
)
ou'
where
where
ou'
=
maybe
"CNRS"
(
Text
.
intercalate
" "
.
_cw_organization
)
(
head
ou
)
ou'
=
maybe
"CNRS"
(
Text
.
unwords
.
_cw_organization
)
(
head
ou
)
toHyperdataRow
(
HyperdataContact
{})
=
toHyperdataRow
(
HyperdataContact
{})
=
HyperdataRowContact
"FirstName"
"LastName"
"Labs"
HyperdataRowContact
"FirstName"
"LastName"
"Labs"
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
dd95bc6c
...
@@ -119,14 +119,14 @@ cooc2graphWith' _doPartitions _bridgenessMethod multi similarity threshold stren
...
@@ -119,14 +119,14 @@ cooc2graphWith' _doPartitions _bridgenessMethod multi similarity threshold stren
partitions
<-
if
(
Map
.
size
distanceMap
>
0
)
partitions
<-
if
(
Map
.
size
distanceMap
>
0
)
then
recursiveClustering'
(
spinglass'
1
)
distanceMap
then
recursiveClustering'
(
spinglass'
1
)
distanceMap
else
panic
$
Text
.
intercalate
" "
[
"I can not compute the graph you request"
else
panic
$
Text
.
unwords
[
"I can not compute the graph you request"
,
"because either the quantity of documents"
,
"because either the quantity of documents"
,
"or the quantity of terms"
,
"or the quantity of terms"
,
"are lacking."
,
"are lacking."
,
"Solution: add more either Documents or Map Terms to your analysis."
,
"Solution: add more either Documents or Map Terms to your analysis."
,
"Follow the available tutorials on the Training EcoSystems."
,
"Follow the available tutorials on the Training EcoSystems."
,
"Ask your co-users of GarganText how to have access to it."
,
"Ask your co-users of GarganText how to have access to it."
]
]
length
partitions
`
seq
`
pure
()
length
partitions
`
seq
`
pure
()
let
let
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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