Clarin review final

This commit is contained in:
sosguns2002 2018-04-20 11:54:39 +03:00
parent e1251236ff
commit ca8a7bffc2
8 changed files with 10 additions and 8 deletions

View File

@ -40,7 +40,7 @@
<input #docupload type="file" (change)="fileChangeUpload($event);docupload.value=''" accept=".txt,.pdf">
<span class="uk-link">Upload your documents</span>
</div>
<span class="cm-tooltip" uk-icon="icon: info" title="<span class='cm-label cm-label-docs'>PDF</span><span class='cm-label cm-label-docs'>TXT</span><span class='cm-label cm-label-docs'>JSON</span><span class='uk-text uk-text-small cm-coloured-text-meta'>file type<br>maximum 1MB</span><br><br>Upload either 1 <b>single PDF</b> or 1 <b>single TXT</b> file or a valid <b>JSON file with two keys (id, text)</b><br>JSON files are necessary when you want to test the algorithm in <b>many publications.</b>" uk-tooltip="pos: right"></span>
<span class="cm-tooltip" uk-icon="icon: info" title="<span class='cm-label cm-label-docs'>PDF</span><span class='cm-label cm-label-docs'>TXT</span><span class='cm-label cm-label-docs'>JSON</span><span class='uk-text uk-text-small cm-coloured-text-meta'><br>maximum 1MB</span><br><br>Upload either a <b>PDF</b> or a <b>TXT</b> file. For <b>multiple documents</b> use valid <b>JSON file with two keys (id, text)</b>" uk-tooltip="pos: right"></span>
</div>
</div>

View File

@ -121,7 +121,7 @@
<p class="uk-text-small">Select among the following text preprocessing steps.</p>
<form class="uk-form-stacked">
<div class="uk-margin">
<label class="uk-form-label" for="stop-words-filter"><input id="stop-words-filter" class="uk-checkbox" type="checkbox" [checked]="settings.stopwords===1" (change)="stopwordsCheckBoxChange($event.target.checked)"> Stopword removal <span class="cm-tooltip" uk-icon="icon: info" title="<b>Remove</b> common words (e.g., <b>articles, prepositions</b> etc.)" uk-tooltip="pos: right"></span></label>
<label class="uk-form-label" for="stop-words-filter"><input id="stop-words-filter" class="uk-checkbox" type="checkbox" [checked]="settings.stopwords===1" (change)="stopwordsCheckBoxChange($event.target.checked)"> Stopword removal <span class="cm-tooltip" uk-icon="icon: info" title="<b>Remove</b> common words (e.g., <b>articles</b> like an, the etc., <b>prepositions</b> like after, to etc.)" uk-tooltip="pos: right"></span></label>
</div>
<div class="uk-margin">
<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>
@ -138,8 +138,8 @@
<li>
<div class="uk-accordion-title">
<span class="uk-text-bold uk-text-uppercase">Mining area size</span>
<span *ngIf="settings.contextprev !== 20" class="uk-text-small uk-margin-small-left">before: {{settings.contextprev}}</span>
<span *ngIf="settings.contextnext !== 10" class="uk-text-small uk-margin-small-left">after: {{settings.contextnext}}</span>
<!--<span *ngIf="settings.contextprev !== 20" class="uk-text-small uk-margin-small-left">before: {{settings.contextprev}}</span>-->
<!--<span *ngIf="settings.contextnext !== 10" class="uk-text-small uk-margin-small-left">after: {{settings.contextnext}}</span>-->
</div>
<div class="uk-accordion-content">
<p class="uk-text-small">You may edit the length of the text area that the algorithm uses to decide if a match is a true positive.<br><span class="uk-text-danger">For advanced users only</span></p>

View File

@ -12,7 +12,7 @@
<tr>
<!-- <th class="uk-table-shrink cm-table-number">#</th> -->
<th class="uk-width-small cm-text-muted">Keyword</th>
<th class="uk-table-expand cm-text-muted">Context</th>
<th class="uk-table-expand cm-text-muted">Context <span class="uk-text-capitalize">(Optional)</span></th>
<th class="uk-table-shrink" style="width: 100px;">
<a class="uk-icon-link" (click)="deleteAllFields()">
<span contenteditable="false" class="uk-icon" uk-icon="icon: trash"></span>

View File

@ -3,8 +3,8 @@
<div class="uk-container uk-width-1-3 uk-align-left">
<button *ngIf="profileId" class="uk-button cm-button-primary uk-width-1-1 uk-button-medium uk-text-center" (click)="saveCurrentProfile()">Save changes</button>
<div *ngIf="profileId" class="uk-heading-line uk-text-center uk-margin-medium"><span>or</span></div>
<label for="profile-name" [ngClass]="{'uk-text-danger':!profileName}">New profile's name:</label>
<input [(ngModel)]="profileName" class="uk-input" [ngClass]="{'uk-form-danger':!profileName}" id="profile-name" type="text" autofocus>
<!--<label for="profile-name" [ngClass]="{'uk-text-danger':!profileName}">New profile's name:</label>-->
<input [(ngModel)]="profileName" class="uk-input" id="profile-name" type="text" placeholder="Profile name" autofocus>
<span *ngIf="!profileName" class="uk-text-danger">Profile name cannot be empty!</span>
<button *ngIf="profileId" class="uk-button cm-button-primary cm-margin-medium-top uk-width-1-1 uk-button-medium uk-text-center" [disabled]="!profileName" (click)="saveNewProfile()">Save as new profile</button>
<button *ngIf="!profileId" class="uk-button cm-button-primary cm-margin-medium-top uk-width-1-1 uk-button-medium uk-text-center" [disabled]="!profileName" (click)="saveNewProfile()">Save profile</button>

View File

@ -955,7 +955,7 @@ header.uk-sticky-fixed .cm-results-count-section {
.cm-document-result .highlight {
font-weight: bold;
background-color: #bedfff;
padding: 2px 8px;
padding: 1px 3px;
color: #222;
}
.cm-document-result .negative {

View File

@ -382,6 +382,8 @@ class InitialClientHandshakeHandler(BaseHandler):
user_id = self.request.arguments['user'][0]
database_file_name = "users_files/OAMiningProfilesDatabase_{0}.db".format(user_id)
if (not os.path.isfile(database_file_name)):
if not os.path.exists("users_files"):
os.makedirs(directory)
# create a database where the user stores his profiles info
import sys
sys.path.append(msettings.MADIS_PATH)