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
cb55190f
Commit
cb55190f
authored
Jul 05, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grammar rule renaming again (sorry for all the small changes)
parent
54f9a679
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
constants.py
gargantext/constants.py
+2
-1
ngramsextractors.py
gargantext/util/ngramsextractors.py
+1
-1
No files found.
gargantext/constants.py
View file @
cb55190f
...
@@ -20,6 +20,7 @@ LISTTYPES = {
...
@@ -20,6 +20,7 @@ LISTTYPES = {
'TFIDF-GLOBAL'
:
WeightedIndex
,
'TFIDF-GLOBAL'
:
WeightedIndex
,
'TIRANK-LOCAL'
:
WeightedIndex
,
# could be WeightedList
'TIRANK-LOCAL'
:
WeightedIndex
,
# could be WeightedList
'TIRANK-GLOBAL'
:
WeightedIndex
,
# could be WeightedList
'TIRANK-GLOBAL'
:
WeightedIndex
,
# could be WeightedList
# 'OWNLIST' : UnweightedList, # £TODO use this for any term-level tags
}
}
NODETYPES
=
[
NODETYPES
=
[
...
@@ -288,7 +289,7 @@ QUERY_SIZE_N_DEFAULT = 1000
...
@@ -288,7 +289,7 @@ QUERY_SIZE_N_DEFAULT = 1000
# Grammar rules for chunking
# Grammar rules for chunking
RULE_JJNN
=
"{<JJ.*>*<NN.*|>+<JJ.*>*}"
RULE_JJNN
=
"{<JJ.*>*<NN.*|>+<JJ.*>*}"
RULE_
JJDTNN
=
"{<JJ.*>*<NN.*>+((<P|IN> <DT>? <JJ.*>* <NN.*>+ <JJ.*>*)|(<JJ.*>))*}"
RULE_
NPN
=
"{<JJ.*>*<NN.*>+((<P|IN> <DT>? <JJ.*>* <NN.*>+ <JJ.*>*)|(<JJ.*>))*}"
RULE_TINA
=
"^((VBD,|VBG,|VBN,|CD.?,|JJ.?,|
\
?,){0,2}?(N.?.?,|
\
?,)+?(CD.,)??)
\
RULE_TINA
=
"^((VBD,|VBG,|VBN,|CD.?,|JJ.?,|
\
?,){0,2}?(N.?.?,|
\
?,)+?(CD.,)??)
\
+?((PREP.?|DET.?,|IN.?,|CC.?,|
\
?,)((VBD,|VBG,|VBN,|CD.?,|JJ.?,|
\
?
\
+?((PREP.?|DET.?,|IN.?,|CC.?,|
\
?,)((VBD,|VBG,|VBN,|CD.?,|JJ.?,|
\
?
\
,){0,2}?(N.?.?,|
\
?,)+?)+?)*?$"
,){0,2}?(N.?.?,|
\
?,)+?)+?)*?$"
gargantext/util/ngramsextractors.py
View file @
cb55190f
from
gargantext.util.languages
import
languages
from
gargantext.util.languages
import
languages
from
gargantext.constants
import
LANGUAGES
,
DEFAULT_MAX_NGRAM_LEN
,
RULE_JJNN
,
RULE_
JJPN
N
from
gargantext.constants
import
LANGUAGES
,
DEFAULT_MAX_NGRAM_LEN
,
RULE_JJNN
,
RULE_
NP
N
import
nltk
import
nltk
import
re
import
re
...
...
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