forked from OpenCorpora/opencorpora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ner.php
32 lines (24 loc) · 971 Bytes
/
ner.php
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
<?php
require_once('lib/header.php');
require_once('lib/lib_ne.php');
require_once('lib/lib_users.php');
// TODO: permissions?
$smarty->assign('active_page', 'tasks');
check_logged();
$action = isset($_GET['act']) ? $_GET['act'] : '';
$tagset_id = get_current_tagset();
switch ($action) {
case 'manual':
$smarty->assign('content', get_wiki_page("nermanual/" . (int)$_GET['id']));
$smarty->display('static/doc/annotation.tpl');
break;
default:
$is_ner_mod = user_has_permission(PERM_NE_MODER);
$smarty->assign('possible_guidelines',
array(1 => "Default (2014)", 2 => "Dialogue Eval (2016)")); // TODO read from db
$smarty->assign('is_ner_mod', $is_ner_mod);
$smarty->assign('current_guideline', $tagset_id);
$smarty->assign('page', get_books_with_NE($tagset_id, !$is_ner_mod));
$smarty->display(($is_ner_mod ? 'ner/main-moderator.tpl' : 'ner/main.tpl'));
}
log_timing();