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
a0140740
Commit
a0140740
authored
Sep 15, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore debugging output about taggers and tiny refact
parent
28158915
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
ngrams_extraction.py
gargantext/util/toolchain/ngrams_extraction.py
+3
-6
No files found.
gargantext/util/toolchain/ngrams_extraction.py
View file @
a0140740
...
...
@@ -56,18 +56,15 @@ def extract_ngrams(corpus, keys=DEFAULT_INDEX_FIELDS, do_subngrams = DEFAULT_IND
tagger_bots
=
{
lang
:
load_tagger
(
lang
)
for
lang
in
corpus
.
hyperdata
[
"languages"
]
\
if
lang
!=
"__unknown__"
}
tagger_bots
[
"__unknown__"
]
=
load_tagger
(
"en"
)
#
print("#TAGGERS LOADED: ", tagger_bots)
print
(
"#TAGGERS LOADED: "
,
tagger_bots
)
supported_taggers_lang
=
tagger_bots
.
keys
()
# print("#SUPPORTED TAGGER LANGS", supported_taggers_lang
)
print
(
"#SUPPORTED TAGGER LANGS"
,
list
(
supported_taggers_lang
)
)
for
documents_count
,
document
in
enumerate
(
corpus
.
children
(
'DOCUMENT'
)):
#load only the docs that have passed the parsing without error
if
document
.
id
not
in
corpus
.
hyperdata
[
"skipped_docs"
]:
if
'language_iso2'
in
document
.
hyperdata
:
language_iso2
=
document
.
hyperdata
[
'language_iso2'
]
else
:
language_iso2
=
"__unknown__"
language_iso2
=
document
.
hyperdata
.
get
(
'language_iso2'
,
'__unknown__'
)
# debug
# print(language_iso2)
...
...
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