Commit 0e22345f authored by Romain Loth's avatar Romain Loth

annotations: rename occurrences to occs in transmitted json to gain bytes

parent 6426fb90
...@@ -385,7 +385,7 @@ ...@@ -385,7 +385,7 @@
// ============= // =============
// text ------- "Background Few previous studies have examined // text ------- "Background Few previous studies have examined
// non-wealth-based inequalities etc etc etc" // non-wealth-based inequalities etc etc etc"
// ngram ----- {uuid: 1846, occurrences: 1, list_id: 3689, // ngram ----- {uuid: 1846, occs: 1, list_id: 3689,
// text: "previous studies", listName: "MAINLIST"} // text: "previous studies", listName: "MAINLIST"}
// template --- "<span ng-controller='TextSelectionController' // template --- "<span ng-controller='TextSelectionController'
// ng-click='onClick($event)' // ng-click='onClick($event)'
......
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
* -------- * --------
* "554": { * "554": {
* "lists": { "558": "StopList", "564": "MiamList", "565": "MapList" } * "lists": { "558": "StopList", "564": "MiamList", "565": "MapList" }
* "556": [{ "uuid": 2368, "occurrences": 1.0, "text": "idea", "list_id": 564 }, * "556": [{ "uuid": 2368, "occs": 1.0, "text": "idea", "list_id": 564 },
* { "uuid": 5031, "occurrences": 1.0, "text": "indications", "list_id": 564}, * { "uuid": 5031, "occs": 1.0, "text": "indications", "list_id": 564},
* { "uuid": 5015, "occurrences": 3.0, "text": "star", "list_id": 565 }, * { "uuid": 5015, "occs": 3.0, "text": "star", "list_id": 565 },
* ... ], * ... ],
* } * }
*/ */
......
<span ng-click='onDeleteClick()' class="delete-keyword">×</span> <span ng-click='onDeleteClick()' class="delete-keyword">×</span>
<span data-toggle="tooltip" class="keyword-text {[{keyword.listName}]}">{[{keyword.text}]}</span> <span data-toggle="tooltip" class="keyword-text {[{keyword.listName}]}">{[{keyword.text}]}</span>
<span class="occurrences" data-keyword-id="{[{keyword.uuid}]}">{[{keyword.occurrences}]}</span> <span class="occurrences" data-keyword-id="{[{keyword.uuid}]}">{[{keyword.occs}]}</span>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
// £TEST locally check if already in annotations NodeNgrams ------ // £TEST locally check if already in annotations NodeNgrams ------
// $rootScope.annotations = array of ngram objects like: // $rootScope.annotations = array of ngram objects like:
// {"list_id":805,"occurrences":2,"uuid":9386,"text":"petit échantillon"} // {"list_id":805,"occs":2,"uuid":9386,"text":"petit échantillon"}
console.log('looking for "' + value + '" in list:' + listId) console.log('looking for "' + value + '" in list:' + listId)
var already_in_list = false ; var already_in_list = false ;
......
...@@ -71,8 +71,8 @@ class NgramList(APIView): ...@@ -71,8 +71,8 @@ class NgramList(APIView):
[ [
{'uuid': ngram_id, {'uuid': ngram_id,
'text': ngram_text, 'text': ngram_text,
'occurrences': ngram_occurrences, 'occs': ngram_occurrences,
'list_id': list_id,} 'lid': list_id,}
for (ngram_id,ngram_text,ngram_occurrences,list_id) in doc_ngram_list for (ngram_id,ngram_text,ngram_occurrences,list_id) in doc_ngram_list
], ],
'lists': lists 'lists': lists
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment