...
 
Commits (39)
......@@ -409,8 +409,8 @@ BATCH_NGRAMSEXTRACTION_SIZE = 3000 # how many new node-ngram relations before
# Scrapers config
QUERY_SIZE_N_MAX = 1000
QUERY_SIZE_N_DEFAULT = 1000
QUERY_SIZE_N_MAX = 10000000
QUERY_SIZE_N_DEFAULT = 10000000
# Refresh corpora workflow status for project view's progressbar
PROJECT_VIEW_REFRESH_INTERVAL = 3000 # 1st refresh in ms (then increasing arithmetically)
......
......@@ -94,19 +94,30 @@ def query_list(list_id,
else:
# NB: score can be undefined (eg ex-subform that now became free)
# ==> we need outerjoin
# and the filter needs to have scoring_metric_id so we do it before
NNN = NodeNodeNgram
ScoresTable = (session
.query(NodeNodeNgram.score, NodeNodeNgram.ngram_id)
.filter(NodeNodeNgram.node1_id == scoring_metric_id)
.subquery()
)
query = (session
.query(Ngram.id, Ngram.terms, NNN.score)
# Ngrams must be related to our list <Node(id=list_id)>
.join(NodeNgram, (NodeNgram.ngram_id == Ngram.id) &
(NodeNgram.node_id == list_id))
# Select by metric <Node(id=scoring_metric_id)>
.outerjoin(NNN, (NNN.ngram_id == Ngram.id) &
(NNN.node1_id == scoring_metric_id))
# Sort by descending score
.order_by(NNN.score.desc())
.query(
NodeNgram.ngram_id,
Ngram.terms,
ScoresTable.c.score
)
.join(Ngram, NodeNgram.ngram_id == Ngram.id)
# main filter ----------------------
.filter(NodeNgram.node_id == list_id)
# scores if possible
.outerjoin(ScoresTable,
ScoresTable.c.ngram_id == NodeNgram.ngram_id)
.order_by(desc(ScoresTable.c.score))
)
if pagination_limit:
......
......@@ -246,9 +246,25 @@ class NodeListResource(APIView):
writer = csv.writer(response, delimiter='\t', quoting=csv.QUOTE_MINIMAL)
keys = [ 'title' , 'source'
, 'publication_year', 'publication_month', 'publication_day'
, 'abstract', 'authors']
keys = [ "title"
, "source"
, "publication_year"
, "publication_month"
, "publication_day"
, "abstract"
, "authors"
, "url"
, "isbn_s"
, "issue_s"
, "journalPublisher_s"
, "language_s"
, "doiId_s"
, "authId_i"
, "instStructId_i"
, "deptStructId_i"
, "labStructId_i"
, "rteamStructId_i"
]
writer.writerow(keys)
......
static/img/logo.png

19.8 KB | W: | H:

static/img/logo.png

23.2 KB | W: | H:

static/img/logo.png
static/img/logo.png
static/img/logo.png
static/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
static/img/logoSmall.png

1.14 KB | W: | H:

static/img/logoSmall.png

1.15 KB | W: | H:

static/img/logoSmall.png
static/img/logoSmall.png
static/img/logoSmall.png
static/img/logoSmall.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -10,12 +10,12 @@ $bootstrap-sass-asset-helper: false !default;
$gray-base: #000 !default;
$gray-darker: lighten($gray-base, 13.5%) !default; // #222
$gray-dark: #055B9A; // #333
$gray: #5F97C0; // #555
$gray-light: #94B8D1; // #777
$gray-lighter: #A8C6DC; // #eee
$gray-dark: #113345; // #333
$gray: #00B8DE; // #555
$gray-light: #13C4E8; // #777
$gray-lighter: #8EDEEC; // #eee
$brand-primary: #E6A811; // #337ab7
$brand-primary: #0B6D88; // #337ab7
$brand-success: #5cb85c !default;
$brand-info: #5bc0de !default;
$brand-warning: #f0ad4e !default;
......@@ -27,7 +27,7 @@ $brand-danger: #d9534f !default;
//## Settings for some of the most global styles.
//** Background color for `<body>`.
$body-bg: #FEFEFE;
$body-bg: #F9FAFB;
//** Global text color on `<body>`.
$text-color: $gray-dark !default;
......@@ -140,7 +140,7 @@ $table-bg-hover: #f5f5f5 !default;
$table-bg-active: $table-bg-hover !default;
//** Border color for table and cell borders.
$table-border-color: #055B9A;
$table-border-color: #113345;
//== Buttons
......@@ -391,7 +391,7 @@ $navbar-default-toggle-border-color: #ddd !default;
// Inverted navbar
// Reset inverted navbar basics
$navbar-inverse-color: lighten($gray-light, 15%) !default;
$navbar-inverse-bg: #003C88;
$navbar-inverse-bg: #0B2E41;
$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default;
// Inverted navbar links
......
......@@ -17,6 +17,7 @@
<div class="container">
<div class="navbar-inner">
<a class="navbar-brand" style="line-height:15px; height:10px; padding: 10px 10px;" href="/"><img src="{% static "img/logoSmall.png"%}" title="Back to home."></a>
<a class="navbar-brand" style="line-height:15px; height:10px; padding: 10px 10px;" href="https://www.imt.fr"><img src="{% static "img/credits/IMT-logo.png"%}" title="IMT"></a>
</div>
<div class="navbar-collapse collapse">
......