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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
64789260
Commit
64789260
authored
Jan 26, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-104-adding-language' into 104-dev-john-snow-nlp
parents
c043b61e
180f49fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
Core.hs
src/Gargantext/Core.hs
+2
-1
PosTagging.hs
src/Gargantext/Core/Text/Terms/Multi/PosTagging.hs
+9
-0
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+2
-1
No files found.
src/Gargantext/Core.hs
View file @
64789260
...
@@ -77,7 +77,7 @@ instance HasDBid Lang where
...
@@ -77,7 +77,7 @@ instance HasDBid Lang where
type
Form
=
Text
type
Form
=
Text
type
Lem
=
Text
type
Lem
=
Text
------------------------------------------------------------------------
------------------------------------------------------------------------
data
PosTagAlgo
=
CoreNLP
data
PosTagAlgo
=
CoreNLP
|
JohnSnowServer
deriving
(
Show
,
Read
,
Eq
,
Ord
,
Generic
)
deriving
(
Show
,
Read
,
Eq
,
Ord
,
Generic
)
instance
Hashable
PosTagAlgo
instance
Hashable
PosTagAlgo
...
@@ -85,5 +85,6 @@ instance Hashable PosTagAlgo
...
@@ -85,5 +85,6 @@ instance Hashable PosTagAlgo
instance
HasDBid
PosTagAlgo
where
instance
HasDBid
PosTagAlgo
where
toDBid
CoreNLP
=
1
toDBid
CoreNLP
=
1
fromDBid
1
=
CoreNLP
fromDBid
1
=
CoreNLP
fromDBid
2
=
JohnSnowServer
fromDBid
_
=
panic
"HasDBid posTagAlgo : Not implemented"
fromDBid
_
=
panic
"HasDBid posTagAlgo : Not implemented"
src/Gargantext/Core/Text/Terms/Multi/PosTagging.hs
View file @
64789260
...
@@ -139,4 +139,13 @@ tokenWith f lang s = map (map (\t -> (_tokenWord t, f t)))
...
@@ -139,4 +139,13 @@ tokenWith f lang s = map (map (\t -> (_tokenWord t, f t)))
<$>
_sentences
<$>
_sentences
<$>
corenlp
lang
s
<$>
corenlp
lang
s
----------------------------------------------------------------------------------
-- Here connect to the JohnSnow Server as it has been done above with the corenlp'
-- We need the PosTagging according to the language and the lems
serverNLP
::
Lang
->
Text
->
IO
PosSentences
serverNLP
=
undefined
src/Gargantext/Database/Action/Flow.hs
View file @
64789260
...
@@ -264,7 +264,8 @@ flowCorpusUser l user corpusName ctype ids mfslw = do
...
@@ -264,7 +264,8 @@ flowCorpusUser l user corpusName ctype ids mfslw = do
(
masterUserId
,
_masterRootId
,
masterCorpusId
)
(
masterUserId
,
_masterRootId
,
masterCorpusId
)
<-
getOrMk_RootWithCorpus
(
UserName
userMaster
)
(
Left
""
)
ctype
<-
getOrMk_RootWithCorpus
(
UserName
userMaster
)
(
Left
""
)
ctype
--let gp = (GroupParams l 2 3 (StopSize 3))
--let gp = (GroupParams l 2 3 (StopSize 3))
-- Here the PosTagAlgo should be chosen according the Lang
let
gp
=
GroupWithPosTag
l
CoreNLP
HashMap
.
empty
let
gp
=
GroupWithPosTag
l
CoreNLP
HashMap
.
empty
ngs
<-
buildNgramsLists
user
userCorpusId
masterCorpusId
mfslw
gp
ngs
<-
buildNgramsLists
user
userCorpusId
masterCorpusId
mfslw
gp
...
...
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