Skip to content

Commit

Permalink
Added Ability to lowercase intents on the training screen. This is he…
Browse files Browse the repository at this point in the history
…lpful when the intents case doesnt matter for ner_crf and ner_mitie.
  • Loading branch information
pradeepmvn committed Nov 1, 2017
1 parent b8e757d commit 3f3609c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 8 additions & 1 deletion web/src/app/components/training/training.html
Expand Up @@ -25,8 +25,15 @@
<div class="col-sm-3">
<button type="button" class="btn btn-success" ng-show="exportdata !== undefined" ng-click="train()"><i class="fa fa-magic"></i>&nbsp; Start Training</button>
<button type="button" class="btn btn-secondary" ng-show="exportdata !== undefined" ng-click="savetofile()"><i class="fa fa-file"></i>&nbsp; Download File</button>
<a href="" id="a"></a>
</div>
<div class="col-sm-3">
<span ng-show="exportdata !== undefined" >To Lower case <label class="switch switch-3d switch-success" ng-show="exportdata !== undefined">
<input type="checkbox" class="switch-input" ng-model="toLowercase" ng-change="getData(agent.agent_id)">
<span class="switch-label"></span>
<span class="switch-handle"></span>
</label>
</span>
</div>
</div>
</div>
<div class="card-block" ng-show="exportdata !== undefined">
Expand Down
8 changes: 7 additions & 1 deletion web/src/app/components/training/training.js
Expand Up @@ -7,6 +7,7 @@ function TrainingController($scope, $rootScope, $interval, $http, Rasa_Status, A
var statuscheck = $interval(getRasaStatus, 5000);
$scope.generateError = "";
$scope.trainings_under_this_process = 0;
$scope.toLowercase=false;

getRasaStatus();

Expand Down Expand Up @@ -99,8 +100,13 @@ function TrainingController($scope, $rootScope, $interval, $http, Rasa_Status, A
tmpIntent = {};
tmpExpression = {};


tmpIntent.intent = intents[intent_i].intent_name;
tmpIntent.text = expressionList[expression_i].expression_text;
if($scope.toLowercase){
tmpIntent.text = expressionList[expression_i].expression_text.toLowerCase();
}else{
tmpIntent.text = expressionList[expression_i].expression_text;
}
tmpIntent.entities = [];
tmpIntent.expression_id = expressionList[expression_i].expression_id;

Expand Down
3 changes: 2 additions & 1 deletion web/src/app/shared/aside/aside.js
Expand Up @@ -55,7 +55,8 @@ function AsideController($scope, $rootScope, $interval, $http,Rasa_Parse, Rasa_C
}

$scope.executeTestRequest = function() {
$scope.response_text=''
$scope.response_text='';
$scope.test_text_response={};
//var options = {};
//var model = '';
// if ($scope.modelname !== 'Default') {
Expand Down

0 comments on commit 3f3609c

Please sign in to comment.