-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontroller.js
More file actions
37 lines (34 loc) · 818 Bytes
/
Copy pathcontroller.js
File metadata and controls
37 lines (34 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Created by crawler on 30/11/2017.
*/
app.controller("TextAnnotation", function ($scope) {
var tags = [
["Nhật ký", "N", "B-NP"],
["SEA", "Np", "B-NP"],
["Games", "Np", "B-NP"],
["ngày", "N", "B-NP"],
["21/8", "M", "B-NP"],
[":", "CH", "O"],
["Ánh", "Np", "B-NP"],
["Viên", "Np", "I-NP"],
["thắng", "V", "B-VP"],
["giòn giã", "N", "B-NP"],
["ở", "E", "B-PP"],
["vòng", "N", "B-NP"],
["loại", "N", "B-NP"],
[".", "CH", "O"]
];
var tokens = _.map(tags, function(tag) {
return tag[0];
});
var text = tokens.join(" ");
var posTags = tags;
var posEntities = generateEntitiesFromTags(posTags);
$scope.pos_tag = {
"config": POSTagBratConfig,
"doc": {
"text": text,
"entities": posEntities
}
};
});