Skip to content

Commit

Permalink
Merge branch 'release/4.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukavdplas committed Jul 7, 2023
2 parents 2e55899 + 5ba0b9a commit 906ff41
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 37 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ keywords:
- natural language processing
license: MIT
commit: fb80497
version: 4.0.3
version: 4.1.2
date-released: '2023-06-21'
25 changes: 0 additions & 25 deletions backend/corpora/goodreads/goodreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,31 +214,6 @@ def sources(self, start, end):
),
es_mapping={'type': 'keyword'}
),
Field(
name='author',
display_name='Author',
description='Author of the review.',
extractor=CSV(
field='author',
),
es_mapping={'type': 'keyword'},
csv_core=True,
),
Field(
name='author_gender',
display_name='Reviewer gender',
description='Gender of the reviewer, guessed based on name.',
extractor=CSV(
field='author_gender',
),
es_mapping={'type': 'keyword'},
search_filter=MultipleChoiceFilter(
description='Accept only reviews made by authors of these genders. Note that gender was guessed based on username',
option_count=6
),
csv_core=True,
visualizations=['resultscount', 'termfrequency'],
),
Field(
name='rating_text',
display_name='Goodreads rating',
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/filter/range-filter.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="range">
<div class="range" *ngIf="filter?.data | async as data">
<span>{{data.min}} - {{data.max}}</span>
<p-slider [animate]="true" [ngModel]="getDisplayData(data)"
[range]="true" [min]="min" [max]="max" (onSlideEnd)="update(getFilterData($event))"></p-slider>
<p-slider [animate]="true" [ngModel]="[data.min, data.max]"
[range]="true" [min]="min" [max]="max" (onSlideEnd)="update(getFilterData($event.values))"></p-slider>
</div>
4 changes: 0 additions & 4 deletions frontend/src/app/filter/range-filter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ export class RangeFilterComponent extends BaseFilterComponent<RangeFilterData> {
this.max = filter.defaultData.max;
}

getDisplayData(filterData: RangeFilterData): [number, number] {
return [filterData.min, filterData.max];
}

getFilterData(value: [number, number]): RangeFilterData {
return {
min: value[0],
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/search/search-results.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import * as _ from 'lodash';
import { faBookOpen, faArrowLeft, faArrowRight, faLink } from '@fortawesome/free-solid-svg-icons';
import { makeContextParams } from '../utils/document-context';

const MAXIMUM_DISPLAYED = 10000;

@Component({
selector: 'ia-search-results',
templateUrl: './search-results.component.html',
Expand Down Expand Up @@ -45,7 +47,6 @@ export class SearchResultsComponent implements OnChanges {

public resultsPerPage = 20;
public totalResults: number;
private maximumDisplayed: number;

public fromIndex = 0;

Expand Down Expand Up @@ -76,7 +77,6 @@ export class SearchResultsComponent implements OnChanges {
ngOnChanges() {
if (this.queryModel) {
this.fromIndex = 0;
this.maximumDisplayed = this.user.downloadLimit ? this.user.downloadLimit : 10000;
this.search();
this.queryModel.update.subscribe(() => this.search());
}
Expand All @@ -97,7 +97,7 @@ export class SearchResultsComponent implements OnChanges {
this.results = results;
this.results.documents.map((d, i) => d.position = i + 1);
this.searched(this.queryModel.queryText, this.results.total.value);
this.totalResults = this.results.total.value <= this.maximumDisplayed ? this.results.total.value : this.maximumDisplayed;
this.totalResults = this.results.total.value <= MAXIMUM_DISPLAYED ? this.results.total.value : MAXIMUM_DISPLAYED;
}, error => {
this.showError = {
date: (new Date()).toISOString(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i-analyzer",
"version": "4.1.0",
"version": "4.1.2",
"license": "MIT",
"scripts": {
"postinstall": "yarn install-back && yarn install-front",
Expand Down

0 comments on commit 906ff41

Please sign in to comment.