| 45 | feature_extractor(const ss_feature_extractor& ss_fe_) : fe(ss_fe_) {} |
| 46 | |
| 47 | unsigned long num_nonnegative_weights ( |
| 48 | ) const |
| 49 | { |
| 50 | const unsigned long NL = ss_feature_extractor::use_BIO_model ? 3 : 5; |
| 51 | if (ss_feature_extractor::allow_negative_weights) |
| 52 | { |
| 53 | return 0; |
| 54 | } |
| 55 | else |
| 56 | { |
| 57 | // We make everything non-negative except for the label transition |
| 58 | // and bias features. |
| 59 | return num_features() - NL*NL - NL; |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | friend void serialize(const feature_extractor& item, std::ostream& out) |
| 64 | { |
no outgoing calls
no test coverage detected