Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ The package contains several text analysis tasks to generate the terms used in t

.. code-block:: bash

$ ./mange.py construct_tfidf_model gensim_data/immix_summaries.mm gensim_data/immix_summaries.tfidf_model
$ ./manage.py construct_tfidf_model gensim_data/immix_summaries.mm gensim_data/immix_summaries.tfidf_model

7. Add the topN 'most descriptive' terms to each indexed document:

.. code-block:: bash

$ ./mange.py analyze_text index_descriptive_terms "immix_analyzed/summaries/*.tar.gz" gensim_data/immix_summaries_pruned.dict gensim_data/immix_summaries.tfidf_model gensim_data/immix_summaries.tfidf_model 'quamerdes_immix_20140920' 'text_descriptive_terms' 10
$ ./manage.py analyze_text index_descriptive_terms "immix_analyzed/summaries/*.tar.gz" gensim_data/immix_summaries_pruned.dict gensim_data/immix_summaries.tfidf_model gensim_data/immix_summaries.tfidf_model 'quamerdes_immix_20140920' 'text_descriptive_terms' 10

License
-------
Expand Down
1 change: 1 addition & 0 deletions avresearcher/static/js/views/search/results_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function($, _, Backbone, app, resultsListImmixTemplate, resultsListKbTemplate){

this.$el.find('li').remove();
this.$el.html(_.template(this.templates[this.model.get('collection')], {
query: this.model.get('ftQuery'),
hits: this.model.get('hits')
}));

Expand Down
13 changes: 12 additions & 1 deletion avresearcher/static/templates/search/results_list_kb.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@
} else {
title = '(untitled article)';
}

// Bypass the KB resolver and go straight to Delpher. Not only does
// the KB resolver add noticeable latency, it also doesn't allow us
// to send the query string along.
var re = /http:\/\/resolver\.kb\.nl\/resolve\?urn=([^&]*)/;
var url = hit.fields.source;
var match = re.exec(url);
if (match) {
url = ('http://www.delpher.nl/nl/kranten/view?coll=ddd&identifier='
+ match[1] + '&query=' + encodeURIComponent(query));
}
%>
<h2><a href="<%= hit.fields.source %>" target="_blank"><%= title %></a></h2>
<h2><a href="<%= url %>" target="_blank"><%= title %></a></h2>
<% if ('meta.publication_name' in hit.fields){ %><h3><%= hit.fields['meta.publication_name'] %></h3><% } %>
<%
var format = d3.time.format('%a %b %-e, %Y');
Expand Down