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
4e89d82c
Commit
4e89d82c
authored
Mar 02, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[METRICS] TFICF errors && exports
parent
543bad9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
TFICF.hs
src/Gargantext/Text/Metrics/TFICF.hs
+14
-4
No files found.
src/Gargantext/Text/Metrics/TFICF.hs
View file @
4e89d82c
...
...
@@ -15,10 +15,20 @@ TFICF is a generalization of [TFIDF](https://en.wikipedia.org/wiki/Tf%E2%80%93id
{-# LANGUAGE NoImplicitPrelude #-}
module
Gargantext.Text.Metrics.TFICF
where
module
Gargantext.Text.Metrics.TFICF
(
TFICF
,
TficfContext
(
..
)
,
Total
(
..
)
,
Count
(
..
)
,
tficf
)
where
import
Data.Text
(
Text
)
import
Gargantext.Prelude
path
::
Text
path
=
"Gargantext.Text.Metrics.TFICF"
type
TFICF
=
Double
data
TficfContext
n
m
=
TficfInfra
n
m
...
...
@@ -34,7 +44,7 @@ tficf :: TficfContext Count Total
tficf
(
TficfInfra
(
Count
ic
)
(
Total
it
)
)
(
TficfSupra
(
Count
sc
)
(
Total
st
)
)
|
it
>=
ic
&&
st
>=
sc
=
(
ic
/
it
)
/
log
(
sc
/
st
)
|
otherwise
=
panic
"
Frequency impossible"
tficf
_
_
=
panic
"Undefined for these contexts"
|
otherwise
=
panic
$
"[ERR]"
<>
path
<>
"
Frequency impossible"
tficf
_
_
=
panic
$
"[ERR]"
<>
path
<>
"Undefined for these contexts"
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