Add one more checkbox on settings
This commit is contained in:
parent
52645fc89d
commit
8d871b9c6d
|
@ -4,7 +4,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"start": "ng serve --disable-host-check --host 0.0.0.0",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
|
|
|
@ -2,7 +2,6 @@ import {NgModule} from '@angular/core';
|
|||
|
||||
import {AppComponent} from './app.component';
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import {Router} from '@angular/router';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {InteractiveMiningModule} from './interactivemining/interactive-mining.module';
|
||||
|
||||
|
@ -18,8 +17,4 @@ import {InteractiveMiningModule} from './interactivemining/interactive-mining.mo
|
|||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule {
|
||||
// Diagnostic only: inspect router configuration
|
||||
constructor(router: Router) {
|
||||
console.log('Routes: ', JSON.stringify(router.config, undefined, 2));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,6 @@
|
|||
<div class="uk-margin">
|
||||
<p>Select or upload a dataset to test the mining algorithm. Each dataset contains documents from various sources according to its title.</p>
|
||||
<div class="uk-grid-collapse uk-child-width-expand" uk-grid>
|
||||
<!--<form class="uk-search uk-search-default uk-width-1-5@m">-->
|
||||
<!--<span class="uk-search-icon-flip" uk-search-icon></span>-->
|
||||
<!--<input class="uk-search-input" type="search" placeholder="Search..." style="background-color: white;">-->
|
||||
<!--</form>-->
|
||||
<button *ngIf="documentsLoaded>0" class="uk-button cm-button-primary uk-width-auto cm-doc-selected">{{docNameLoaded}}<span uk-icon="icon: check; ratio: 1"></span></button>
|
||||
<div class="uk-width-expand" uk-slider>
|
||||
<div class="uk-position-relative">
|
||||
|
|
|
@ -85,6 +85,7 @@ export class ResultspreviewComponent implements OnInit {
|
|||
wordssplitnum: Number.parseInt(localStorage.getItem('wordssplitnum')),
|
||||
punctuation: Number.parseInt(localStorage.getItem('punctuation')),
|
||||
stopwords: Number.parseInt(localStorage.getItem('stopwords')),
|
||||
allLowercase: Number.parseInt(localStorage.getItem('allLowercase')),
|
||||
lowercase: Number.parseInt(localStorage.getItem('lowercase')),
|
||||
stemming: Number.parseInt(localStorage.getItem('stemming')),
|
||||
documentarea: localStorage.getItem('documentarea'),
|
||||
|
|
|
@ -127,7 +127,10 @@
|
|||
<label class="uk-form-label" for="punctuation-filter"><input id="punctuation-filter" class="uk-checkbox" type="checkbox" [checked]="settings.punctuation===1" (change)="punctuationCheckBoxChange($event.target.checked)"> Punctuation removal</label>
|
||||
</div>
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="lowercase-filter"><input id="lowercase-filter" class="uk-checkbox" type="checkbox" [checked]="settings.lowercase===1" (change)="lowercaseCheckBoxChange($event.target.checked)"> Convert to lower case</label>
|
||||
<label class="uk-form-label" for="lowercase-filter"><input id="all-lowercase-filter" class="uk-checkbox" type="checkbox" [checked]="settings.lowercase===1" (change)="allLowercaseCheckBoxChange($event.target.checked)"> Convert everything to lower case</label>
|
||||
</div>
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="lowercase-filter"><input id="lowercase-filter" class="uk-checkbox" type="checkbox" [checked]="settings.lowercase===1" (change)="lowercaseCheckBoxChange($event.target.checked)"> Convert to lower-case only during evaluation of phrases</label>
|
||||
</div>
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="stemming-filter"><input id="stemming-filter" class="uk-checkbox" type="checkbox" [checked]="settings.stemming===1" (change)="stemmingCheckBoxChange($event.target.checked)"> Word stemming <span class="cm-tooltip" uk-icon="icon: info" title="Stemming is a process of text normalisation, in which the <b>variant forms of a word are reduced to a common form</b>, for <b>example</b>:<br>connection, connections, connective, connected, connecting<br><b>are reduced to connect</b>" uk-tooltip="pos: right"></span></label>
|
||||
|
|
|
@ -66,6 +66,7 @@ export class SettingsComponent implements OnInit {
|
|||
wordssplitnum: Number.parseInt(localStorage.getItem('wordssplitnum')),
|
||||
punctuation: Number.parseInt(localStorage.getItem('punctuation')),
|
||||
stopwords: Number.parseInt(localStorage.getItem('stopwords')),
|
||||
allLowercase: Number.parseInt(localStorage.getItem('allLowercase')),
|
||||
lowercase: Number.parseInt(localStorage.getItem('lowercase')),
|
||||
stemming: Number.parseInt(localStorage.getItem('stemming')),
|
||||
documentarea: localStorage.getItem('documentarea'),
|
||||
|
@ -216,6 +217,11 @@ export class SettingsComponent implements OnInit {
|
|||
this.settings.punctuation = value ? 1 : 0;
|
||||
}
|
||||
|
||||
allLowercaseCheckBoxChange(value: boolean): void {
|
||||
localStorage.setItem('allLowercase', value ? '1' : '0');
|
||||
this.settings.allLowercase = value ? 1 : 0;
|
||||
}
|
||||
|
||||
lowercaseCheckBoxChange(value: boolean): void {
|
||||
localStorage.setItem('lowercase', value ? '1' : '0');
|
||||
this.settings.lowercase = value ? 1 : 0;
|
||||
|
@ -243,6 +249,7 @@ export class SettingsComponent implements OnInit {
|
|||
wordssplitnum: Number.parseInt(localStorage.getItem('wordssplitnum')),
|
||||
punctuation: Number.parseInt(localStorage.getItem('punctuation')),
|
||||
stopwords: Number.parseInt(localStorage.getItem('stopwords')),
|
||||
allLowercase: Number.parseInt(localStorage.getItem('allLowercase')),
|
||||
lowercase: Number.parseInt(localStorage.getItem('lowercase')),
|
||||
stemming: Number.parseInt(localStorage.getItem('stemming')),
|
||||
documentarea: localStorage.getItem('documentarea')
|
||||
|
|
|
@ -9,6 +9,7 @@ export interface Settings {
|
|||
wordssplitnum: number;
|
||||
punctuation: number;
|
||||
stopwords: number;
|
||||
allLowercase: number;
|
||||
lowercase: number;
|
||||
stemming: number;
|
||||
documentarea: string;
|
||||
|
|
|
@ -13,7 +13,6 @@ export class StepsnvabarComponent implements OnInit {
|
|||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
router.events.subscribe((val) => {
|
||||
// see also
|
||||
if (val instanceof NavigationEnd) {
|
||||
this.changeStep(val.urlAfterRedirects);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue