@@ -92,15 +92,17 @@ WordCloudApp.directive('wordCloud', function($rootScope) {
92
92
$scope . filteredText = newValue . filteredText ;
93
93
$scope . morphemes = newValue . morphemes ;
94
94
$scope . nonContentWordsSpaceSeparated = $scope . wordCloud . nonContentWordsSpaceSeparated = newValue . nonContentWordsArray . join ( ' ' ) ;
95
- $scope . morphemesSpaceSeparated = ( $scope . wordCloud . morphemesSpaceSeparated = newValue . prefixesArray . join ( ' ' ) + ' ' + newValue . suffixesArray . join ( ' ' ) ) . trim ( ) ;
95
+ $scope . morphemesSpaceSeparated = ( $scope . wordCloud . morphemesSpaceSeparated = newValue . morphemesArray . join ( ' ' ) + newValue . prefixesArray . join ( ' ' ) + ' ' + newValue . suffixesArray . join ( ' ' ) ) . trim ( ) ;
96
96
$scope . punctuationSpaceSeparated = $scope . wordCloud . punctuationSpaceSeparated = newValue . punctuationArray . join ( ' ' ) ;
97
97
$scope . wordFrequenciesLineBreakSeparated = newValue . wordFrequencies . map ( function ( word ) {
98
98
return word . orthography + ' ' + word . count ;
99
99
} ) . join ( '\n' ) ;
100
100
$scope . lexicalExperienceJSON = JSON . stringify ( newValue . lexicalExperience ) ;
101
101
102
102
} ;
103
- $scope . refreshWhatsInScope ( $scope . wordCloud . runStemmer ( ) . runSegmenter ( ) ) ;
103
+
104
+ // render will auto generate wordFrequencies if there are none
105
+ // $scope.refreshWhatsInScope($scope.wordCloud.runStemmer().runSegmenter());
104
106
105
107
106
108
$scope . $watch ( 'wordCloud' , function ( newValue , oldValue ) {
@@ -173,8 +175,11 @@ WordCloudApp.directive('wordCloud', function($rootScope) {
173
175
console . log ( 'changeMorphemes' ) ;
174
176
$scope . wordCloud . morphemesArray = newValue ;
175
177
178
+ delete $scope . wordCloud . layout ;
179
+ $scope . wordCloud . runWordFrequencyGenerator ( ) ;
176
180
$scope . wordCloud . runSegmenter ( ) ;
177
- $scope . wordCloud . runStemmer ( ) ;
181
+ $scope . wordCloud . render ( ) ;
182
+ // $scope.wordCloud.runStemmer();
178
183
// $scope.orthography = newValue.orthography;
179
184
// $scope.nonContentWordsSpaceSeparated = newValue.nonContentWordsSpaceSeparated;
180
185
// $scope.morphemesSpaceSeparated = newValue.morphemesSpaceSeparated;
0 commit comments