Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
0234ddbd
Commit
0234ddbd
authored
Apr 08, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISTEX parsing reactivated + stop hyperdata indexation on text for the moment
parent
54976e29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
constants.py
gargantext/constants.py
+14
-14
CSV.py
gargantext/util/parsers/CSV.py
+2
-2
ISTex.py
gargantext/util/parsers/ISTex.py
+4
-4
No files found.
gargantext/constants.py
View file @
0234ddbd
...
...
@@ -93,19 +93,19 @@ INDEXED_HYPERDATA = {
,
'convert_from_db'
:
str
},
'text'
:
{
'id'
:
7
,
'type'
:
str
,
'convert_to_db'
:
str
,
'convert_from_db'
:
str
},
'page'
:
{
'id'
:
8
,
'type'
:
int
,
'convert_to_db'
:
int
,
'convert_from_db'
:
int
},
#
'text':
#
{ 'id' : 7
#
, 'type' : str
#
, 'convert_to_db' : str
#
, 'convert_from_db': str
#
},
#
#
'page':
#
{ 'id' : 8
#
, 'type' : int
#
, 'convert_to_db' : int
#
, 'convert_from_db': int
#
},
}
...
...
@@ -181,7 +181,7 @@ DEFAULT_TFIDF_CUTOFF_RATIO = .45 # MAINLIST maximum terms in %
DEFAULT_TFIDF_HARD_LIMIT
=
750
# MAINLIST maximum terms abs
# (makes COOCS larger ~ O(N²) /!\)
DEFAULT_COOC_THRESHOLD
=
3
# inclusive minimum for COOCS coefs
DEFAULT_COOC_THRESHOLD
=
2
# inclusive minimum for COOCS coefs
# (makes COOCS more sparse)
DEFAULT_MAPLIST_MAX
=
300
# MAPLIST maximum terms
...
...
gargantext/util/parsers/CSV.py
View file @
0234ddbd
...
...
@@ -18,11 +18,11 @@ class CSVParser(Parser):
return
Freqs
def
parse
(
self
,
file
name
):
def
parse
(
self
,
file
buf
):
print
(
"CSV: parsing (assuming UTF-8 and LF line endings)"
)
contents
=
file
name
.
read
()
.
decode
(
"UTF-8"
)
.
split
(
"
\n
"
)
contents
=
file
buf
.
read
()
.
decode
(
"UTF-8"
)
.
split
(
"
\n
"
)
sample_size
=
10
sample_contents
=
contents
[
0
:
sample_size
]
...
...
gargantext/util/parsers/ISTex.py
View file @
0234ddbd
...
...
@@ -5,10 +5,10 @@ import json
class
ISTexParser
(
Parser
):
def
parse
(
self
,
thefile
):
json_data
=
open
(
thefile
,
"r
"
)
data
=
json
.
load
(
json_data
)
json_data
.
close
()
def
parse
(
self
,
filebuf
):
contents
=
filebuf
.
read
()
.
decode
(
"UTF-8
"
)
data
=
json
.
load
s
(
contents
)
filebuf
.
close
()
json_docs
=
data
[
"hits"
]
hyperdata_list
=
[]
hyperdata_path
=
{
...
...
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