| 98 | |
| 99 | template <typename feature_setter, typename EXP> |
| 100 | void get_features ( |
| 101 | feature_setter& set_feature, |
| 102 | const sequence_type& x, |
| 103 | const matrix_exp<EXP>& y, |
| 104 | unsigned long position |
| 105 | ) const |
| 106 | { |
| 107 | if (y.size() > 1) |
| 108 | { |
| 109 | set_feature(y(1)*num_label_states + y(0), 0.5); |
| 110 | set_feature(y(1)*num_label_states + y(0), 0.5); |
| 111 | } |
| 112 | |
| 113 | set_feature(num_label_states*num_label_states + |
| 114 | y(0)*num_sample_states + x.item[position],0.25); |
| 115 | set_feature(num_label_states*num_label_states + |
| 116 | y(0)*num_sample_states + x.item[position],0.75); |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | bool called_rejct_labeling = false; |