blob: 7b3bbe3ddd9235e485433559cb9ef8df8a1a3c27 (
plain)
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
|
#include "util.h"
namespace dtrain
{
/*
* register_and_convert
*
*/
void
register_and_convert(const vector<string>& strs, vector<WordID>& ids)
{
vector<string>::const_iterator it;
for ( it = strs.begin(); it < strs.end(); it++ ) {
ids.push_back( TD::Convert( *it ) );
}
}
/*
* print_FD
*
*/
void
print_FD()
{
for ( size_t i = 0; i < FD::NumFeats(); i++ ) cout << FD::Convert(i)<< endl;
}
} // namespace
|