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
52ac4d2a
Commit
52ac4d2a
authored
Sep 24, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
models schema with phylo
parent
1a58420a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
models.py
documents/models.py
+21
-6
No files found.
documents/models.py
View file @
52ac4d2a
...
...
@@ -107,18 +107,20 @@ class Document(models.Model):
######################################################################
class
Ngram
(
models
.
Model
):
terms
=
models
.
CharField
(
max_length
=
64
,
unique
=
True
)
stem
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
)
terms
=
models
.
TextField
(
unique
=
True
)
stem
=
models
.
TextField
(
blank
=
True
)
n
=
models
.
IntegerField
()
# post-tag = models.ManyToMany(blank=True)
# ajouter une table stem ?
# post-tag = models.ManyToMany(blank=True)
# ajouter une table stem ?
def
__str__
(
self
):
return
self
.
terms
class
NgramTemporary
(
models
.
Model
):
terms
=
models
.
TextField
()
terms
=
models
.
TextField
(
unique
=
True
)
stem
=
models
.
TextField
(
blank
=
True
)
n
=
models
.
IntegerField
()
# post-tag = models.ManyToMany(blank=True)
# ajouter une table stem ?
def
__str__
(
self
):
return
self
.
terms
...
...
@@ -179,6 +181,19 @@ class Coocurrence(models.Model):
return
self
.
title
# graph ?
class
Clique
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
100
)
ngram
=
models
.
ForeignKey
(
Ngram
)
def
__str__
(
self
):
return
self
.
title
class
Phylo
(
models
.
Model
):
date
=
models
.
DateField
(
blank
=
True
,
null
=
True
)
clique
=
models
.
ForeignKey
(
Clique
)
clique
=
models
.
ForeignKey
(
Clique
)
score
=
models
.
DecimalField
(
max_digits
=
19
,
decimal_places
=
10
,
blank
=
True
,
null
=
True
)
def
__str__
(
self
):
return
self
.
title
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