Commit 59c97f15 authored by Romain Loth's avatar Romain Loth

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

parent d8908ff2
......@@ -385,7 +385,7 @@
// =============
// text ------- "Background Few previous studies have examined
// 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"}
// template --- "<span ng-controller='TextSelectionController'
// ng-click='onClick($event)'
......
......@@ -64,9 +64,9 @@
* --------
* "554": {
* "lists": { "558": "StopList", "564": "MiamList", "565": "MapList" }
* "556": [{ "uuid": 2368, "occurrences": 1.0, "text": "idea", "list_id": 564 },
* { "uuid": 5031, "occurrences": 1.0, "text": "indications", "list_id": 564},
* { "uuid": 5015, "occurrences": 3.0, "text": "star", "list_id": 565 },
* "556": [{ "uuid": 2368, "occs": 1.0, "text": "idea", "list_id": 564 },
* { "uuid": 5031, "occs": 1.0, "text": "indications", "list_id": 564},
* { "uuid": 5015, "occs": 3.0, "text": "star", "list_id": 565 },
* ... ],
* }
*/
......
<span ng-click='onDeleteClick()' class="delete-keyword">×</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 @@
// £TEST locally check if already in annotations NodeNgrams ------
// $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)
var already_in_list = false ;
......
......@@ -71,8 +71,8 @@ class NgramList(APIView):
[
{'uuid': ngram_id,
'text': ngram_text,
'occurrences': ngram_occurrences,
'list_id': list_id,}
'occs': ngram_occurrences,
'lid': list_id,}
for (ngram_id,ngram_text,ngram_occurrences,list_id) in doc_ngram_list
],
'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