-
Notifications
You must be signed in to change notification settings - Fork 2
/
SENNA_POS.h
46 lines (39 loc) · 1023 Bytes
/
SENNA_POS.h
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
38
39
40
41
42
43
44
45
46
#ifndef SENNA_POS_H
#define SENNA_POS_H
typedef struct SENNA_POS_
{
/* sizes */
int window_size;
int ll_word_size;
int ll_word_max_idx;
int ll_caps_size;
int ll_caps_max_idx;
int ll_suff_size;
int ll_suff_max_idx;
int input_state_size;
int hidden_state_size;
int output_state_size;
/* weights */
float *ll_word_weight;
float *ll_caps_weight;
float *ll_suff_weight;
float *l1_weight;
float *l1_bias;
float *l2_weight;
float *l2_bias;
float *viterbi_score_init;
float *viterbi_score_trans;
/* states */
float *input_state;
float *hidden_state;
float *output_state;
int *labels;
/* padding indices */
int ll_word_padding_idx;
int ll_caps_padding_idx;
int ll_suff_padding_idx;
} SENNA_POS;
SENNA_POS* SENNA_POS_new();
int* SENNA_POS_forward(SENNA_POS *pos, const int *sentence_words, const int *sentence_caps, const int *sentence_suff, int sentence_size);
void SENNA_POS_free(SENNA_POS *pos);
#endif