Function to create to vc associated corpus statistic added
Change-Id: I594a592590e9106393f7819daa357d6aa3932d6d
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 9aef8d5..0f38d12 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -51,9 +51,10 @@
'vc/doc',
'vc/docgroup',
'vc/menu',
+ 'vc/statistic',
'datepicker',
- 'util'
-], function (unspecDocClass, docClass, docGroupClass, menuClass, dpClass) {
+ 'util',
+], function (unspecDocClass, docClass, docGroupClass, menuClass, statClass, dpClass) {
"use strict";
KorAP._validUnspecMatchRE = new RegExp("^(?:eq|ne|contains(?:not)?|excludes)$");
@@ -324,6 +325,19 @@
*/
toQuery : function () {
return this._root.toQuery();
- }
+ },
+
+
+ /**
+ * Get associated corpus statistic,
+ * create corpus statistic if it is unassigned
+ */
+ statistic : function(){
+ if(this.corpStat == undefined){
+ this.corpStat = statClass.create();
+ }
+ return this.corpStat;
+ }
+
};
});